Skip to content
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

[master] fix del portchannel but vlan_member still contain portchannel #1220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tim-rj
Copy link
Contributor

@tim-rj tim-rj commented Nov 6, 2020

Signed-off-by: tim-rj sonic_rd@ruijie.com.cn

- What I did
fix sonic-net/sonic-buildimage#5456
- How I did it
remove portchannel in VLAN_MEMBER table together when del a portchannel
- How to verify it

config del portchannel xxx
show vlan brief
show vlan configure

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

root@sonic:/home/admin# config portchannel del PortChannel0001
root@sonic:/home/admin#
root@sonic:/home/admin#
root@sonic:/home/admin# show vlan brief
+-----------+--------------+-----------------+----------------+-----------------------+
|   VLAN ID | IP Address   | Ports           | Port Tagging   | DHCP Helper Address   |
+===========+==============+=================+================+=======================+
|         2 | 12.1.1.1/16  | Ethernet1       | tagged         | 100.100.1.1           |
|           | 12::1/64     | PortChannel0001 | untagged       |                       |
+-----------+--------------+-----------------+----------------+-----------------------+

root@sonic:/home/admin# show vlan config
Name      VID  Member           Mode
------  -----  ---------------  --------
Vlan2       2  PortChannel0001  untagged
Vlan2       2  Ethernet1        tagged


root@sonic:/home/admin# show interfaces  portchannel
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev         Protocol     Ports
-----  ---------------  -----------  -------------
 0002  PortChannel0002  LACP(A)(Dw)  Ethernet2(D)
 0003  PortChannel0003  LACP(A)(Dw)  Ethernet3(D)
 0004  PortChannel0004  LACP(A)(Dw)  Ethernet4(D)
 0005  PortChannel0005  LACP(A)(Dw)  N/A
 0023  PortChannel0023  LACP(A)(Dw)  Ethernet23(D)
 0024  PortChannel0024  LACP(A)(Up)  Ethernet24(S)
 0025  PortChannel0025  LACP(A)(Up)  Ethernet25(S)
 0026  PortChannel0026  LACP(A)(Up)  Ethernet26(S)
 0027  PortChannel0027  LACP(A)(Up)  Ethernet27(S)
 0028  PortChannel0028  LACP(A)(Up)  Ethernet28(S)
 0029  PortChannel0029  LACP(A)(Up)  Ethernet29(S)
 0030  PortChannel0030  LACP(A)(Up)  Ethernet30(S)
 0031  PortChannel0031  LACP(A)(Up)  Ethernet31(S)
 0032  PortChannel0032  LACP(A)(Up)  Ethernet32(S)
 0033  PortChannel0033  LACP(A)(Up)  Ethernet33(S)
 0034  PortChannel0034  LACP(A)(Up)  Ethernet34(S)
 0035  PortChannel0035  LACP(A)(Up)  Ethernet35(S)
 0036  PortChannel0036  LACP(A)(Up)  Ethernet36(S)


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

root@sonic:/home/admin# config portchannel del PortChannel0001
root@sonic:/home/admin# show vlan brief
+-----------+--------------+-----------+----------------+-----------------------+
|   VLAN ID | IP Address   | Ports     | Port Tagging   | DHCP Helper Address   |
+===========+==============+===========+================+=======================+
|         2 | 12.1.1.1/16  | Ethernet1 | tagged         | 100.100.1.1           |
|           | 12::1/64     |           |                |                       |
+-----------+--------------+-----------+----------------+-----------------------+
root@sonic:/home/admin# show vlan config
Name      VID  Member     Mode
------  -----  ---------  ------
Vlan2       2  Ethernet1  tagged
root@sonic:/home/admin# show interfaces portchannel
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev         Protocol     Ports
-----  ---------------  -----------  -------------
 0002  PortChannel0002  LACP(A)(Dw)  Ethernet2(D)
 0003  PortChannel0003  LACP(A)(Dw)  Ethernet3(D)
 0004  PortChannel0004  LACP(A)(Dw)  Ethernet4(D)
 0005  PortChannel0005  LACP(A)(Dw)  N/A
 0023  PortChannel0023  LACP(A)(Dw)  Ethernet23(D)
 0024  PortChannel0024  LACP(A)(Up)  Ethernet24(S)
 0025  PortChannel0025  LACP(A)(Up)  Ethernet25(S)
 0026  PortChannel0026  LACP(A)(Up)  Ethernet26(S)
 0027  PortChannel0027  LACP(A)(Up)  Ethernet27(S)
 0028  PortChannel0028  LACP(A)(Up)  Ethernet28(S)
 0029  PortChannel0029  LACP(A)(Up)  Ethernet29(S)
 0030  PortChannel0030  LACP(A)(Up)  Ethernet30(S)
 0031  PortChannel0031  LACP(A)(Up)  Ethernet31(S)
 0032  PortChannel0032  LACP(A)(Up)  Ethernet32(S)
 0033  PortChannel0033  LACP(A)(Up)  Ethernet33(S)
 0034  PortChannel0034  LACP(A)(Up)  Ethernet34(S)
 0035  PortChannel0035  LACP(A)(Up)  Ethernet35(S)
 0036  PortChannel0036  LACP(A)(Up)  Ethernet36(S)
root@sonic:/home/admin# config portchannel del PortChannel0005
root@sonic:/home/admin# show vlan brief
+-----------+--------------+-----------+----------------+-----------------------+
|   VLAN ID | IP Address   | Ports     | Port Tagging   | DHCP Helper Address   |
+===========+==============+===========+================+=======================+
|         2 | 12.1.1.1/16  | Ethernet1 | tagged         | 100.100.1.1           |
|           | 12::1/64     |           |                |                       |
+-----------+--------------+-----------+----------------+-----------------------+


Signed-off-by: tim-rj <sonic_rd@ruijie.com.cn>
@tim-rj
Copy link
Contributor Author

tim-rj commented Jan 12, 2021

any one help forward?

@pettershao-ragilenetworks
Copy link
Contributor

help forward this, thanks!

@lguohan
Copy link
Contributor

lguohan commented Apr 9, 2021

please add unit test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to delete LAG when it is a member of a vlan
3 participants