stmcginnis / gofish

Gofish is a Golang client library for DMTF Redfish and SNIA Swordfish interaction.
BSD 3-Clause "New" or "Revised" License
211 stars 112 forks source link

Querying NVMe SSDs through RedFish always reports Health of the disk as Critical #303

Closed pruthvitd closed 2 months ago

pruthvitd commented 6 months ago

Health of the NVMe is reported from the IMM, where as RedFish API reports the state a Critical though the disk works fine. The Critical state reported by RedFish seem to be false.

Is it possible to get a fix from gofish library on this?

Health reported by IMM:

system> storage -list devices
Drive 0             Normal          
Drive 1             Normal          
M2 Drive 0          Normal          
M2 Drive 1          Normal  

Health status from RedFish call:

{
   "PredictedMediaLifeLeftPercent":100,
   "Model":"MZWLJ7T6HALA-000V5",
   "BlockSizeBytes":null,
   "EncryptionAbility":null,
   "RotationSpeedRPM":0,
   "HotspareType":"None",
   "Id":"Drive.Bay_0",
   "AssetTag":"",
   "@odata.type":"#Drive.v1_15_0.Drive",
   "@odata.id":"/redfish/v1/Systems/1/Storage/Direct_Attached_NVMe/Drives/Drive.Bay_0",
   "CapableSpeedGbs":null,
   "SKU":"02JK752",
   "Manufacturer":"Lenovo (Samsung)",
   "Protocol":"NVMe",
   "FailurePredicted":false,
   "Identifiers":[
      {
         "DurableName":null,
         "DurableNameFormat":"UUID"
      }
   ],
   "PhysicalLocation":{
      "PartLocation":{
         "LocationType":"Bay",
         "LocationOrdinalValue":0,
         "ServiceLabel":"Drive 0"
      }
   },
   "Name":"7.68TB NVMe SSD",
   "Description":"This resource is used to represent a drive for a Redfish implementation.",
   "NegotiatedSpeedGbs":null,
   "Oem":{
      "Lenovo":{
         "Temperature":30,
         "@odata.type":"#LenovoDrive.v1_0_0.LenovoDrive"
      }
   },
   "PartNumber":"SSS7A75113",
   "CapacityBytes":7680000000000,
   "EncryptionStatus":null,
   "@odata.context":"/redfish/v1/$metadata#Drive.Drive",
   "Status":{
      "State":"Enabled",
      "Health":"Critical"
   },
   "MediaType":"SSD",
   "SerialNumber":"S5LLNE0R501013",
   "Links":{
      "PCIeFunctions":[

      ],
      "Chassis":{
         "@odata.id":"/redfish/v1/Chassis/1"
      },
      "Volumes":[

      ]
   },
   "@odata.etag":"\"8bb3209a1c6326760b5\"",
   "Revision":"CQ36"
}
stmcginnis commented 4 months ago

Sorry for the delay. It looks like this may be because of the status response?

"Health":"Critical"

Is this the output from the gofish object or the JSON data returned from the query? If we could get the curl output I can take a look at what the system is sending and try to figure out more.

It would be something like:

curl -s \
    -X GET \
    -k \
    -H "Content-type: application/json"  \
    -u "$USER:$PASS" \
    https://$HOST/redfish/v1/Chassis/Backplane/Drives/Disk.Bay.0  | jq .
stmcginnis commented 2 months ago

This looks to be an issue with the data reported by the system, so closing. If there is more information that points to a gofish problem, please feel free to reopen and include more data.