-
Notifications
You must be signed in to change notification settings - Fork 529
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
Update ECMP NHopGroup for Port Channel oper down #1030
Conversation
on detecting portchannel down
@sumukhatv , would need to add a VS test for this change |
1. Add 4 PortChannels 2. Add to nexthop group
after bringing down a portchannel
tbl = swsscommon.Table(self.cdb, "PORTCHANNEL") | ||
fvs = swsscommon.FieldValuePairs([("admin_status", "up"),("mtu", "9100"),("oper_status", "up")]) | ||
|
||
tbl.set("PortChannel001", fvs) |
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 see that there is code repetition. If you can create a list of Portchannels and call function to do set, del operation, it will simplify and reduce the code. Just a suggestion.
tbl._del("PortChannel002") | ||
tbl._del("PortChannel003") | ||
tbl._del("PortChannel004") | ||
time.sleep(1) |
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.
Restore eth0 up. If test_port.py follows this test, we got persistent test failure.
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.
@wendani , would you please provide the fix?
What I did
Remove nexthop member from nexthop group immediately when port-channel oper status becomes down
Why I did it
This will reduce the response time for port-channel down event thus helping prevent packet drops
How I verified it
Details if related
Timeline of events on a DUT immediately after bringing down a portchannel:
21:20:51 Updated NextHop group to 3 members
21:20:52 First v4 route update
21:21:13 Last v4 route update
21:21:13 4 member NextHop group deleted (v4)
21:21:13 3 member NextHop group created (v6)
21:21:13 First v6 route update
21:21:16 Last v6 route update