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

SWSS container stops in case of assigning a vlan to a portchannel's member. #4456

Open
MaxYaremchuk opened this issue Apr 21, 2020 · 5 comments

Comments

@MaxYaremchuk
Copy link

Description
SWSS container stops in case of assigning a vlan to a portchannel's member.

Steps to reproduce the issue:

  1. Create a portchannel config portchannel add PortChannel0001
  2. Assign ports to PortChannel0001
config portchannel member add PortChannel0001 Ethernet0
config portchannel member add PortChannel0001 Ethernet4
  1. Add vlans
config vlan add 2
config vlan add 3
  1. Assign vlan 2 to PortChannel0001
    config vlan member add 2 PortChannel0001
  2. Assign vlan 3 to a portchannel member
    config vlan member add 3 Ethernet0

Describe the results you received:

Jan 20 10:46:35.779449 sonic NOTICE swss#orchagent: :- removeLagMember: Remove member Ethernet0 from LAG PortChannel0001 lid:20000000002e2 lmid:1b0000000002e3
Jan 20 10:46:35.779513 sonic NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_STRIP to host interface: Ethernet0
Jan 20 10:46:35.780226 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 NOTICE  SAI_LAG: mlnx_sai_lag.c[1546]- mlnx_remove_lag_member: Removing LAG member (11900,0,0)
Jan 20 10:46:35.797885 sonic INFO swss#supervisord: vlanmgrd RTNETLINK answers: Operation not supported
Jan 20 10:46:35.798035 sonic ERR swss#vlanmgrd: :- exec: /bin/bash -c "/sbin/ip link set \"Ethernet0\" master Bridge && /sbin/bridge vlan del vid 1 dev \"Ethernet0\" && /sbin/bridge vlan add vid 2 dev \"Ethernet0\" ": Success
Jan 20 10:46:35.799202 sonic ERR swss#vlanmgrd: :- main: Runtime error: /bin/bash -c "/sbin/ip link set \"Ethernet0\" master Bridge && /sbin/bridge vlan del vid 1 dev \"Ethernet0\" && /sbin/bridge vlan add vid 2 dev \"Ethernet0\" " : 
Jan 20 10:46:35.859742 sonic NOTICE syncd#syncd: :- threadFunction:  span < 0 = -18533659 at 1579517195859437
Jan 20 10:46:35.859884 sonic NOTICE syncd#syncd: :- threadFunction:  new span  = 81465
Jan 20 10:46:35.868378 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 NOTICE  SAI_POLICER: mlnx_sai_policer.c[2809]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001. policer type:0
Jan 20 10:46:35.868378 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 WARN    SAI_POLICER: mlnx_sai_policer.c[2816]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001 has no policer binding for policer type:0
Jan 20 10:46:35.868378 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 NOTICE  SAI_POLICER: mlnx_sai_policer.c[2809]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001. policer type:1
Jan 20 10:46:35.868378 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 WARN    SAI_POLICER: mlnx_sai_policer.c[2816]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001 has no policer binding for policer type:1
Jan 20 10:46:35.868378 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 NOTICE  SAI_POLICER: mlnx_sai_policer.c[2809]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001. policer type:2
Jan 20 10:46:35.868378 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 WARN    SAI_POLICER: mlnx_sai_policer.c[2816]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001 has no policer binding for policer type:2
Jan 20 10:46:35.868829 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 NOTICE  SAI_POLICER: mlnx_sai_policer.c[2809]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001. policer type:3
Jan 20 10:46:35.868829 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 WARN    SAI_POLICER: mlnx_sai_policer.c[2816]- mlnx_sai_unbind_policer_from_port: sai port at port_db[0]==:0x1190000000001 has no policer binding for policer type:3
Jan 20 10:46:35.880500 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 NOTICE  SAI_LAG: mlnx_sai_lag.c[1629]- mlnx_remove_lag_member: Removed SAI LAG member
Jan 20 10:46:35.880984 sonic INFO syncd#supervisord: syncd Jan 20 10:46:35 NOTICE  SAI_UTILS: mlnx_sai_utils.c[2336]- set_dispatch_attrib_handler: Set VLAN_TAG, key:host interface 0, val:STRIP
Jan 20 10:46:36.802928 sonic INFO swss#supervisor-proc-exit-listener: Process vlanmgrd exited unxepectedly. Terminating supervisor...
Jan 20 10:46:39.100607 sonic INFO swss#supervisord 2020-01-20 10:46:35,799 INFO exited: vlanmgrd (exit status 255; not expected)
Jan 20 10:46:39.100607 sonic INFO swss#supervisord 2020-01-20 10:46:36,804 WARN received SIGTERM indicating exit request
Jan 20 10:46:39.100607 sonic INFO swss#supervisord 2020-01-20 10:46:36,805 INFO waiting for vrfmgrd, neighsyncd, intfmgrd, orchagent, portmgrd, vxlanmgrd, buffermgrd, portsyncd, nbrmgrd, supervisor-proc-exit-listener, rsyslogd to die
Jan 20 10:46:39.100607 sonic INFO swss#supervisord 2020-01-20 10:46:36,807 INFO stopped: vxlanmgrd (terminated by SIGTERM)
Jan 20 10:46:39.100607 sonic INFO swss#supervisord 2020-01-20 10:46:36,809 INFO stopped: nbrmgrd (terminated by SIGTERM)
Jan 20 10:46:39.100671 sonic INFO swss#supervisord 2020-01-20 10:46:37,814 INFO stopped: vrfmgrd (terminated by SIGTERM)
Jan 20 10:46:39.100671 sonic INFO swss#supervisord 2020-01-20 10:46:38,819 INFO stopped: buffermgrd (terminated by SIGTERM)
Jan 20 10:46:39.100725 sonic INFO swss#supervisord 2020-01-20 10:46:38,821 INFO stopped: portmgrd (terminated by SIGTERM)
Jan 20 10:46:39.100725 sonic INFO swss#supervisord 2020-01-20 10:46:38,823 INFO stopped: intfmgrd (terminated by SIGTERM)
Jan 20 10:46:43.038486 r-ethernet-sw230 INFO containerd[492]: time="2020-01-20T10:46:43.038249748Z" level=info msg="shim reaped" id=f7b024e672ef498f7ace61e44f24efda67b3400ff78288dcadffd41978ae7ade
Jan 20 10:46:43.049166 r-ethernet-sw230 INFO dockerd[533]: time="2020-01-20T10:46:43.048762576Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" 
Jan 20 10:46:43.126920 r-ethernet-sw230 INFO swss.sh[4572]: No longer waiting on container 'swss'
Jan 20 10:46:43.162868 r-ethernet-sw230 NOTICE root: Stopping swss service...
Jan 20 10:46:43.172767 r-ethernet-sw230 NOTICE root: Locking /tmp/swss-syncd-lock from swss service
Jan 20 10:46:43.184842 r-ethernet-sw230 NOTICE root: Locked /tmp/swss-syncd-lock (10) from swss service
Jan 20 10:46:43.772052 r-ethernet-sw230 NOTICE root: Warm boot flag: swss false.
Jan 20 10:46:43.874395 r-ethernet-sw230 INFO swss.sh[10728]: swss
Jan 20 10:46:43.884372 r-ethernet-sw230 NOTICE root: Stopped swss service...
Jan 20 10:46:43.892231 r-ethernet-sw230 NOTICE root: Clearing FAST_REBOOT flag...
Jan 20 10:46:44.180170 r-ethernet-sw230 NOTICE root: Unlocking /tmp/swss-syncd-lock (10) from swss service
Jan 20 10:46:44.196494 r-ethernet-sw230 INFO systemd[1]: Stopping syncd service...
Jan 20 10:46:44.205870 r-ethernet-sw230 NOTICE root: Stopping syncd service...
Jan 20 10:46:44.213756 r-ethernet-sw230 NOTICE root: Locking /tmp/swss-syncd-lock from syncd service
Jan 20 10:46:44.223800 r-ethernet-sw230 NOTICE root: Locked /tmp/swss-syncd-lock (10) from syncd service
Jan 20 10:46:44.787726 r-ethernet-sw230 NOTICE root: Warm boot flag: syncd false.
Jan 20 10:46:44.796574 r-ethernet-sw230 NOTICE root: Stopping pmon service ahead of syncd...
Jan 20 10:46:44.810467 r-ethernet-sw230 INFO systemd[1]: Stopping Platform monitor container...
Jan 20 10:46:44.921551 sonic INFO pmon#syseepromd: Caught SIGTERM - exiting...
Jan 20 10:46:44.921551 sonic INFO pmon#syseepromd: Stop daemon main loop
Jan 20 10:46:44.925920 sonic INFO pmon#syseepromd: Shutting down...
Jan 20 10:46:44.941645 sonic INFO pmon#psud: Caught SIGTERM - exiting...
Jan 20 10:46:44.941645 sonic INFO pmon#psud: Stop daemon main loop
Jan 20 10:46:44.942358 sonic INFO pmon#psud: Shutting down...
Jan 20 10:46:44.958627 sonic INFO pmon#xcvrd: Caught SIGTERM - exiting...
Jan 20 10:46:44.958795 sonic INFO pmon#xcvrd: Stop daemon main loop
Jan 20 10:46:44.990424 sonic INFO pmon#xcvrd: Stop DOM monitoring loop
Jan 20 10:46:44.991233 sonic INFO pmon#xcvrd: Start daemon deinit...
Jan 20 10:46:44.999463 sonic INFO pmon#xcvrd: Shutting down...
Jan 20 10:46:48.349106 r-ethernet-sw230 INFO containerd[492]: time="2020-01-20T10:46:48.348870242Z" level=info msg="shim reaped" id=631e38467879a7186541ace19c34cbe3ef16ff9f8309ef7e3d7e5814fb48ae5f
Jan 20 10:46:48.358941 r-ethernet-sw230 INFO dockerd[533]: time="2020-01-20T10:46:48.358748164Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" 
Jan 20 10:46:48.424169 r-ethernet-sw230 INFO pmon.sh[11088]: pmon
Jan 20 10:46:48.425404 r-ethernet-sw230 INFO pmon.sh[7666]: 0
Jan 20 10:46:48.435807 r-ethernet-sw230 INFO systemd[1]: Stopped Platform monitor container.
Jan 20 10:46:48.442889 r-ethernet-sw230 NOTICE root: Stopped pmon service
Jan 20 10:46:49.796099 r-ethernet-sw230 INFO containerd[492]: time="2020-01-20T10:46:49.795896392Z" level=info msg="shim reaped" id=c14b2220d002dc2293926cfa0f42d91ef9ba31be24b2373f4f142af214efe23c
Jan 20 10:46:49.806297 r-ethernet-sw230 INFO dockerd[533]: time="2020-01-20T10:46:49.806086476Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" 
Jan 20 10:46:49.861628 r-ethernet-sw230 INFO syncd.sh[10941]: syncd
Jan 20 10:46:49.862507 r-ethernet-sw230 INFO syncd.sh[6625]: 0
Jan 20 10:46:49.874819 r-ethernet-sw230 NOTICE root: Stopped syncd service...

Describe the results you expected:
There should be a validation preventing from assigning a vlan to LAG's member.

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: 17:47:02 up  6:01,  2 users,  load average: 3.76, 3.63, 3.51

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-ethernet-sw230_20200120_105034.tar.gz

@xinliu-seattle
Copy link
Contributor

This should be checked and should fail before sending to SWSS.

@liat-grozovik
Copy link
Collaborator

@renukamanavalan any plan to fix it as part of 201911 or 202012?

@dprital
Copy link
Collaborator

dprital commented Mar 1, 2021

Hi @prsunny , Any plans to fix this issue ?

@anshuv-mfst
Copy link

Issue triage 3/3: @prsunny could you please provide expected behavior.

@prsunny
Copy link
Contributor

prsunny commented Mar 4, 2021

The expectation in this case shall be click CLI to check if the port that is added to a Vlan belongs to a PortChannel. It already has the checks for if the port is a router port (with IP configured) etc. So this would be an additional check to validate PortChannel membership. Refer the link.

prsunny pushed a commit to sonic-net/sonic-utilities that referenced this issue Mar 23, 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 <sudharsand@nvidia.com>
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this issue 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 <sudharsand@nvidia.com>
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
…#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 <sudharsand@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants