Closed wenyiz2021 closed 1 year ago
cc @Staphylo @arlakshm @kartik for viz
issue is only seen on multi-asic LC:
multi-asic LC:
admin@str2-7804-lc5-1:~$ redis-cli --raw -n 6 keys TRANSCEIVER_INFO*
admin@str2-7804-lc5-1:~$
CL2 LC:
admin@str2-7804-lc3-1:~$ redis-cli --raw -n 6 keys TRANSCEIVER_INFO*
TRANSCEIVER_INFO|Ethernet40
TRANSCEIVER_INFO|Ethernet68
TRANSCEIVER_INFO|Ethernet56
TRANSCEIVER_INFO|Ethernet20
TRANSCEIVER_INFO|Ethernet92
TRANSCEIVER_INFO|Ethernet104
TRANSCEIVER_INFO|Ethernet112
TRANSCEIVER_INFO|Ethernet32
TRANSCEIVER_INFO|Ethernet24
TRANSCEIVER_INFO|Ethernet88
TRANSCEIVER_INFO|Ethernet8
TRANSCEIVER_INFO|Ethernet76
TRANSCEIVER_INFO|Ethernet100
TRANSCEIVER_INFO|Ethernet72
TRANSCEIVER_INFO|Ethernet52
TRANSCEIVER_INFO|Ethernet96
TRANSCEIVER_INFO|Ethernet48
TRANSCEIVER_INFO|Ethernet28
TRANSCEIVER_INFO|Ethernet44
TRANSCEIVER_INFO|Ethernet0
TRANSCEIVER_INFO|Ethernet16
TRANSCEIVER_INFO|Ethernet116
TRANSCEIVER_INFO|Ethernet84
TRANSCEIVER_INFO|Ethernet80
TRANSCEIVER_INFO|Ethernet120
TRANSCEIVER_INFO|Ethernet60
TRANSCEIVER_INFO|Ethernet36
TRANSCEIVER_INFO|Ethernet108
TRANSCEIVER_INFO|Ethernet12
TRANSCEIVER_INFO|Ethernet64
TRANSCEIVER_INFO|Ethernet124
TRANSCEIVER_INFO|Ethernet4
@wenyiz2021 this is expected based on the design of multi-asic in SONiC. You have to perform your query in the correct namespace if you want this information.
Here's an example on a 7800R3AK-36DM2-LC
linecard
root@lc-6:~# sonic-db-cli -n asic0 STATE_DB keys 'TRANSCEIVER_INFO*' | sort -V
TRANSCEIVER_INFO|Ethernet0
TRANSCEIVER_INFO|Ethernet8
TRANSCEIVER_INFO|Ethernet16
TRANSCEIVER_INFO|Ethernet24
TRANSCEIVER_INFO|Ethernet32
TRANSCEIVER_INFO|Ethernet40
TRANSCEIVER_INFO|Ethernet72
TRANSCEIVER_INFO|Ethernet80
TRANSCEIVER_INFO|Ethernet96
TRANSCEIVER_INFO|Ethernet104
TRANSCEIVER_INFO|Ethernet112
TRANSCEIVER_INFO|Ethernet128
TRANSCEIVER_INFO|Ethernet136
root@cmp214-6:~# sonic-db-cli -n asic1 STATE_DB keys 'TRANSCEIVER_INFO*' | sort -V
TRANSCEIVER_INFO|Ethernet144
TRANSCEIVER_INFO|Ethernet152
TRANSCEIVER_INFO|Ethernet160
TRANSCEIVER_INFO|Ethernet168
TRANSCEIVER_INFO|Ethernet176
TRANSCEIVER_INFO|Ethernet184
TRANSCEIVER_INFO|Ethernet192
TRANSCEIVER_INFO|Ethernet200
TRANSCEIVER_INFO|Ethernet216
TRANSCEIVER_INFO|Ethernet224
TRANSCEIVER_INFO|Ethernet232
TRANSCEIVER_INFO|Ethernet240
TRANSCEIVER_INFO|Ethernet248
TRANSCEIVER_INFO|Ethernet256
Some of SONiC CLI are multi-asic aware and will source the information from the correct namespace but it's not the case for all.
For example checking a transceiver presence via the show interface transceiver
CLI can be deceiving if you forget about the asic namespace.
root@lc-6:~# show interface transceiver presence Ethernet0
Port Presence
--------- -----------
Ethernet0 Not present
root@lc-6:~# show interface transceiver presence -n asic0 Ethernet0
Port Presence
--------- ----------
Ethernet0 Present
root@lc-6:~# show interface transceiver presence -n asic1 Ethernet0
Port Presence
--------- -----------
Ethernet0 Not present
You can see that the xcvrd
daemon is namespace aware and in the case of multi-asic will therefore push the xcvr data in the namespace db instead of the global one.
Since this is a SONiC specific issue and not a vendor on, I will close this thread.
thanks @Staphylo for mentioning the multi-asic behavior. originally the issue is seen on all linecards, then with latest image it seems to be fixed.
on one of the CL2 linecard, transceiver info is missing in state DB, it is more likely due to
platform_chassis.get_sfp(physical_port).get_transceiver_info()
return noop transceiver info. it's also seen on multi-asic linecard, and SUP, but another CL2 linecard is fine.