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

error when executing "decode-syseeprom" command #828

Closed
BaluAlluru opened this issue Mar 3, 2020 · 3 comments · Fixed by #835
Closed

error when executing "decode-syseeprom" command #828

BaluAlluru opened this issue Mar 3, 2020 · 3 comments · Fixed by #835
Assignees

Comments

@BaluAlluru
Copy link

Description
error when executing "decode-syseeprom" command or "show platform syseeprom" command

@BaluAlluru
Copy link
Author

BaluAlluru commented Mar 3, 2020

When executing "decode-syseeprom" or "show platform syseeprom" command on latest SONIC image, seeing the below error
root@sonic:/home/admin# decode-syseeprom
Traceback (most recent call last):
File "/usr/bin/decode-syseeprom", line 181, in
exit(main())
File "/usr/bin/decode-syseeprom", line 58, in main
or t.getattr('read_eeprom_db', None) == None:
AttributeError: 'board' object has no attribute 'getattr'.

The issue is seen after the below commit
bala@sonic-server:~/sonic/sonic-utilites-Mar3/sonic-utilities/scripts$ git show 1fc2c3d decode-syseeprom
commit 1fc2c3d
Author: borys-karpliak 59825558+borys-karpliak@users.noreply.github.com
Date: Wed Feb 5 01:02:11 2020 +0200

Fix 'show platform eeprom' on virtual switch (#794)

add kvm to platforms which do not support syseeprom db and check for the 'read_syseeprom_db' method availibilty to avoid same issue on other platforms

show version

SONiC Software Version: SONiC.master.0-dirty-20200226.171028
Distribution: Debian 9.12
Kernel: 4.9.0-11-2-amd64
Build commit: 29f60635
Build date: Wed Feb 26 14:00:01 UTC 2020
Built by: bala@sonic-server

Platform: x86_64-juniper_qfx5210-r0
HwSKU: Juniper-QFX5210-64C
Traceback (most recent call last):
File "/usr/bin/decode-syseeprom", line 181, in
exit(main())
File "/usr/bin/decode-syseeprom", line 58, in main
or t.getattr('read_eeprom_db', None) == None:
AttributeError: 'board' object has no attribute 'getattr'
Serial Number:
Uptime: 18:08:19 up 2:42, 2 users, load average: 1.89, 1.65, 1.43

Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-syncd-brcm latest 4ccf5059ead0 430MB
docker-syncd-brcm master.0-dirty-20200226.171028 4ccf5059ead0 430MB
docker-sonic-telemetry latest 6461d9452c0d 345MB
docker-sonic-telemetry master.0-dirty-20200226.171028 6461d9452c0d 345MB
docker-platform-monitor latest 3529de885fc9 334MB
docker-platform-monitor master.0-dirty-20200226.171028 3529de885fc9 334MB
docker-fpm-frr latest 0c039cf13875 328MB
docker-fpm-frr master.0-dirty-20200226.171028 0c039cf13875 328MB
docker-sflow latest 5eaee2c20150 308MB
docker-sflow master.0-dirty-20200226.171028 5eaee2c20150 308MB
docker-sonic-mgmt-framework latest 7cef47043912 420MB
docker-sonic-mgmt-framework master.0-dirty-20200226.171028 7cef47043912 420MB
docker-lldp-sv2 latest 3e4c6dd423be 305MB
docker-lldp-sv2 master.0-dirty-20200226.171028 3e4c6dd423be 305MB
docker-router-advertiser latest 958acd485535 283MB
docker-router-advertiser master.0-dirty-20200226.171028 958acd485535 283MB
docker-dhcp-relay latest 1bce64ddc42b 293MB
docker-dhcp-relay master.0-dirty-20200226.171028 1bce64ddc42b 293MB
docker-database latest 2eb56b19c0ed 283MB
docker-database master.0-dirty-20200226.171028 2eb56b19c0ed 283MB
docker-snmp-sv2 latest 66ce35cc4fc8 340MB
docker-snmp-sv2 master.0-dirty-20200226.171028 66ce35cc4fc8 340MB
docker-orchagent latest 4409e95f4968 326MB
docker-orchagent master.0-dirty-20200226.171028 4409e95f4968 326MB
docker-teamd latest fd2e8d012d44 308MB
docker-teamd master.0-dirty-20200226.171028 fd2e8d012d44 308MB
docker-nat latest 75980ad980ba 309MB
docker-nat master.0-dirty-20200226.171028 75980ad980ba 309MB

55 # Currently, don't support eeprom db on Arista platform
56 platforms_without_eeprom_db = ['arista', 'kvm']
57 if any(platform in platform_path for platform in platforms_without_eeprom_db)
58 or t.getattr('read_eeprom_db', None) == None:
59 support_eeprom_db = False

If the above line 58 is changed to
getattr(t, 'read_eeprom_db'):
issue is not seen.

We think the issue can be seen in other platforms also as the changes done in platform independent code is causing issue.

@BaluAlluru
Copy link
Author

BaluAlluru commented Mar 17, 2020

i tested with the fix provided. seems to be working fine.
root@sonic:/home/admin# decode-syseeprom
TlvInfo Header:
Id String: TlvInfo
Version: 1
Total Length: 196
TLV Name Code Len Value


@BaluAlluru
Copy link
Author

Maintainer can take this fix.

stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this issue Apr 28, 2022
e438b0db6a8912b50f7acddf93d4dc2157f53ecf (HEAD -> 201911, origin/201911) Increase Syncd operation timeout from 1 min to 6 min. (sonic-net#828)
17974adb369111b44dd56837547806918ed4b1ed Update syncd_flex_counter.cpp (sonic-net#798)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
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

Successfully merging a pull request may close this issue.

2 participants