From f932828dae5db8080a00c36955e67a35333cecea Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Wed, 15 Jul 2026 15:13:17 +1000 Subject: [PATCH] Fix Micron NVMe disk health output showing N/A (#711) #### 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 #### Additional Information (Optional) --- sonic_platform_base/sonic_storage/ssd.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sonic_platform_base/sonic_storage/ssd.py b/sonic_platform_base/sonic_storage/ssd.py index d37c9d1..97508a9 100644 --- a/sonic_platform_base/sonic_storage/ssd.py +++ b/sonic_platform_base/sonic_storage/ssd.py @@ -6,6 +6,11 @@ # - InnoDisk # - StorFly # - Virtium +# - Swissbit +# - Intel +# - Transcend +# - ATP +# - Micron try: import re @@ -104,9 +109,9 @@ def fetch_parse_info(self, diskdev): # Known vendor part if self.model: vendor = self._parse_vendor() - # For Virtium, ATP NVMe SSD, parse_generic_ssd_info should be called. + # For Virtium, ATP, Micron NVMe SSD, parse_generic_ssd_info should be called. # Skip here, otherwise data will be overwritten by N/A. - if vendor in ['Virtium', 'ATP'] and "nvme" in self.dev: + if vendor in ['Virtium', 'ATP', 'Micron'] and "nvme" in self.dev: return if vendor: