Skip to content

ansible tests: Add test for the neighbour MAC change update#31

Merged
lguohan merged 4 commits intosonic-net:masterfrom
andriymoroz-mlnx:master
Nov 9, 2016
Merged

ansible tests: Add test for the neighbour MAC change update#31
lguohan merged 4 commits intosonic-net:masterfrom
andriymoroz-mlnx:master

Conversation

@andriymoroz-mlnx
Copy link
Contributor

This is the test for the issue sonic-net/SONiC#19

# convert ip to hex format (20.0.0.2 -> 14000002)
iface_ip_hex=`printf '%02X' ${iface_ip//./ }`
# grep redis DB to find a key holding data for the neighbour with this IP
key=`ssh ${dut_user}@${dut_host} "bash -c 'docker exec database redis-cli -n 1 KEYS ASIC* ' | grep -i ${iface_ip_hex}"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the password here? can you pass ansible_user, ansible_password from ansible to the script here?
also, it is assumed that dut_host can be resolved to ip, which may not be true.
can you try the ansible_host as it is IP address.

also the dut hostkey might change, we ignore offending host keys.

I think we can avoid using ssh mechanism here by setting up redis-cli to listen on mgmt ip socket so that we can do remote query on redis.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree about ssh from host to DUT - it relies on keys which needs some pre-setup.
and making redis-cli listen to management port will also require some configuration
what about refreshing the known_hosts on DUT before the test?
Or do all ssh work from the ansible_host - it has login/password for both host and DUT and will handle any issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrote test to use ansible scripts only
Changes for the new DB format are in progress...

key=`ssh ${dut_user}@${dut_host} "bash -c 'docker exec database redis-cli -n 1 KEYS ASIC* ' | grep -i ${iface_ip_hex}"`
#echo $key; echo
# NEIGHBOUR_DST_MAC_ADDRESS attribute code is 0, so using key 00000000
mac=`ssh ${dut_user}@${dut_host} "bash -c 'docker exec database redis-cli -n 1 HGET ${key} 00000000'"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the saidb format has been changed recently, can you adapt to the latest sai db format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the test. Tested on the recent sources

@@ -1,3 +1,7 @@
- name: Neighbour tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to "Neighbor mac change test"

@@ -1,3 +1,7 @@
- name: Neighbour tests
include: neighbour.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to "neighbor-mac.yml"

@lguohan lguohan merged commit 4129894 into sonic-net:master Nov 9, 2016
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-mgmt that referenced this pull request Feb 13, 2017
* added necessary hosts
* temporary excluded DUT port sonic-net#31

To run the test execute:
ansible-playbook test_sonic.yml -i inventory --limit arc-switch1026 --tags fib -e run_dir="/tmp" -e ptf_host=ptf-fib -vvvvv -e testbed_type=fib
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Why I did it
Advance sonic-dhcp-relay submodule head on 202012 branch

