Skip to content

Handling error scenario of adding port to Vlan which is part of LAG#1516

Merged
prsunny merged 2 commits intosonic-net:masterfrom
dgsudharsan:vlan_lag_mem_fix
Mar 23, 2021
Merged

Handling error scenario of adding port to Vlan which is part of LAG#1516
prsunny merged 2 commits intosonic-net:masterfrom
dgsudharsan:vlan_lag_mem_fix

Conversation

@dgsudharsan
Copy link
Copy Markdown
Collaborator

What I did

Handled error scenario when adding a port to Vlan which is already part of a LAG. Added unit test to cover the scenario. This is fix for the bug sonic-net/sonic-buildimage#4456

How I did it

Fixed the config vlan script to check if port is a port channel member before setting config_db

How to verify it

config vlan add 10
config portchannel add PortChannel0
config portchannel member add PortChannel0 Ethernet0
config vlan member add 10 Ethernet0

Usage: config vlan member add [OPTIONS] port
Try "config vlan member add -h" for help.

Error: Ethernet0 is part of portchannel!

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)

Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
Handled error scenario when adding a port to Vlan which is already part
of a LAG

Fixed the config vlan script to check if port is a port channel member
before setting config_db

config vlan add 10
config portchannel add PortChannel0
config portchannel member add PortChannel0 Ethernet0
config vlan member add 10 Ethernet0

Usage: config vlan member add [OPTIONS] <vid> port
Try "config vlan member add -h" for help.

Error: Ethernet0 is part of portchannel!
@dgsudharsan
Copy link
Copy Markdown
Collaborator Author

Please backport it to 202012 and other required releases.

@dgsudharsan dgsudharsan changed the title Vlan lag mem fix Handling error scenario of adding port to Vlan which is part of LAG #1 Mar 19, 2021
@dgsudharsan dgsudharsan changed the title Handling error scenario of adding port to Vlan which is part of LAG #1 Handling error scenario of adding port to Vlan which is part of LAG Mar 19, 2021
@dgsudharsan
Copy link
Copy Markdown
Collaborator Author

retest vs please

@dgsudharsan
Copy link
Copy Markdown
Collaborator Author

retest this please

1 similar comment
@dgsudharsan
Copy link
Copy Markdown
Collaborator Author

retest this please

@prsunny prsunny merged commit bf46638 into sonic-net:master Mar 23, 2021
yxieca pushed a commit that referenced this pull request Mar 26, 2021
…1516)

*Handled error scenario when adding a port to Vlan which is already part of a LAG. Added unit test to cover the scenario. This is fix for the bug sonic-net/sonic-buildimage#4456

Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
756dd9c8123cd06dc581d9b2eb236334deee1850 (HEAD -> 201911, origin/201911)
[201911 sonic-swss] Flushing FDB entries before removing BridgePort (sonic-net#1516)
e3f22ea6685104a819440ecc0efe89c4bd3a0003 [201911/portsorch] Add
correct stat list for port buffer drop counters (sonic-net#1509)

Signed-off-by: Abhishek Dosi <[email protected]>
@dgsudharsan dgsudharsan deleted the vlan_lag_mem_fix branch March 9, 2023 02:05
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.

3 participants