-
Notifications
You must be signed in to change notification settings - Fork 681
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
[fast-reboot]: Fix fail to execute fast-reboot problem #1047
[fast-reboot]: Fix fail to execute fast-reboot problem #1047
Conversation
* Fix the fast-reboot-dump.py error when it try to use inet_aton to translate ipv6 address * Add send_ndp as TODO in fast-reboot-dump.py to ipv6 target
Thanks @kuanyu99 for your effort. Can you please add some details about the error that was seen during fast-reboot? |
Hi Tahmed, |
This pull request introduces 1 alert when merging 2fe3c55dd43388d7e7e725710bf790747ebad96a into d5fdd74 - view on LGTM.com new alerts:
|
* Use ipaddress to check if address is ipv4 address
55328e3
to
3401616
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Thanks!
Is this needed for 201911? |
* Fix the fast-reboot-dump.py error when it try to use inet_aton to translate ipv6 address * Add send_ndp as TODO in fast-reboot-dump.py to ipv6 target
arp_output.append(obj) | ||
|
||
ip_addr = key.split(':')[2] | ||
if ipaddress.ip_interface(ip_addr).ip.version != 4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This is a necessary modification in 201911 to handle IPv6 entries.
But there is some problem using the ipaddress.ip_interface(ip_addr).ip.version
to parse it.
From my opinion, I will consider using some simple checking like
if '.' not in ip_addr:
If no '.' inside the ip_addr, it is a IPv6 address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we identified there is problem with script, why is it taken to 201911? @qiluo-msft, @tahmed-dev, @abdosi . This is breaking the 201911 fastboot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prsunny Do you have a Github issue? Are you suggesting revert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will suggest replace the line if ipaddress.ip_interface(ip_addr).ip.version != 4:
with this line if '.' not in ip_addr:
to handle the IPv6 entries. And also fix the problem here.
Simple is powerful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking with @bingwang-ms to see if this can be cherry-picked - #1164
ad9022e (HEAD -> 201911, origin/201911) Reduce time taken by show commands on multi-asic platforms (sonic-net#1544) 4993a36 [fast-reboot]: Fix fail to execute fast-reboot problem (sonic-net#1047) Signed-off-by: Abhishek Dosi <[email protected]>
- What I did
Try to fix fast-reboot function from error
- How I did it
Separate IPv4 and IPv6 neighbor address when fast-reboot try to send ARP to them
- How to verify it
Make it learn some IPv6 neighbor address and ask it to fast-reboot. It should not return error.
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)
- Error log during executing fast-reboot