Skip to content

[fast-reboot] Fix fast-reboot when NDP entries are present #1295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 8, 2020
Merged

[fast-reboot] Fix fast-reboot when NDP entries are present #1295

merged 2 commits into from
Dec 8, 2020

Conversation

shlomibitton
Copy link
Contributor

Signed-off-by: Shlomi Bitton [email protected]

- What I did
Fast-reboot failed to execute when NDP entries are present in the DB.
The split() function used with a delimiter ':' is not limited.
IPv6 address contains ':' delimiter causing it to create an object unsuitable for a tuple.
This is causing an exception.

- How I did it
Limit the split() function to 2 splits, forcing the IPv6 address to stay the same and create a proper tuple.

- How to verify it
Inject NDP entries on a L3 interface and try to run "fast-reboot -v" command.

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

- Previous command output (if the output of a command-line utility has changed)

root@r-qa-sw-eth-20162:/home/admin# fast-reboot -v
Mon Dec 7 15:37:02 UTC 2020 Prepare MLNX ASIC to fast-reboot: install new FW if required
Traceback (most recent call last):
File "/usr/bin/filter_fdb_entries", line 12, in
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/fdbutil/filter_fdb_entries.py", line 153, in main
filter_fdb_entries(fdb_filename, arp_filename, config_db_filename, backup_file)
File "/usr/lib/python2.7/dist-packages/fdbutil/filter_fdb_entries.py", line 90, in filter_fdb_entries
arp_map = get_arp_entries_map(arp_filename, config_db_filename)
File "/usr/lib/python2.7/dist-packages/fdbutil/filter_fdb_entries.py", line 66, in get_arp_entries_map
table, vlan, ip = tuple(key.split(':'))
ValueError: too many values to unpack
Failed to filter FDb entries. Exit code: 1
Mon Dec 7 15:37:03 UTC 2020 fast-reboot failure (13) cleanup ...

- New command output (if the output of a command-line utility has changed)

root@r-qa-sw-eth-20162:/home/admin# fast-reboot -v
Mon Dec 7 15:46:38 UTC 2020 Prepare MLNX ASIC to fast-reboot: install new FW if required
Mon Dec 7 15:46:58 UTC 2020 Stopping nat ...
Mon Dec 7 15:46:59 UTC 2020 Stopped nat ...
Mon Dec 7 15:46:59 UTC 2020 Stopping radv ...
Mon Dec 7 15:46:59 UTC 2020 Stopping bgp ...
Mon Dec 7 15:46:59 UTC 2020 Stopped bgp ...
Mon Dec 7 15:47:00 UTC 2020 Stopping teamd ...
Mon Dec 7 15:47:01 UTC 2020 Stopped teamd ...
Mon Dec 7 15:47:20 UTC 2020 Stopping syncd ...
Mon Dec 7 15:47:20 UTC 2020 Stopped syncd ...
Mon Dec 7 15:47:20 UTC 2020 Stopping all remaining containers ...
Warning: Stopping telemetry.service, but it can still be activated by:
telemetry.timer
Mon Dec 7 15:47:21 UTC 2020 Stopped all remaining containers ...
Mon Dec 7 15:47:23 UTC 2020 Enabling Watchdog before fast-reboot
Watchdog armed for 180 seconds
Mon Dec 7 15:47:24 UTC 2020 Rebooting with /sbin/kexec -e to SONiC-OS-201911.36-dirty-20201206.142959 ...

Shlomi Bitton and others added 2 commits December 7, 2020 17:56
The IPv6 address delimiter ':' caused an exception

Signed-off-by: Shlomi Bitton <[email protected]>
@liat-grozovik
Copy link
Collaborator

test failures related to dpb, not related to this fix.
@shlomibitton please update submodule once merged.

@liat-grozovik liat-grozovik merged commit 2f263c4 into sonic-net:master Dec 8, 2020
@keboliu
Copy link
Collaborator

keboliu commented Dec 10, 2020

@abdosi would you please help to cherry-pick?

abdosi pushed a commit that referenced this pull request Dec 10, 2020
* Fix fast-reboot when NDP present
The IPv6 address delimiter ':' caused an exception

Signed-off-by: Shlomi Bitton <[email protected]>

* Add a comment
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
…#1295)

* Fix fast-reboot when NDP present
The IPv6 address delimiter ':' caused an exception

Signed-off-by: Shlomi Bitton <[email protected]>

* Add a comment
@shlomibitton shlomibitton deleted the shlomi_fast_reboot_fix branch March 24, 2021 20:41
vaibhavhd added a commit that referenced this pull request Apr 5, 2021
Fix fast-reboot fdb-filtering issue for IPv6 addresses.
This change is already present in master branch. Original PR: #1295 
Update 201811 branch with this fix.
yxieca pushed a commit that referenced this pull request Apr 8, 2021
* Fix fast-reboot when NDP present
The IPv6 address delimiter ':' caused an exception

Signed-off-by: Shlomi Bitton <[email protected]>

* Add a comment
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
ccb5245 (HEAD -> 201911, origin/201911) [fast-reboot] Fix fast-reboot when NDP entries are present (sonic-net#1295)
d09667b Multi-ASIC support for show ip(v6) route (201911 branch) (sonic-net#1283)
28399bf [201911-Mellanox] SKU creator Tool (sonic-net#1163) (sonic-net#1250)

Signed-off-by: Abhishek Dosi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants