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 platform ssdhealth" command fails on certain platforms #9407

Open
neethajohn opened this issue Nov 30, 2021 · 9 comments
Open

"show platform ssdhealth" command fails on certain platforms #9407

neethajohn opened this issue Nov 30, 2021 · 9 comments

Comments

@neethajohn
Copy link
Contributor

Description

platform_tests.cli.test_show_platform.test_show_platform_ssdhealth failing on x86_64-arista_7050_qx32s because of "show platform ssdhealth" command failure.
This seems related to changes made in sonic-net/sonic-platform-common#229

Steps to reproduce the issue:

  1. Issue "show platform ssdhealth" on x86_64-arista_7050_qx32s

Describe the results you received:

admin@str2-7050qx-32s-acs-02:~$ show platform ssdhealth 
Traceback (most recent call last):
  File "/usr/local/bin/ssdutil", line 8, in <module>
    sys.exit(ssdutil())
  File "/usr/local/lib/python3.7/dist-packages/ssdutil/main.py", line 68, in ssdutil
    ssd = import_ssd_api(args.device)
  File "/usr/local/lib/python3.7/dist-packages/ssdutil/main.py", line 47, in import_ssd_api
    return SsdUtil(diskdev)
  File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_ssd/ssd_generic.py", line 48, in __init__
    self.parse_generic_ssd_info()
  File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_ssd/ssd_generic.py", line 80, in parse_generic_ssd_info
    self.model = self._parse_re('Device Model:\s*(.+?)\n', self.ssd_info)
  File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_ssd/ssd_generic.py", line 72, in _parse_re
    res_list = re.findall(pattern, buffer)
  File "/usr/lib/python3.7/re.py", line 223, in findall
    return _compile(pattern, flags).findall(string)
TypeError: expected string or bytes-like object

Describe the results you expected:

"show platform ssdhealth" should return proper output

Output of show version:

admin@str2-7050qx-32s-acs-02:~$ show ver

SONiC Software Version: SONiC.20201231.44
Distribution: Debian 10.11
Kernel: 4.19.0-12-2-amd64
Build commit: 63ef7f53bc
Build date: Wed Nov 24 00:58:38 UTC 2021
Built by: cloudtest@876d3befc000000

Platform: x86_64-arista_7050_qx32s
HwSKU: Arista-7050-QX-32S
ASIC: broadcom
ASIC Count: 1
Serial Number: JPE20255843
Uptime: 19:23:10 up 1 day,  4:54,  1 user,  load average: 1.01, 0.80, 0.61

Docker images:
REPOSITORY                 TAG                 IMAGE ID            SIZE
docker-syncd-brcm          20201231.44         39b7f22ecbb7        672MB
docker-syncd-brcm          latest              39b7f22ecbb7        672MB
docker-teamd               20201231.44         b70704e2f51d        390MB
docker-teamd               latest              b70704e2f51d        390MB
docker-router-advertiser   20201231.44         b708f51ec1de        380MB
docker-router-advertiser   latest              b708f51ec1de        380MB
docker-platform-monitor    20201231.44         4e6434c00bef        561MB
docker-platform-monitor    latest              4e6434c00bef        561MB
docker-lldp                20201231.44         114b9038cf7c        420MB
docker-lldp                latest              114b9038cf7c        420MB
docker-snmp                20201231.44         acf640b779a9        422MB
docker-snmp                latest              acf640b779a9        422MB
docker-dhcp-relay          20201231.44         a24782a13fbd        393MB
docker-dhcp-relay          latest              a24782a13fbd        393MB
docker-database            20201231.44         b5b4fe3fba13        379MB
docker-database            latest              b5b4fe3fba13        379MB
docker-orchagent           20201231.44         155aaa84c5ea        408MB
docker-orchagent           latest              155aaa84c5ea        408MB
docker-sonic-telemetry     20201231.44         797681143d3d        469MB
docker-sonic-telemetry     latest              797681143d3d        469MB
docker-fpm-frr             20201231.44         c2ba10af8771        408MB
docker-fpm-frr             latest              c2ba10af8771        408MB

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

@neethajohn
Copy link
Contributor Author

neethajohn commented Nov 30, 2021

@Blueve, @dflynn-Nokia fyi

@dflynn-Nokia
Copy link
Contributor

I'll look into this.
Do you plan to revert my change?

@dflynn-Nokia
Copy link
Contributor

My change parses the output of the smartctl command.
I do not have access to an Arista box.
Can someone share the output from the following command run on the Arista box in question?

sudo smartctl --all /dev/sda

Note that the Arista box may not have /dev/sda as the primary SSD block device.

Thanks.

@neethajohn
Copy link
Contributor Author

@sujinmkang , fyi

@sujinmkang
Copy link
Collaborator

@neethajohn the ssd drive on x86_64-arista_7050_qx32s falls into the generic device but it seems the command doesn't work. I will check with vendor.

@neethajohn
Copy link
Contributor Author

@dflynn-Nokia , there seems to be an issue with the cmd on that specific platform which got uncovered as part of your change. You can ignore this issue. we are following up with the vendor

@dflynn-Nokia
Copy link
Contributor

My PR #229 in sonic-platform-common did add the following bit of code snippet

image

I suspect this is the problem for platforms that do not support the smartctl command?

@yxieca
Copy link
Contributor

yxieca commented Dec 6, 2021

@sujinmkang can this issue be closed now?

@carl-nokia
Copy link
Contributor

@neethajohn, can we close this with the resolution above, which is to not run the SSD test if the platform does not have SSD ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants