Skip to content

[fast-reboot]: Fix IP range overlapping#1629

Merged
liat-grozovik merged 1 commit intosonic-net:201811from
nazariig:201811-fast-reboot-fix
May 7, 2020
Merged

[fast-reboot]: Fix IP range overlapping#1629
liat-grozovik merged 1 commit intosonic-net:201811from
nazariig:201811-fast-reboot-fix

Conversation

@nazariig
Copy link
Contributor

Signed-off-by: Nazarii Hnydyn nazariig@mellanox.com

Description of PR

Summary:

Fast-Reboot test uses random generator to pick up an arbitrary IP address from the default_ip_range subnet:
https://github.com/Azure/sonic-mgmt/blob/201811/ansible/roles/test/files/ptftests/advanced-reboot.py#L504
Sometimes it may overlap with the DUT VLAN IP subnet which will result in packet drops:

root@6aad39fed86f:~# ./run.sh
WARNING: No route found for IPv6 destination :: (no default route?)
advanced-reboot.ReloadTest ... 2020-04-29 16:04:44 : Converted addresses VMs: ['10.9.78.183', '10.9.78.182', '10.9.78.181', '10.9.78.180']
2020-04-29 16:04:44 : Test params:
2020-04-29 16:04:44 : DUT ssh: admin@sonic
2020-04-29 16:04:44 : DUT reboot limit in seconds: 0:00:30
2020-04-29 16:04:44 : DUT mac address: 7c:fe:90:f5:36:40
2020-04-29 16:04:44 : From server src addr: 192.168.1.214
2020-04-29 16:04:44 : From server src port: 15
2020-04-29 16:04:44 : From server dst addr: 192.168.7.69
2020-04-29 16:04:44 : From server dst ports: [28, 30, 29, 31]
2020-04-29 16:04:44 : From upper layer number of packets: 500
2020-04-29 16:04:44 : VMs: ['10.9.78.183','10.9.78.182','10.9.78.181','10.9.78.180']
2020-04-29 16:04:44 : Disabling arp_responder

DUT IP config:

root@sonic:/home/admin# show ip interfaces
Interface        IPv4 address/mask    Admin/Oper
---------------  -------------------  ------------
PortChannel0001  10.0.0.56/31         up/down
PortChannel0002  10.0.0.58/31         up/down
PortChannel0003  10.0.0.60/31         up/down
PortChannel0004  10.0.0.62/31         up/down
Vlan1000         192.168.0.1/21       up/down
docker0          240.127.1.1/24       up/down
eth0             10.9.74.46/24        up/up
lo               127.0.0.1/8          up/up
                 10.1.0.32/32

VLAN IP:

Address:   192.168.0.1           11000000.10101000.00000 000.00000001
Netmask:   255.255.248.0 = 21    11111111.11111111.11111 000.00000000
Wildcard:  0.0.7.255             00000000.00000000.00000 111.11111111
=>
Network:   192.168.0.0/21        11000000.10101000.00000 000.00000000 (Class C)
Broadcast: 192.168.7.255         11000000.10101000.00000 111.11111111
HostMin:   192.168.0.1           11000000.10101000.00000 000.00000001
HostMax:   192.168.7.254         11000000.10101000.00000 111.11111110
Hosts/Net: 2046                  (Private Internet)

FAST-REBOOT VLAN IP range (old):

Address:   192.168.0.0           11000000.10101000 .00000000.00000000
Netmask:   255.255.0.0 = 16      11111111.11111111 .00000000.00000000
Wildcard:  0.0.255.255           00000000.00000000 .11111111.11111111
=>
Network:   192.168.0.0/16        11000000.10101000 .00000000.00000000 (Class C)
Broadcast: 192.168.255.255       11000000.10101000 .11111111.11111111
HostMin:   192.168.0.1           11000000.10101000 .00000000.00000001
HostMax:   192.168.255.254       11000000.10101000 .11111111.11111110
Hosts/Net: 65534                 (Private Internet)

FAST-REBOOT VLAN IP range (new):

