-
Notifications
You must be signed in to change notification settings - Fork 710
show mac display wrong information for tagged vlan #894
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
Comments
This is an issue caused by NULL values in ASIC DB for VLAN 1. This is a Day-1 issue. Fdbshow script is unable to find VLAN id corresponding to BVID of that of VLAN 1, so it reports error. admin@r-qa-sw-eth-2133:~$ show mac invalid literal for int() with base 10: 'oid:0x26000000000013'
This is as per design. Since SONiC creates VLAN 1, but SAI is unaware of it. |
Dear @Junchao-Mellanox, @madhanmellanox, It seems the system currently does not throw the exception here https://github.com/Azure/sonic-utilities/blob/master/scripts/fdbshow#L89. But it throws exception little bit further, so, currently, we are getting the next output:
The output has changed, but the root cause is the same. I have prepared PR to handle FDB entries with default Vlan. Could you check it? #1368 |
…1507) * Skip records of FDB entries, which are linked to default Vlan 1, to prevent exception throwing while performing command 'show mac' or 'fdbshow'. #### What I did Resolves #894 Fixed "show mac" command execution failure in case, when the system has an FDB entry, which is linked to default Vlan 1. The failure is caused by throwing exception, while trying to get int from None type object. #### How I did it The condition has added to src/sonic-utilities/scripts/fdbshow script to handle and skip FDB entries, for which the system can not get Vlan ID. #### How to verify it Configure your system to receive both tagged and untagged traffic. For example, you could use the next steps: Do configuration on DUT sudo config portchannel add PortChannel0002 sudo config portchannel member add PortChannel0002 Ethernet68 sudo config vlan add 40 sudo config vlan member add 40 PortChannel0002 sudo config interface ip add Vlan40 40.0.0.1/24 Do configuration on Linux host sudo ip link add bond0 type bond sudo ip link set dev bond0 type bond mode 4 sudo ip link set enp5s0f1 down sudo ip link set enp5s0f1 master bond0 sudo ip link set enp5s0f1 up sudo ip link set bond0 up sudo ip link add link bond0 name bond0.40 type vlan id 40 sudo ip link set bond0.40 up sudo ip addr add 40.0.0.3/24 dev bond0.40 Do ping from linux host to DUT IP 40.0.0.1 Do command "show mac" on DUT "show mac" command should not be finished with the next message: int() argument must be a string, a bytes-like object or a number, not 'NoneType'. Instead, the normal output of the command should be shown. #### Additional information Cherry-pick of #1368. Pay attention, additional change is required. HEAD of https://github.com/Azure/sonic-py-swsssdk submodule of buildimage should be updated and be pointed to the top of 201911 branch, because current head of the submodule causes KeyError exception raising inside function `get_vlan_id_from_bvid` of `port_util.py` module: ``` SAI_VLAN_ATTR_VLAN_ID ('SAI_VLAN_ATTR_VLAN_ID',) Failed to get Vlan id for bvid oid:0x26000000000013 ``` The raising has already fixed on the top of 201911 branch of the submodule.
Description
Steps to reproduce the issue
Describe the results you received
Describe the results you expected
It should show the correct fdb entry.
Additional information you deem important (e.g. issue happens only occasionally)
This is always reproducible. And here is the related data in ASIC db:
According to the code in fanshow, I think we might have a few problems:
Output of
show version
The text was updated successfully, but these errors were encountered: