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

show interfaces transceiver eeprom failing after sonic-buildimage commit 27a6641 #33

Closed
SavchukRomanLv opened this issue Dec 15, 2021 · 4 comments

Comments

@SavchukRomanLv
Copy link

SavchukRomanLv commented Dec 15, 2021

We do see failure in Arista devices when run test_snmp_phy_entity
When dive deeper we've found that after sonic-buildimage commit 27a664 'hardware_rev' disappeared from STATE_DB, and trying to execute command show interfaces transceiver eeprom returns error

File "/usr/local/bin/sfpshow", line 423, in get_eeprom self.output += self.convert_interface_sfp_info_to_cli_output_string( File "/usr/local/bin/sfpshow", line 395, in convert_interface_sfp_info_to_cli_output_string sfp_info_output = self.convert_sfp_info_to_output_string(sfp_info_dict) File "/usr/local/bin/sfpshow", line 287, in convert_sfp_info_to_output_string output += '{}{}: {}\n'.format(indent, QSFP_DATA_MAP[key], sfp_info_dict[key]) KeyError: 'hardware_rev'

Platform info:
Platform: x86_64-arista_7170_64c HwSKU: Arista-7170-64C ASIC: barefoot

@Staphylo
Copy link
Member

I'm able to replicate the issue on the latest master image. I'll update this issue once a fix is available.
In the meantime you can use the following command to dirty patch a running image.
sed -i 's/sfp_info_dict\[key\]/sfp_info_dict.get(key)/' /usr/local/bin/sfpshow /usr/local/lib/python3*/dist-packages/sfputil/main.py

@Staphylo
Copy link
Member

For more insight, the issue is related to our recent transition to sonic_xcvr which is a overhaul of the xcvr management that we have been working on for quite a while.
It appears that the hardware_rev key was renamed vendor_rev which makes the old and new API incompatible on this property.
Someone from our team is working toward resolving this issue.

@andywongarista
Copy link
Contributor

The root cause of this issue was addressed in sonic-utilities: sonic-net/sonic-utilities#1950
However at sonic-buildimage commit 27a664 the sonic-utilities submodule does not have this fix yet. https://github.com/Azure/sonic-utilities/blob/a0bff26a00d63289c0cbd8ff17f5acf930588553/scripts/sfpshow#L41
This error should be resolved once the submodule is updated.

@andywongarista
Copy link
Contributor

sonic-utilities submodule has been updated as of sonic-buildimage commit b96533 to include the fix so this issue should now be resolved.

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

No branches or pull requests

3 participants