Skip to content

[action] [PR:3833] Fix show platform ssdhealth not showing expected output when a usb flash drive is plugged in#166

Merged
mssonicbld merged 1 commit intoAzure:202412from
mssonicbld:cherry/msft-202412/3833
Apr 15, 2025
Merged

[action] [PR:3833] Fix show platform ssdhealth not showing expected output when a usb flash drive is plugged in#166
mssonicbld merged 1 commit intoAzure:202412from
mssonicbld:cherry/msft-202412/3833

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

Fix show platform ssdhealth not showing expected output when a usb flash drive is plugged in.

What I did

When 'show platform ssdhealth' is not supplied with a device name and a usb flash drive is attached we show incorrect output as we deduce incorrect device name from 'lsblk' command and pass it to ssdutil. I removed this incorrect deduction of the device name.

How I did it

Instead of incorrectly deducing the device using the lsblk command we can instead not pass any device name as argument to the ssdutil and it will automatically choose the device on which /host partition is mounted which is the primary storage device in our case as per the PR: sonic-net/sonic-utilities#3399

How to verify it

Run sudo show platform ssdhealth without any arguments with a flash drive plugged into the sonic switch.

Previous command output (if the output of a command-line utility has changed)

root@qa-eth-vt19-1-4280:~# show platform ssdhealth
Disk Type    : NVME
Device Model : N/A
Health       : N/A
Temperature  : N/A

New command output (if the output of a command-line utility has changed)

root@qa-eth-vt19-1-4280:/home/admin# show platform ssdhealth
Disk Type    : NVME
Device Model : Virtium VTPM24CEXI080-BM110006
Health       : 100.0%
Temperature  : 51.0C

In the case where the user passes the device name as argument to the command (show platform ssdhealth /dev/nvme0n1) output remains the same and no changes have been made.

…ash drive is plugged in

Fix `show platform ssdhealth` not showing expected output when a usb flash drive is plugged in.

<!--
    Please make sure you've read and understood our contributing guidelines:
    https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

    ** Make sure all your commits include a signature generated with `git commit -s` **

    If this is a bug fix, make sure your description includes "closes #xxxx",
    "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
    issue when the PR is merged.

    If you are adding/modifying/removing any command or utility script, please also
    make sure to add/modify/remove any unit tests from the tests
    directory as appropriate.

    If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
    subcommand, or you are adding a new subcommand, please make sure you also
    update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
    your changes.

    Please provide the following information:
-->

#### What I did
When 'show platform ssdhealth' is not supplied with a device name and a usb flash drive is attached we show incorrect output as we deduce incorrect device name from 'lsblk' command and pass it to ssdutil. I removed this incorrect deduction of the device name.

#### How I did it

Instead of incorrectly deducing the device using the lsblk command we can instead not pass any device name as argument to the ssdutil and it will automatically choose the device on which /host partition is mounted which is the primary storage device in our case as per the PR: sonic-net/sonic-utilities#3399

#### How to verify it

Run `sudo show platform ssdhealth` without any arguments with a flash drive plugged into the sonic switch.

#### Previous command output (if the output of a command-line utility has changed)

```
root@qa-eth-vt19-1-4280:~# show platform ssdhealth
Disk Type    : NVME
Device Model : N/A
Health       : N/A
Temperature  : N/A
```

#### New command output (if the output of a command-line utility has changed)

```
root@qa-eth-vt19-1-4280:/home/admin# show platform ssdhealth
Disk Type    : NVME
Device Model : Virtium VTPM24CEXI080-BM110006
Health       : 100.0%
Temperature  : 51.0C
```

In the case where the user passes the device name as argument to the command (`show platform ssdhealth /dev/nvme0n1`) output remains the same and no changes have been made.
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: sonic-net/sonic-utilities#3833

@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit af259a7 into Azure:202412 Apr 15, 2025
4 of 6 checks passed
arlakshm added a commit that referenced this pull request Apr 22, 2025
….msft into 202503 #169

Merge from 202412 to get the latest commits

bf8cb1f [Mellanox] Support Mellanox Spectrum5 ASIC in generic configuration update (#168)
af259a7 Fix show platform ssdhealth not showing expected output when a usb flash drive is plugged in (#166)
98949e4 [SRv6] add support for SRv6 counters (#167)
380345f Merge pull request #165 from mssonicbld/sonicbld/202412-merge
4899593 Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412
606a90a (public/202411) Fixed syslog error "ERR python3:- validateNamespace: Initialize global.." for sfpshow (#3849)
cd1be5b Merge pull request #163 from mssonicbld/sonicbld/202412-merge
38f299c Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412
8c46f71 [sfputil] add support for sfputil debug tx-output/rx-output {port} enable/disable (#162)
a6fcf56 [show][interfaces] Add proposal for show interfaces flap (#3627) (#3823)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant