Fix show platform ssdhealth not showing expected output when a usb flash drive is plugged in#3833
Merged
judyjoseph merged 1 commit intosonic-net:masterfrom Apr 14, 2025
Conversation
…ash drive is plugged in.
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vivekrnv
approved these changes
Apr 8, 2025
oleksandrivantsiv
approved these changes
Apr 8, 2025
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
Contributor
|
Please add any branches it needs to be cherry-picked @tirupatihemanth @liat-grozovik |
Collaborator
|
Cherry-pick PR to msft-202412: Azure/sonic-utilities.msft#166 |
nmoray
pushed a commit
to nmoray/sonic-utilities
that referenced
this pull request
Jun 25, 2025
…ash drive is plugged in. (sonic-net#3833)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
show platform ssdhealthnot 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: #3399
How to verify it
Run
sudo show platform ssdhealthwithout any arguments with a flash drive plugged into the sonic switch.Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
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.