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:
- 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:
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):
Description
Running command 'sudo sfputil show error-status' on a multi-asic box generates an empty table with no ports.
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
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:
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:Output of
show techsupport:Additional information you deem important (e.g. issue happens only occasionally):