dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
606 stars 279 forks source link

How to get ComponentID of all devices reliably? #80

Closed capriguy84 closed 3 years ago

capriguy84 commented 5 years ago

I would like to get the component ID for all devices that are firmware updateable. The one query that comes close to this is the "redfish/v1/UpdateService/FirmwareInventory". The componentID is in teh URL separated by string(current|Installed) and firmware version.

I noticed that it doesn't list all the components for the devices. Let's say a box has 24 disks, it only lists distinct firmwares and picks a random slot number in "Name" field.

Question:

Is there a better/more complete way of looking up component IDs and their respective firmware versions? Ofcourse using Redfish.

Note: The hwinventory and swinventory racadm cmds don't have componentIDs that I need

texroemer commented 5 years ago

Hi @capriguy84

Under URI "redfish/v1/UpdateService/FirmwareInventory", for each device in the server, you will see an INSTALLED entry. GET on this INSTALLED URI should have properties "ComponentID" and "Updateable". If ComponentID property returns a value of 0, this means (1) the device has never performed a firmware update or (2) system erase operation was executed on the Lifecycle Controller which erased information about current firmware versions.

For the behavior about disks, in current shipping iDRAC if all disks are the same, firmware inventory would report only one INSTALLED drive URI for that version. If you perform firmware update for HD, the update process will update all same disks detected which the firmware package supports. But in next iDRAC version 4.00 which is scheduled to be released next month, we changed behavior of firmware inventory and you will now see an INSTALLED entry per disk even if they are the same type.

I updated script "DeviceFirmwareSimpleUpdateREDFISH.py" which will now return component ID information for each device. This should now give you the details for each device, the component ID and if updateable. Example below of executing the script.

C:\Python27>DeviceFirmwareSimpleUpdateREDFISH.py -ip 192.168.0.120 -u root -p calvin -g y


Name: PERC H730P Mini Component ID: 101560 Version: 25.5.5.0005 Updatable: True

Name: OS COLLECTOR, 3.0, A00 Component ID: 101734 Version: 3.0 Updatable: True

Name: Intel(R) Ethernet Converged Network Adapter X710 - 3C:FD:FE:4F:09:C2 Component ID: 102302 Version: 18.8.9 Updatable: True

Name: BP14G+EXP 0:1 Component ID: 104102 Version: 2.25 Updatable: True

Name: iDRAC Service Module Installer Component ID: 104684 Version: 0 Updatable: True

Name: Disk 2 in Backplane 1 of RAID Controller in Mezzanine 1 Component ID: 105233 Version: KSC8 Updatable: True

Name: Disk 3 in Backplane 1 of RAID Controller in Mezzanine 1 Component ID: 105626 Version: AS0E Updatable: True

Name: Disk 0 on Integrated AHCI controller 1 Component ID: 106081 Version: DL42 Updatable: True

Name: Disk 0 in Backplane 1 of RAID Controller in Mezzanine 1 Component ID: 106425 Version: SSC3 Updatable: True

Name: BIOS Component ID: 159 Version: 2.2.11 Updatable: True

Name: Dell OS Driver Pack, 19.04.05, A00 Component ID: 18981 Version: 19.04.05 Updatable: True

Name: Integrated Dell Remote Access Controller Component ID: 25227 Version: 3.34.34.34 Updatable: True

Name: Dell 64 Bit uEFI Diagnostics, version 4301, 4301A29, 4301.30 Component ID: 25806 Version: 4301A29 Updatable: True

Name: System CPLD Component ID: 27763 Version: 1.0.7 Updatable: True

Name: Lifecycle Controller Component ID: 28897 Version: 3.34.34.34 Updatable: False

ScriptedPro commented 3 years ago

Could you please let me know why all the adapters for NICs and HBAs are not visible.

texroemer commented 3 years ago

Hi @suraprasad

Can you give me an example of the URI you are using where you don't see all the adapters listed? Are you using "redfish/v1/Chassis/System.Embedded.1/NetworkAdapters" and its not reporting all NICs in your server?

Thanks Tex

ScriptedPro commented 3 years ago

Thanks Tex for the quick update.

I am trying to pull the firmware report from this URI redfish/v1/UpdateService/FirmwareInventory

It's reporting only one NIC if all the adapters consists same firmware version.Why not all the adapters are listing.

Same behaviour for HBAs as well.

Thanks, Prasad

texroemer commented 3 years ago

URI "redfish/v1/UpdateService/FirmwareInventory" should report a firmware entry for each port on the card. Is this issue happening for all NIC cards in your server or just one? Can you try this on your server, SSH to the iDRAC and run "racadm swinventory" command, see if this output returns all port entries or you see the same issue?

Thanks Tex

ScriptedPro commented 3 years ago

I don't have any concerns with racadm and GUI. With redfish Suppose if I have 4 NICs I am able to see only one adapter.

Thanks, Prasad.

ScriptedPro commented 3 years ago

I have just gone though your old post in this thread with your example output which shows only one network adapter.

Name: Intel(R) Ethernet Converged Network Adapter X710 - 3C:FD:FE:4F:09:C2 Component ID: 102302 Version: 18.8.9 Updatable: True

Thanks, Prasad.

texroemer commented 3 years ago

Can you update to latest FW version for the Intel card which is 19.5.12 on Dell support site, see if issue is resolved. If issue still exists after updating the NIC FW, you will need to escalate this issue to Dell support so they can debug the server.

Thanks Tex