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

Missing validation for "config portchannel member add " command in case of adding a port that has already been a member of another portchannel interface. #805

Open
MaxYaremchuk opened this issue Feb 7, 2020 · 2 comments
Labels

Comments

@MaxYaremchuk
Copy link

Description
There should be a verification for config portchannel member add command in case of adding a port that has already been a member of another portchannel interface.

Currently, system just ignore such attempts but puts these new settings to running config.
In case of saving such configurations and performing reboot portchannel interfaces will be inoperable state.

Steps to reproduce the issue
1.Create two portchannel interfaces

# config portchannel add PortChannel0001
# config portchannel add PortChannel0002
  1. Assign a port to PortChannel0001
    # config portchannel member add PortChannel0001 Ethernet48
# 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
-----  ---------------  -----------  -------------
 0001  PortChannel0001  LACP(A)(Up)  Ethernet48(S)
 0002  PortChannel0002  LACP(A)(Dw)  N/A
  1. Assign the same port to other interface portchannel
    # config portchannel member add PortChannel0002 Ethernet48 <== HERE must be the verification.
# 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
  -----  ---------------  -----------  -------------
   0001  PortChannel0001  LACP(A)(Up)  Ethernet48(S)
   0002  PortChannel0002  LACP(A)(Dw)  N/A

running config:

    "PORTCHANNEL_MEMBER": {
        "PortChannel0001|Ethernet48": {}, 
        "PortChannel0002|Ethernet48": {}
    }, 
  1. Save configuration # config save -y
  2. Reload configuration # config reload -y

Describe the results you received

Portchannel interfaces are inoperable state.

# show in 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
-----  ---------------  -----------  -------
 0001  PortChannel0001  LACP(A)(Dw)  N/A
 0002  PortChannel0002  LACP(A)(Dw)  N/A

Describe the results you expected
The config portchannel member add command should reject an attempt to add a port to a portchannel if that added port has already been a member of another portchannel interface.

Additional information you deem important (e.g. issue happens only occasionally)

Output of show version

SONiC Software Version: SONiC.master.0-dirty-20200114.131506
Distribution: Debian 9.11
Kernel: 4.9.0-9-2-amd64
Build commit: 952dfb15
Build date: Tue Jan 14 13:28:50 UTC 2020
Built by: volodymyrs@r-build-sonic03

Platform: x86_64-mlnx_msn2100-r0
HwSKU: ACS-MSN2100
ASIC: mellanox
Serial Number: MT1646X05314
Uptime: 09:43:29 up 55 min,  1 user,  load average: 3.34, 3.54, 3.55

Docker images:
REPOSITORY                    TAG                              IMAGE ID            SIZE
docker-platform-monitor       latest                           aabdbf5b55b9        569MB
docker-platform-monitor       master.0-dirty-20200114.131506   aabdbf5b55b9        569MB
docker-sflow                  latest                           acc6d9a905f3        306MB
docker-sflow                  master.0-dirty-20200114.131506   acc6d9a905f3        306MB
docker-fpm-frr                latest                           2e17fdf8f565        325MB
docker-fpm-frr                master.0-dirty-20200114.131506   2e17fdf8f565        325MB
docker-syncd-mlnx             latest                           09df8b1f23d7        377MB
docker-syncd-mlnx             master.0-dirty-20200114.131506   09df8b1f23d7        377MB
docker-orchagent              latest                           6729c2e779af        323MB
docker-orchagent              master.0-dirty-20200114.131506   6729c2e779af        323MB
docker-teamd                  latest                           a710f94fa26c        305MB
docker-teamd                  master.0-dirty-20200114.131506   a710f94fa26c        305MB
docker-snmp-sv2               latest                           e4c726145422        339MB
docker-snmp-sv2               master.0-dirty-20200114.131506   e4c726145422        339MB
docker-lldp-sv2               latest                           d67cfab77277        303MB
docker-lldp-sv2               master.0-dirty-20200114.131506   d67cfab77277        303MB
docker-sonic-mgmt-framework   latest                           544660d56163        330MB
docker-sonic-mgmt-framework   master.0-dirty-20200114.131506   544660d56163        330MB
docker-sonic-telemetry        latest                           7df4698f004b        343MB
docker-sonic-telemetry        master.0-dirty-20200114.131506   7df4698f004b        343MB
docker-sonic-restapi          latest                           6834d43af7fb        293MB
docker-sonic-restapi          master.0-dirty-20200114.131506   6834d43af7fb        293MB
docker-router-advertiser      latest                           2fa815e41d75        282MB
docker-router-advertiser      master.0-dirty-20200114.131506   2fa815e41d75        282MB
docker-database               latest                           681324505d5c        282MB
docker-database               master.0-dirty-20200114.131506   681324505d5c        282MB
docker-dhcp-relay             latest                           a3dfa0aa88e9        292MB
docker-dhcp-relay             master.0-dirty-20200114.131506   a3dfa0aa88e9        292MB

sonic_dump_r-qa-sw-eth-21138_20200131_160009.tar.gz

@Hedgehog-Guru
Copy link

Bug moved to sonic-net/sonic-buildimage#6428

@AkhileshSamineni
Copy link
Contributor

You can close this issue, I have fixed this issue using PR - #1328

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

No branches or pull requests

4 participants