How I did it
Added the following commits:
a4b15d8 jcaiMR Thu Dec 29 14:18:28 2022 +0800 fix relay-reply dhcpv6 packet counter issue (sonic-net#29)
677543f jcaiMR Sat Dec 17 00:24:32 2022 +0800 fix handleSwssNotification crash in dhcp6relay (sonic-net#28)
ed86546 jcaiMR Wed Dec 14 14:08:58 2022 +0800 Fix multiple vlan issue (sonic-net#27)
5ec1f5b Vivek Thu Dec 8 09:44:15 2022 -0800 Made the Error log informative (sonic-net#22)
063d41b jcaiMR Wed Nov 30 14:41:53 2022 +0800 disable cfg dynamic change (sonic-net#25)
d4a51f6 kellyyeh Tue Jan 31 18:09:08 2023 -0800 Add unittest infrastructure (sonic-net#5) (sonic-net#31)

How to verify it
Ran full dhcpv6 test suite on lab device
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…sonic-net#21792)

#### Why I did it
src/dhcpmon
```
* 8fface8 - (HEAD -> 202405, origin/202405) Merge pull request sonic-net#33 from yaqiangz/202405_dhcpmon_bootp (2 minutes ago) [bingwang-ms]
* 5c98fd5 - Fix counting bootp packets by mistake (sonic-net#31) (10 hours ago) [Yaqiang Zhu]
```
#### How I did it
#### How to verify it
#### Description for the changelog
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Why I did it
Cherry-pick PR sonic-net#22849 to update the Nokia PMON submodule
Update Nokia sonic-platform submodule which includes the commits in branch 202405 and 202503.
Include commits:
05abbf6 [IXR7220-D4] Add port leds functionality
d4f4e4d Update Fan Drawer index in cpld and fix fan target speed
4800083 [mackinac] warnings in general build
c5b3a14 [mackinac] adding prom programming spidev; incidental c++ changes without functional impact
fb37c5a [mackinac] working drivers, pcon, sets devices
0c56adf [x3b]Change access permissions for syseeprom
30cbed3 Using PcieUtil utility to check PCIE status
2b41e41 [x1b] modprobe.d/cpuctl.conf
f234d5a [x3b] wait for pcon driver sysfs ready
054d682 [x3b]Fix PSU status check issue (sonic-net#31)
f6cb50e [X1b] Add support for Nokia X1b platform (sonic-net#30)
921f9dd Adds CI to build the debian (sonic-net#29)
7728ef2 [x4][x1b] consolidating shared cpuctl.ko source code from working x3b version
9f73cf4 Fix the reboot-cause fro upgrading from MFG image
7e057f9 [x3b]Update PSU code to adapt the I2C driver modification
c64aba4 Fixed Watchdog and Others reboot-cause
39215bf moving platform_init script output into journal/syslog
4755411 [x3b] combined write/read
3a13b63 Adding bridge code for x3b x1b x4
53a0696 [x3b]Update fan module and thermal algorithm
8052488 [x3b] adds spi bus
0aac79f [x3b]Fix and update fan and thermal modules
169e0d8 Fix reboot-cause for Kernel Panic when kudmp is enabled
dd003e1 [IXR7220-D4] FW Upgrades Support
e143b5f Revert "Reduce traffic loss when the IMM reboots ungracefully"
f7eec2c Revert "Add dependency for IMM ungracefyl reboot service"
b345006 [Chassis] Conditionalize stuffing QFPGA into reset based on kernel AER setting
4652166 [Chassis] Delete FP ports shutdown at LC ungraceful reset time

Work item tracking
Microsoft ADO (number only):
How I did it
Update Nokia sonic-platform submodule which includes the commits in branch 202405 and 202503.
Include commits:
05abbf6 [IXR7220-D4] Add port leds functionality
d4f4e4d Update Fan Drawer index in cpld and fix fan target speed
4800083 [mackinac] warnings in general build
c5b3a14 [mackinac] adding prom programming spidev; incidental c++ changes without functional impact
fb37c5a [mackinac] working drivers, pcon, sets devices
0c56adf [x3b]Change access permissions for syseeprom
30cbed3 Using PcieUtil utility to check PCIE status
2b41e41 [x1b] modprobe.d/cpuctl.conf
f234d5a [x3b] wait for pcon driver sysfs ready
054d682 [x3b]Fix PSU status check issue (sonic-net#31)
f6cb50e [X1b] Add support for Nokia X1b platform (sonic-net#30)
921f9dd Adds CI to build the debian (sonic-net#29)
7728ef2 [x4][x1b] consolidating shared cpuctl.ko source code from working x3b version
9f73cf4 Fix the reboot-cause fro upgrading from MFG image
7e057f9 [x3b]Update PSU code to adapt the I2C driver modification
c64aba4 Fixed Watchdog and Others reboot-cause
39215bf moving platform_init script output into journal/syslog
4755411 [x3b] combined write/read
3a13b63 Adding bridge code for x3b x1b x4
53a0696 [x3b]Update fan module and thermal algorithm
8052488 [x3b] adds spi bus
0aac79f [x3b]Fix and update fan and thermal modules
169e0d8 Fix reboot-cause for Kernel Panic when kudmp is enabled
dd003e1 [IXR7220-D4] FW Upgrades Support
e143b5f Revert "Reduce traffic loss when the IMM reboots ungracefully"
f7eec2c Revert "Add dependency for IMM ungracefyl reboot service"
b345006 [Chassis] Conditionalize stuffing QFPGA into reset based on kernel AER setting
4652166 [Chassis] Delete FP ports shutdown at LC ungraceful reset time

Signed-off-by: mlok <marty.lok@nokia.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…sonic-net#21818)

#### Why I did it
src/dhcpmon
```
* 2519a88 - (HEAD -> 202411, origin/202411) Merge pull request sonic-net#34 from yaqiangz/202411_dhcpmon_bootp (2 days ago) [Kumaresh Perumal]
* 3e58f23 - Fix counting bootp packets by mistake (sonic-net#31) (3 days ago) [Yaqiang Zhu]
```
#### How I did it
#### How to verify it
#### Description for the changelog
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…sonic-net#21799)

#### Why I did it
src/dhcpmon
```
* 4ea0936 - (HEAD -> 202311, origin/202311) Merge pull request sonic-net#32 from yaqiangz/202311_dhcpmon_bootp (9 hours ago) [Ying Xie]
* 936cb42 - Fix counting bootp packets by mistake (sonic-net#31) (20 hours ago) [Yaqiang Zhu]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants