-
Notifications
You must be signed in to change notification settings - Fork 543
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
Swss Changes to Support Static Lag #2486
base: master
Are you sure you want to change the base?
Swss Changes to Support Static Lag #2486
Conversation
1. swss handles --static flag and corresponding invokes teamd instance with loadbalance as the option. Test cases :- Test cases 1 Create static port channel with static flag pass 2 verify static has option flag true or false pass 3 Add static member see the portchannel is up pass 4 verify teamd is created with loadbalance option by default pass 5 Remove last portchannel member check port channel down pass 6 Remove portchannel member check port channel still up pass 7 verify teamdctl config dump pass 8 verify teamdctl state dump pass 9 shutdown the portchannel check the kernel state pass 10 no shutdown the portchannel check the kernel state pass 11 "Check the show output matches the review comment root@sonic:~# show inter port Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports ----- ------------ ----------- ------------ 1 PortChannel1 NONE(A)(Up) Ethernet0(S) 2 PortChannel2 NONE(A)(Up) Ethernet8(S) 4 PortChannel4 NONE(A)(Dw) " pass 12 teamnl is set to loadbalance pass 13 save and reload and verify portchannel is up pass 14 "docker restart teamd teamd stopped swss stopped syncd stopped swss started syncd started teamd started" pass 15. verify teamd settles doesnt hog cpu with 100% cpu usage pass
@judyjoseph can you please help to review this PR? Thanks. |
<< "\"hwaddr\":\"" << mac_boot.to_string() << "\"," | ||
<< "\"runner\":{" | ||
<< "\"name\":\"loadbalance\""; | ||
|
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.
loadbalance == static? wouldn't it be better to name it static (or some variation of it)?
|
||
HashOfRecords m_storage; // our main storage | ||
const swss::DBConnector * m_db; | ||
|
||
const std::vector<std::pair<std::string, ValuesStore::json_type>> m_lag_paths = { | ||
{ "setup.runner_name", ValuesStore::json_type::string }, | ||
{ "setup.kernel_team_mode_name", ValuesStore::json_type::string }, |
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.
This means that existing configuration (json files) will have to change to accommodate for this new static lag?
Isn't there another way, for example have the LACP to be default, and have no runner name
and only for static lag config we'll have this "Static" runner name
What I did
Static lag support changes in SWSS module
sonic-net/SONiC#1039
other dependent pull request
Why I did it
How I verified it
Test cases
1 Create static port channel with static flag pass
2 verify static has option flag true or false pass
3 Add static member see the portchannel is up pass
4 verify teamd is created with loadbalance option by default pass
5 Remove last portchannel member check port channel down pass
6 Remove portchannel member check port channel still up pass
7 verify teamdctl config dump pass
8 verify teamdctl state dump pass
9 shutdown the portchannel check the kernel state pass
10 no shutdown the portchannel check the kernel state pass
11 "Check the show output matches the review comment
root@sonic:~# show inter port
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
S - selected, D - deselected, * - not synced
No. Team Dev Protocol Ports
" pass
12 teamnl is set to loadbalance pass
13 save and reload and verify portchannel is up pass
14 "docker restart teamd
teamd stopped
swss stopped
syncd stopped
swss started
syncd started
teamd started" pass
16 verify teamd settles doesnt hog cpu with 100% cpu usage pass
Details if related
Libteam change pull request - sonic-net/sonic-buildimage#12360