[code sync] Merge code from sonic-net/sonic-platform-common:202511 to 202601 - #119
Merged
Merged
Conversation
mssonicbld
commented
Jul 16, 2026
Collaborator
<!-- Provide a general summary of your changes in the Title above --> #### 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 ``` Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com> #### Additional Information (Optional)
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.