Skip to content

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

@sanmalho-git

Description

@sanmalho-git

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):

Metadata

Metadata

Assignees

Labels

Triagedthis issue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions