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

"show vlan config" command display wrong member information #8306

Closed
tomer-israel opened this issue Aug 2, 2021 · 1 comment · Fixed by #9237
Closed

"show vlan config" command display wrong member information #8306

tomer-israel opened this issue Aug 2, 2021 · 1 comment · Fixed by #9237
Assignees
Labels
Triaged this issue has been triaged

Comments

@tomer-israel
Copy link
Contributor

Description

"show vlan config" may display wrong information about vlan members after generating vlan members configuration from minigraph and removing vlan members.

the problem is related to a change in the vlan schema that was changed on this PR:
sonic-net/sonic-utilities#1038

In the new schema, we no longer use the “members” field on the VLAN table:

    "VLAN": {
        "Vlan1000": {
           ….. 
           "members": [
                "Ethernet8",
                "Ethernet16",
                "Ethernet24",
                "Ethernet32"
            ],
           "vlanid": "1000"
       }

And the member info is taken only from vlan members tables:

"VLAN_MEMBER": {
     "Vlan1000|Ethernet8": {
         "tagging_mode": "untagged"
     },
     "Vlan1000|Ethernet16": {
         "tagging_mode": "untagged"
     },
     ……

We can see that on the new implementation we don’t add the new members to the “members” field on the VLAN table.

In the load_minigraph script we still generate this “members” field on the VLAN table and when we remove member from a vlan it will remove the VLAN_MEMBER table only, the “members” field on the VLAN table is not changing and the member that was removed is still there.

On this scenario when we run show command we see members exist on this vlan although it was removed..
We see this problematic situation because the show command is still using this “members” field when it displays the vlan member information. The “members” field info from the VLAN table is added to the VLAN_MEMBER tables info and together it displayed.

Steps to reproduce the issue:

  1. load minigraph file with vlan members configuration
  2. remove the vlan member
  3. "show vlan config" will still display the removed vlan member

Example to vlan member configuration on the minigraph xml file:

...
      <VlanInterfaces>
        <VlanInterface>
          <Name>Vlan1000</Name>
      <AttachTo>etp2;etp3;etp4;etp5;etp6;etp7;etp8;etp9;etp10;etp11;etp12;etp13;etp14;etp15;etp16;etp17;etp18;etp19;etp20;etp21;etp22;etp23;etp24;etp25</AttachTo>
          <NoDhcpRelay>False</NoDhcpRelay>
          <StaticDHCPRelay>0.0.0.0/0</StaticDHCPRelay>
          <Type i:nil="true"/>
          <DhcpRelays>192.0.0.1;192.0.0.2;192.0.0.3;192.0.0.4</DhcpRelays>
          <VlanID>1000</VlanID>
          <Tag>1000</Tag>
          <Subnets>192.168.0.0/21</Subnets>
        </VlanInterface>
      </VlanInterfaces>
...

Example for removal member command:
sudo config vlan member del 1000 Ethernet8

Describe the results you received:

admin@r-leopard-01:~$ show vlan config 
Name        VID  Member       Mode
--------  -----  -----------  --------
Vlan1000   1000  Ethernet8    ?
Vlan1000   1000  Ethernet16   untagged
Vlan1000   1000  Ethernet24   untagged
Vlan1000   1000  Ethernet32   untagged
Vlan1000   1000  Ethernet40   untagged
Vlan1000   1000  Ethernet48   untagged
Vlan1000   1000  Ethernet56   untagged
...

Describe the results you expected:

admin@r-leopard-01:~$ show vlan config 
Name        VID  Member       Mode
--------  -----  -----------  --------
Vlan1000   1000  Ethernet16   untagged
Vlan1000   1000  Ethernet24   untagged
Vlan1000   1000  Ethernet32   untagged
Vlan1000   1000  Ethernet40   untagged
Vlan1000   1000  Ethernet48   untagged
Vlan1000   1000  Ethernet56   untagged
...

Output of show version:

root@r-leopard-01:/home/admin# show version

SONiC Software Version: SONiC.202012.139-5651977f6_Internal
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-amd64
Build commit: 5651977f6
Build date: Fri Jul 30 08:36:44 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02-244

Platform: x86_64-mlnx_msn4700-r0
HwSKU: ACS-MSN4700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2022X08595
Uptime: 11:37:39 up  6:05,  2 users,  load average: 0.99, 0.76, 0.73

docker-snmp                   202012.139-5651977f6_Internal   34fc889a4fa5        443MB
docker-snmp                   latest                          34fc889a4fa5        443MB
docker-teamd                  202012.139-5651977f6_Internal   5704cb77f7a4        412MB
docker-teamd                  latest                          5704cb77f7a4        412MB
docker-router-advertiser      202012.139-5651977f6_Internal   31e9971905fc        401MB
docker-router-advertiser      latest                          31e9971905fc        401MB
docker-platform-monitor       202012.139-5651977f6_Internal   38ccaf5ba3d8        722MB
docker-platform-monitor       latest                          38ccaf5ba3d8        722MB
docker-lldp                   202012.139-5651977f6_Internal   848812823ed4        441MB
docker-lldp                   latest                          848812823ed4        441MB
docker-dhcp-relay             202012.139-5651977f6_Internal   210634cc0157        408MB
docker-dhcp-relay             latest                          210634cc0157        408MB
docker-database               202012.139-5651977f6_Internal   08ff987b833e        401MB
docker-database               latest                          08ff987b833e        401MB
docker-orchagent              202012.139-5651977f6_Internal   66f04e8a0b14        430MB
docker-orchagent              latest                          66f04e8a0b14        430MB
docker-nat                    202012.139-5651977f6_Internal   a80e2a4ba1ea        415MB
docker-nat                    latest                          a80e2a4ba1ea        415MB
docker-sonic-telemetry        202012.139-5651977f6_Internal   ee61da4e3b31        491MB
docker-sonic-telemetry        latest                          ee61da4e3b31        491MB
docker-sonic-mgmt-framework   202012.139-5651977f6_Internal   54a7d05d10cb        621MB
docker-sonic-mgmt-framework   latest                          54a7d05d10cb        621MB
docker-fpm-frr                202012.139-5651977f6_Internal   e456b89b413d        430MB
docker-fpm-frr                latest                          e456b89b413d        430MB
docker-sflow                  202012.139-5651977f6_Internal   f2ebb9f36217        413MB
docker-sflow                  latest                          f2ebb9f36217        413MB
docker-sonic-restapi          202012.139-5651977f6_Internal   9c0974ce2fa5        352MB
docker-sonic-restapi          latest  

Output of show techsupport:

sonic_dump_r-leopard-01_20210714_123802 (1).tar.gz

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

@zhangyanzhao
Copy link
Collaborator

@qiluo-msft please help to take a look.

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Aug 4, 2021
qiluo-msft added a commit that referenced this issue Nov 19, 2021
…in ConfigDB (#9237)

#### Why I did it
This field is deprecated.
Fixes #8306
Fixes #9121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
3 participants