Skip to content

[advanced-reboot] The destination IP address of the packet chosen by the ansible script match static route of vlan100 sometimes, which will result in the error.#1607

Open
sean-lang wants to merge 3 commits intosonic-net:masterfrom
sean-lang:advanced-reboot
Open

Conversation

@sean-lang
Copy link

@sean-lang sean-lang commented Apr 24, 2020

Description of PR

Summary:
Fix IP range overlapping. One of dataplane traffic is sent from VLAN interfaces to portchannel ports. The destination IP address of the packet is chosen randomly from the default_ip_range subnet:. The found that destination IP address traffic chosen by the ansible script match static route of vlan100 sometimes, which will result in the error.

test log :
"2020-03-27 17:52:27 : Test params:",
"2020-03-27 17:52:27 : DUT ssh: admin@10.250.0.191",
"2020-03-27 17:52:27 : DUT reboot limit in seconds: 0:00:01",
"2020-03-27 17:52:27 : DUT mac address: 80:a2:35:46:09:99",
"2020-03-27 17:52:27 : From server src addr: 192.168.0.99",
"2020-03-27 17:52:27 : From server src port: 24",
"2020-03-27 17:52:27 : From server dst addr: 192.168.4.40",
"2020-03-27 17:52:27 : From server dst ports: [28, 30, 29, 31]",
"2020-03-27 17:52:27 : From upper layer number of packets: 500",

Dut IP setting :
root@as7816-64x:~# show ip interface
Interface IPv4 address/mask Admin/Oper
--------------- ------------------- ------------
PortChannel0001 10.0.0.56/31 up/up
PortChannel0002 10.0.0.58/31 up/up
PortChannel0003 10.0.0.60/31 up/up
PortChannel0004 10.0.0.62/31 up/up
Vlan1000 192.168.0.1/21 up/up
docker0 240.127.1.1/24 up/down
eth0 10.250.0.196/16 up/up
lo 127.0.0.1/8 up/up
10.1.0.32/32

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

How did you do it?

Fixed rodan choosen IP issue.
skip subnet of vlan1000.
Modify the algorithm to choose the destination IP from the given route entries in the fib database.
The generate dst_ip flow is shown below.
1.Traverse through all of the route entries in the fib and keep the route entries with the desired next hop in a list
2.Emits an error when the list created in the Step 1 is empty.
3.Choose a route entry randomly from the list created in the Step 1.
4.Choose a ip based on the route entry chosen in the Step 3.

How did you verify/test it?

Ran the warm-reboot, fast-reboot,warm-reboot-sad-vlan-port and warm-reboot-sad-lag-member test on t0/t0-64 topology and it passed. Check the destination IP address of the from server to T1 traffic in test logs not match static route of vlan1000.

Ran the others warm-reboot-sad-xxx and test item on t0/t0-64 topology. Check the destination IP address of the from server to T1 traffic in test logs not match static route of vlan1000.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…the ansible script match static route of vlan1000 sometimes, which will result in the error.

One of dataplane traffic is sent from vlan interfaces to portchannel ports. The destination IP address of the packet is chosen randomly from valid choices. The found that destination IP address traffic chosen by the ansible script match static route of vlan1000 sometimes, which will result in the error.

Modify the algorithm to choose the destination IP from the given route entries in the fib database.
1.Traverse through all of the route entries in the fib and keep the route entries with the desired next hop in a list
2.Emits an error when the list created in the Step 1 is empty.
3.Choose a route entry randomly from the list created in the Step 1.
4.Choose a ip based on the route entry chosen in the Step 3.
@msftclas
Copy link

msftclas commented Apr 24, 2020

CLA assistant check
All CLA requirements met.

@lgtm-com
Copy link

lgtm-com bot commented Apr 24, 2020

This pull request introduces 1 alert when merging 78fac16 into 1aa76ea - view on LGTM.com

new alerts:

  • 1 for Module is imported more than once

…the ansible script match static route of vlan1000 sometimes, which will result in the error.(sonic-net#1607)

Fix random module is imported more than once.
@msosyak
Copy link
Contributor

msosyak commented Apr 24, 2020

As I see there is PyTest implementation of reboot tests https://github.com/Azure/sonic-mgmt/blob/master/tests/platform/test_advanced_reboot.py
Should we still run & support the ansible version? Or maybe it is better to switch to PyTest version.

@gord1306
Copy link
Contributor

From my personal perspective, if there is useful logic that can be migrated to the pytest, I think it still worth to patch it.

@yxieca
Copy link
Collaborator

yxieca commented May 12, 2020

@sean-lang can you solve the merge conflict?

@sean-lang
Copy link
Author

@sean-lang can you solve the merge conflict?
Fixed it.

Copy link
Contributor

@tahmed-dev tahmed-dev left a comment

Choose a reason for hiding this comment

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

Thanks for you contribution. We are moving away from Ansible version, can you also please update the pytest test case as well.

when: testbed_type in ['t0', 't0-56', 't0-64', 't0-116', 't0-64-32']

# Generate route file
- name: Generate route-port map information
Copy link
Contributor

Choose a reason for hiding this comment

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

can you also please update the pytest version of this test case? Similar template work is done here. The paramter to the ptfrunner is here

@sean-lang sean-lang requested a review from a team as a code owner March 2, 2022 17:37
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
- swss:
* 459d09b 2021-02-22 | [acl] Enable VLAN ID qualifier for ACL rules (sonic-net#1648) (HEAD -> 202012) [Danny Allen]
* 60859b1 2021-02-08 | [buffermgr] Support maximum port headroom checking (sonic-net#1607) [Stephen Sun]
* 3161cbb 2021-02-17 | Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group (sonic-net#1600) [Andriy Yurkiv]
* 256ed9c 2021-02-08 | Support shared headroom pool on top of dynamic buffer calculation (sonic-net#1581) [Stephen Sun]

- utilities:
* 30d7069 2021-02-16 | [decode-syseeprom] Refactor to utilize sonic-platform package (sonic-net#1435) (HEAD -> 202012, tag: foo) [Joe LeVeque]
* 891fef4 2021-02-16 | [psuutil] Refactor to utilize sonic-platform package (sonic-net#1434) [Joe LeVeque]
* 8c5e505 2021-02-17 | [sfputil] Refactor to utilize sonic-platform package (sonic-net#1421) [Joe LeVeque]
* ca5dd2c 2021-02-17 | [sfpshow] Cleanup (sonic-net#1405) [Joe LeVeque]
* bf489ea 2021-02-17 | Add new cli for SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter in counterpoll utility (sonic-net#1355) [Andriy Yurkiv]
* 25feed3 2021-02-08 | Support shared headroom pool on top of dynamic buffer calculation (sonic-net#1348) [Stephen Sun]
* aaa323a 2021-02-02 | [vrf]: Fix freezing during interface binding (sonic-net#1325) [maksymbelei95]
* cc0bb6e 2021-01-27 | [show] fix "show interfaces breakout" command (sonic-net#1198) [Dmytro Shevchuk]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
utilities:
* 83f068b 2021-03-22 | Handling error scenario of adding port to Vlan which is part of LAG (sonic-net#1516) (HEAD -> 202012) [Sudharsan Dhamal Gopalarathnam]
* 470e8ce 2021-03-24 | Enable PFCWD only on ports where PFC is enabled (sonic-net#1508) [Andriy Yurkiv]
* 09ef2e0 2021-03-22 | [show][config] add support for setting and displaying switching modes on Y cable (sonic-net#1501) [vdahiya12]
* 0d17d37 2021-03-24 | Warmboot script improvements - timeout exec, disable swss autorestart, remove trap (sonic-net#1495) [Vaibhav Hemant Dixit]
* 2718cd8 2021-03-24 | [show] Fix int status of LAGs, configured as Vlan members (sonic-net#1478) [maksymbelei95]
* cc168fb 2021-03-22 | Fix bug: show vlan config for vlan with no members (sonic-net#1503) [allas-nvidia]

swss:
* 5d8d1fb 2021-03-26 | Revert "Revert "[buffermgr] Support maximum port headroom checking (sonic-net#1607)" (sonic-net#1675)" (sonic-net#1682) (HEAD -> 202012) [Prince Sunny]
* f8df1f8 2021-03-26 | [Dynamic Buffer Calc] Enhance the field checking in table handling (sonic-net#1680) [Stephen Sun]
* 6328c9f 2021-03-22 | [MuxOrch] FDB ageout safety check (sonic-net#1674) [Prince Sunny]
* e1d733e 2021-03-21 | reduce severity of log to info in case of flush on non-existing member (sonic-net#1669) [allas-nvidia]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
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.

7 participants