Address:   192.168.100.0         11000000.10101000.01 100100.00000000
Netmask:   255.255.192.0 = 18    11111111.11111111.11 000000.00000000
Wildcard:  0.0.63.255            00000000.00000000.00 111111.11111111
=>
Network:   192.168.64.0/18       11000000.10101000.01 000000.00000000 (Class C)
Broadcast: 192.168.127.255       11000000.10101000.01 111111.11111111
HostMin:   192.168.64.1          11000000.10101000.01 000000.00000001
HostMax:   192.168.127.254       11000000.10101000.01 111111.11111110
Hosts/Net: 16382                 (Private Internet)

Type of change

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

Approach

How did you do it?

  • Fixed default_ip_range subnet

How did you verify/test it?

  1. Run fast-reboot test

Any platform specific information?

  • N/A

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

  • N/A

Documentation

  • N/A

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
- dut_mac='{{ dut_mac }}'
- dut_vlan_ip='192.168.0.1'
- default_ip_range='192.168.0.0/16'
- default_ip_range='192.168.100.0/18'
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 change the fast-reboot script in pytest as well? @tamer-dev, is there a same problem for the pytest version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lguohan same fix for master #1637

Copy link
Contributor

Choose a reason for hiding this comment

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

@lguohan yes, the pytest reboot test has prefix lent of 16. @nazariig can you please modify this file as well:

https://github.com/Azure/sonic-mgmt/blob/master/tests/common/fixtures/advanced_reboot.py#L129

@liat-grozovik liat-grozovik merged commit dd1b923 into sonic-net:201811 May 7, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
sonic-utilities:
* 8b98d45 2021-05-25 | [show] support for show muxcable firmware version of only active banks (sonic-net#1629) (HEAD -> 202012) [vdahiya12]
* afd0975 2021-05-20 | [show] add support for muxcable metrics (sonic-net#1615) [vdahiya12]

sonic-swss
* 7611df5 2021-05-27 | [tunneldecaporch] Set default MTU for the overlay loopback interface (sonic-net#1756) (HEAD -> 202012) [Volodymyr Samotiy]
* 22fbb5c 2021-05-27 | [202012] Resolve neighbor when nexthop does not exist (sonic-net#1759) (github/202012) [Shi Su]
* ec7710c 2021-05-27 | [Bulk mode] Limit the size of bulker (sonic-net#1760) [Shi Su]

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
* 4be4a9b [tlm teamd] Add retry mechanism before logging the ERR in get_dumps. (sonic-net#1629)
* 2c0ce38 [fgnhgorch] Enable packet flow when no FG ECMP neighbors are resolved (sonic-net#1900)
* fddb298 Innovium platform specific changes PFC Detect lua script for SONiC 202012 (sonic-net#1893)

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
sonic-swss:

bb69ca2 [portsorch] Avoid orchagent crash when set invalid interface types to port (sonic-net#1906)
6e1bacc [pfcwd] Fix the polling interval time granularity (sonic-net#1912)
564785b [teammgrd]: Improve LAGs cleanup on shutdown: send SIGTERM directly to PID. (sonic-net#1841)
7ee8d26 [tlm teamd] Add retry mechanism before logging the ERR in get_dumps. (sonic-net#1629)
7f57d3d [fgnhgorch] Enable packet flow when no FG ECMP neighbors are resolved (sonic-net#1900)
08d009f Mux state order change (sonic-net#1902)

sonic-utilities:

1bc0f07 Provide support to install platform extensions (sonic-net#1578)
968c781 [config reload] Removed job-mode for sonic.target restart (sonic-net#1820)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…tically (#25609)

#### Why I did it
src/sonic-sairedis
```
* c7a61be0 - (HEAD -> 202511, origin/202511) Fix switch stat counters by using get_stats_ext instead of get_stats (sonic-net#1775) (3 hours ago) [mssonicbld]
* 4f1d7d99 - Revert "Temp workaround for sonic-buildimage issue 23387 (sonic-net#1629)" (sonic-net#1758) (13 hours ago) [mssonicbld]
* 7c5f17d2 - [ci] Install redis from Debian (sonic-net#1778) (24 hours ago) [mssonicbld]
* ec4a54d5 - Fix dash meter COUNTERS_DB keys to use VID instead of RID (sonic-net#1750) (4 days ago) [mssonicbld]
```
#### 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants