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

[fdb] 'show mac' command failed with t0-56-po2vlan topology #1866

Closed
ganglyu opened this issue Oct 8, 2021 · 0 comments · Fixed by #1926
Closed

[fdb] 'show mac' command failed with t0-56-po2vlan topology #1866

ganglyu opened this issue Oct 8, 2021 · 0 comments · Fixed by #1926
Assignees

Comments

@ganglyu
Copy link
Contributor

ganglyu commented Oct 8, 2021

Description

Sometimes 'show mac' command failed, and error message is:
Key 'ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000a20","mac":"02:11:22:33:16:00","switch_id":"oid:0x21000000000000"}' unavailable in database '1'

Steps to reproduce the issue

  1. Generate some FDB entries with default configuration.
  2. Run 'sonic-clear fdb all' command.
  3. Run 'show mac' command frequently.

Describe the results you received

'show mac' command sometimes failed.

Describe the results you expected

'show mac' command can work properly.

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

show_mac.log

Output of show version

admin@str-msn2700-20:~$ show version

SONiC Software Version: SONiC.20191130.79
Distribution: Debian 9.13
Kernel: 4.9.0-14-2-amd64
Build commit: f2f65be01a
Build date: Wed Sep 15 03:08:59 UTC 2021
Built by: AzDevOps@sonic-int-build-workers-0003WC

Platform: x86_64-mlnx_msn2700-r0
HwSKU: Mellanox-SN2700-D40C8S8
ASIC: mellanox
Serial Number: MT2028X35361
Uptime: 07:42:06 up 51 min,  2 users,  load average: 7.86, 10.15, 10.95

Docker images:
REPOSITORY                 TAG                 IMAGE ID            SIZE
docker-platform-monitor    20191130.79         edc68c98335c        659MB
docker-platform-monitor    latest              edc68c98335c        659MB
docker-fpm-frr             20191130.79         062d99ebfced        326MB
docker-fpm-frr             latest              062d99ebfced        326MB
docker-orchagent           20191130.79         a29a652b5e45        334MB
docker-orchagent           latest              a29a652b5e45        334MB
docker-teamd               20191130.79         96c78b359cda        315MB
docker-teamd               latest              96c78b359cda        315MB
docker-syncd-mlnx          20191130.79         efbb5b216cf8        392MB
docker-syncd-mlnx          latest              efbb5b216cf8        392MB
docker-sonic-restapi       20191130.79         ae76f9f4023e        302MB
docker-sonic-restapi       latest              ae76f9f4023e        302MB
docker-acms                20191130.79         8a045ce1f706        184MB
docker-acms                latest              8a045ce1f706        184MB
docker-vnet-monitor        20191130.79         28f1586fa336        321MB
docker-vnet-monitor        latest              28f1586fa336        321MB
docker-lldp-sv2            20191130.79         116ba43c51b9        312MB
docker-lldp-sv2            latest              116ba43c51b9        312MB
docker-sonic-telemetry     20191130.79         fdd76f156298        354MB
docker-sonic-telemetry     latest              fdd76f156298        354MB
docker-snmp-sv2            20191130.79         d17227541e2a        353MB
docker-snmp-sv2            latest              d17227541e2a        353MB
docker-dhcp-relay          20191130.79         e6deb1e6382f        300MB
docker-dhcp-relay          latest              e6deb1e6382f        300MB
docker-router-advertiser   20191130.79         e18d53acc171        290MB
docker-router-advertiser   latest              e18d53acc171        290MB
docker-database            20191130.79         4b2e033510ba        290MB
docker-database            latest              4b2e033510ba        290MB
k8s.gcr.io/pause           3.2                 80d28bedfe5d        683kB
liat-grozovik pushed a commit that referenced this issue Nov 17, 2021
The race condition is caused by a blocking Redis call which gets the contents of the FDB entry from ASIC DB.
Since it has been implemented as a simple loop, there is no guarantee that entry will be present in DB when the contents are being read.
Closes #1866 

- What I did
Fixed: [fdb] 'show mac' command failed with t0-56-po2vlan topology #1866

- How I did it
Removed blocking calls from fdbshow

- How to verify it
Run FDB test

- Previous command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
Key 'ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x260000000009cc","mac":"02:11:22:33:20:00","switch_id":"oid:0x21000000000000"}' unavailable in database '1'

- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
No.    Vlan    MacAddress    Port    Type
-----  ------  ------------  ------  ------
Total number of entries 0
liat-grozovik pushed a commit that referenced this issue Nov 17, 2021
The race condition is caused by a blocking Redis call which gets the contents of the FDB entry from ASIC DB.
Since it has been implemented as a simple loop, there is no guarantee that entry will be present in DB when the contents are being read.

- What I did
Fixed: [fdb] 'show mac' command failed with t0-56-po2vlan topology #1866

- How I did it
Removed blocking calls from fdbshow

- How to verify it
Run FDB test

- Previous command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
Key 'ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x260000000009cc","mac":"02:11:22:33:20:00","switch_id":"oid:0x21000000000000"}' unavailable in database '1'

- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
No.    Vlan    MacAddress    Port    Type
-----  ------  ------------  ------  ------
Total number of entries 0

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
arlakshm pushed a commit that referenced this issue Nov 18, 2021
The race condition is caused by a blocking Redis call which gets the contents of the FDB entry from ASIC DB.
Since it has been implemented as a simple loop, there is no guarantee that entry will be present in DB when the contents are being read.

- What I did
Fixed: [fdb] 'show mac' command failed with t0-56-po2vlan topology #1866

- How I did it
Removed blocking calls from fdbshow

- How to verify it
Run FDB test

- Previous command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
Key 'ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x260000000009cc","mac":"02:11:22:33:20:00","switch_id":"oid:0x21000000000000"}' unavailable in database '1'

- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
No.    Vlan    MacAddress    Port    Type
-----  ------  ------------  ------  ------
Total number of entries 0

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
qiluo-msft pushed a commit that referenced this issue Nov 20, 2021
The race condition is caused by a blocking Redis call which gets the contents of the FDB entry from ASIC DB.
Since it has been implemented as a simple loop, there is no guarantee that entry will be present in DB when the contents are being read.

- What I did
Fixed: [fdb] 'show mac' command failed with t0-56-po2vlan topology #1866

- How I did it
Removed blocking calls from fdbshow

- How to verify it
Run FDB test

- Previous command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
Key 'ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x260000000009cc","mac":"02:11:22:33:20:00","switch_id":"oid:0x21000000000000"}' unavailable in database '1'

- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
No.    Vlan    MacAddress    Port    Type
-----  ------  ------------  ------  ------
Total number of entries 0

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
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 a pull request may close this issue.

2 participants