Skip to content

Fix Micron NVMe disk health output showing N/A#694

Open
gauravnagesh-msft wants to merge 1 commit into
sonic-net:masterfrom
gauravnagesh-msft:fix-micron-nvme-disk-health-output
Open

Fix Micron NVMe disk health output showing N/A#694
gauravnagesh-msft wants to merge 1 commit into
sonic-net:masterfrom
gauravnagesh-msft:fix-micron-nvme-disk-health-output

Conversation

@gauravnagesh-msft

Copy link
Copy Markdown

Description

Adding Micron to the list of NVMe SSD vendors that skip vendor-specific parsing in fetch_parse_info() For Micron NVMe SSDs, the generic NVMe parser parse_nvme_ssd_info already correctly extracts the health value from the smartctl Percentage Used field. However, the code then proceeds to call parse_micron_info() which attempts to parse SATA-specific attributes (Percent_Lifetime_Used / Percent_Lifetime_Remain) that don't exist in NVMe output, overwriting the valid health value with N/A.

This fix adds Micron to the early-return guard (alongside the already-handled Virtium and ATP vendors) so that the vendor-specific parser is skipped for Micron NVMe devices.

Motivation and Context

On platforms using Micron NVMe SSDs, show platform ssdhealth incorrectly returns N/A even though smartctl provides valid health data. The root cause is that parse_micron_info() is designed for SATA drives and looks for SATA SMART attributes that are absent in NVMe output, causing it to overwrite the correct health value that was already parsed by parse_nvme_ssd_info().

How Has This Been Tested?

Tested on platforms using Micron NVMe SSD disks

Before changes :

# show platform ssdhealth
Disk Type    : NVME
Device Model : Micron_XXXXXXXX
Health       : N/A
Temperature  : 35.0C

After changes :

# show platform ssdhealth
Disk Type    : NVME
Device Model : Micron_XXXXXXXX
Health       : 100.0%
Temperature  : 35.0C

Additional Information (Optional)

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

ashwnsri
ashwnsri previously approved these changes Jun 15, 2026

@vvolam vvolam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gauravnagesh-msft

nit: could you update the list in the comments at the beginning of the file too?

# Generic implementation of the SSD health API
# SSD models supported:
#  - InnoDisk
#  - StorFly
#  - Virtium
-----------?

@vvolam

vvolam commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@gauravnagesh-msft This https://github.com/sonic-net/sonic-host-services/pull/386/changes might help to fix PR pipeline issue. Please see if similar fix is needed here?

@gauravnagesh-msft

Copy link
Copy Markdown
Author

/azpw run

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1139399:

✅Stage __default:

Signed-off-by: gauravnagesh-msft <274629584+gauravnagesh-msft@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vvolam vvolam requested a review from judyjoseph June 15, 2026 21:27
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.

4 participants