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

sfputil show error-status on a multi-asic box shows no ports #8504

Closed
sanmalho-git opened this issue Aug 17, 2021 · 0 comments · Fixed by sonic-net/sonic-utilities#2373
Closed
Assignees
Labels
Triaged this issue has been triaged

Comments

@sanmalho-git
Copy link

Description

Running command 'sudo sfputil show error-status' on a multi-asic box generates an empty table with no ports.

admin@sonic:~$ sudo sfputil show error-status
Port    Error Status
------  --------------
admin@sonic:~$ 

This command gets the ports from state_db in sfputil/main.py, When no ports are defined as part command, then we are getting the ports using

ports = state_db.keys(state_db.STATE_DB, 'TRANSCEIVER_STATUS|*')

However, on a multi-asic box, this returns an empty list - probably because 'state_db.get_all' is only looking at the global state database. ports related data is present in the asic specific database and not the global database.

This causes sonic-mgmt. tests test_check_sfputil_error_status to fail on a multi-asic box.

So, we get an empty list for ports, and thus an empty table.

Steps to reproduce the issue:

On a multi-asic box do:

  1. sudo sfputil show error-status

Describe the results you received:

The output has an empty table.

Describe the results you expected:

Expect the table to list out all the ports and their corresponding error status.

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

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

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Mar 30, 2022
abdosi pushed a commit to sonic-net/sonic-utilities that referenced this issue Nov 2, 2022
Fixed "sudo sfputil show error-status" on a multiasic platform issue. Fixes sonic-net/sonic-buildimage#8504
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this issue Nov 10, 2022
Fixed "sudo sfputil show error-status" on a multiasic platform issue. Fixes sonic-net/sonic-buildimage#8504
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this issue Nov 21, 2022
…ic-net#2373)

Fixed "sudo sfputil show error-status" on a multiasic platform issue. Fixes sonic-net/sonic-buildimage#8504
mdanish-kh pushed a commit to mdanish-kh/sonic-utilities that referenced this issue Nov 23, 2022
…ic-net#2373)

Fixed "sudo sfputil show error-status" on a multiasic platform issue. Fixes sonic-net/sonic-buildimage#8504
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
Fixed "sudo sfputil show error-status" on a multiasic platform issue. Fixes sonic-net/sonic-buildimage#8504
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
Development

Successfully merging a pull request may close this issue.

3 participants