dell / iDRAC-Redfish-Scripting

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

PowerEdge R730xd showing bios Updatable: True however it is already on latest version #213

Closed yogesh3tech closed 2 years ago

yogesh3tech commented 2 years ago

Hi Team. I am using DeviceFirmwareSimpleUpdateREDFISH.py and updated the BIOS, Firmware version to 2.14.0 however it is still showing it as Updatable: True

I think it should not be "Updatable: True" as it is already on the latest available version. PLease suggest if my understanding is different here

yogesh3tech commented 2 years ago

image

yogesh3tech commented 2 years ago

image

nymalo commented 2 years ago

Did you reboot after the update? Ia there a BIOS update in the job queue?

yogesh3tech commented 2 years ago

Thanks, @nymalo for your prompt response.

Yes, I rebooted the server after the update.

image

texroemer commented 2 years ago

Hi @yogesh3tech

Updateable property means the interface (iDRAC) supports updating firmware for this device. Value of True means iDRAC can update the firmware for this device.

From the DMTF spec for this property:

Updateable boolean read-only (null) An indication of whether the Update Service can update this software

Thanks Tex

yogesh3tech commented 2 years ago

Hi @texroemer,

Thank you for the information. Is there a way I can get the details of devices that are up-to-date versus needs a firmware update?

For example, the Current BIOS Version on my system is 2.13.0 while the latest available version from Dell is 2.14.0. I need help on getting these details so that we can update the firmware on time to keep the system updated.

texroemer commented 2 years ago

Hi @yogesh3tech

To validate if your server is up to date with latest firmware versions, you'll need to leverage iDRAC repository update feature (InstallFromRepositoryREDFISH.py). Using this script, you can point to "downloads.dell.com" repository to verify if your server is up to date with latest versions. See workflow below of executing this script.

  1. First i'll check my server against the Dell repository by running install but passing in False for --applyupate and --rebootneeded. By passing in False for both arguments, this will only validate iDRAC versions against repo versions.
C:\Python39>InstallFromRepositoryREDFISH.py -ip 192.168.0.120 -u root -p calvin --install --shareip downloads.dell.com --sharetype HTTPS --applyupdate False --rebootneeded False --sharename catalog

- PASS, POST command passed for method "InstallFromRepository", status code 202 returned
- PASS, repository job ID JID_511023661906 successfully created
- INFO, script will now loop checking the repo update job status

- INFO, repository package successfully downloaded, "RebootNeeded = False" detected or argument not passed in. Check the overall Job Queue for update jobs using --get-jobqueue argument. Next server manual reboot, any scheduled update job(s) will execute.

- INFO, if iDRAC update is detected, this update job will not get created and execute until all scheduled update jobs have been completed
  1. Now that i've attempted to perform an install against a repository, i can check the repo details to see what devices need an update. On my server multiple devices need an update to latest (BIOS, Network cards, OS driver pack and iDRAC).
C:\Python39>InstallFromRepositoryREDFISH.py -ip 192.168.0.120 -u root -p calvin --get-repo-list

- PASS: POST command passed to get repo update list, status code 200 returned

- Repo Based Update List in XML format

<?xml version="1.0"?>
<CIM xmlns:fo="http://www.w3.org/1999/XSL/Format" CIMVERSION="2.0" DTDVERSION="2.0">
  <MESSAGE ID="4711" PROTOCOLVERSION="1.0">
    <SIMPLEREQ>
      <VALUE.NAMEDINSTANCE>
        <INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>2</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>Dell EMC Server BIOS PowerEdge C6420 Version 2.13.3</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>FOLDER08044997M/1/BIOS_KHHWP_WN64_2.13.3.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>BIOS_KHHWP_WN64_2.13.3.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>2.13.3</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>HOST</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
    <PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#741__BIOS.Setup.1-1</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>159</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>BIOS</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#741__BIOS.Setup.1-1</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>2.11.2</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>

  </INSTANCENAME>
      </VALUE.NAMEDINSTANCE>
      <VALUE.NAMEDINSTANCE>
        <INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>1</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>Intel NIC Family Version 20.5.0 Firmware for I350, I354, X520, X540, and X550 adapters</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>FOLDER07612773M/1/Network_Firmware_HR5TP_WN64_20.5.13_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>Network_Firmware_HR5TP_WN64_20.5.13_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>20.5.13</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>HOST</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
    <PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#701__NIC.Embedded.1-1-1</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>105516</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>FRMW</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY><VALUE>8086:1521:1028:0757</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY><VALUE>VendorID:DeviceID:SubVendorID:SubDeviceID</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#701__NIC.Embedded.1-1-1</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>19.0.12</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>

  </INSTANCENAME>
      </VALUE.NAMEDINSTANCE>
      <VALUE.NAMEDINSTANCE>
        <INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>1</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>Intel NIC Family Version 20.5.0 Firmware for X710, XXV710, and XL710 adapters</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>FOLDER07612797M/1/Network_Firmware_M20T0_WN64_20.5.13_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>Network_Firmware_M20T0_WN64_20.5.13_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>20.5.13</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>HOST</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
    <PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#701__NIC.Mezzanine.3-1-1</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>105105</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>FRMW</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY><VALUE>8086:1572:8086:000B</VALUE><VALUE>8086:1572:8086:0000</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY><VALUE>VendorID:DeviceID:SubVendorID:SubDeviceID</VALUE><VALUE>VendorID:DeviceID:SubVendorID:SubDeviceID</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#701__NIC.Mezzanine.3-1-1</VALUE><VALUE>DCIM:INSTALLED#701__NIC.Mezzanine.3-2-1</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>20.0.17</VALUE><VALUE>20.0.17</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>

  </INSTANCENAME>
      </VALUE.NAMEDINSTANCE>
      <VALUE.NAMEDINSTANCE>
        <INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>1</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>Dell EMC iDRAC Service Module Embedded Package v4.2.0.0, A00</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>FOLDER08118677M/1/Systems-Management_Application_21NN2_WN64_4.2.0.0_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>Systems-Management_Application_21NN2_WN64_4.2.0.0_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>4.2.0.0</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>NONE</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
    <PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#802__ServiceModule.Embedded.1</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>104684</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>APAC</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#802__ServiceModule.Embedded.1</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>4.1.0.0</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>

  </INSTANCENAME>
      </VALUE.NAMEDINSTANCE>
      <VALUE.NAMEDINSTANCE>
        <INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>3</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>Dell OS Driver Pack</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>FOLDER07590968M/1/Drivers-for-OS-Deployment_Application_F93HH_WN64_21.07.06_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>Drivers-for-OS-Deployment_Application_F93HH_WN64_21.07.06_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>21.07.06</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>NONE</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
    <PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#802__DriverPack.Embedded.1:LC.Embedded.1</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>18981</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>APAC</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#802__DriverPack.Embedded.1:LC.Embedded.1</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>21.03.08</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>

  </INSTANCENAME>
      </VALUE.NAMEDINSTANCE>
      <VALUE.NAMEDINSTANCE>
        <INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>1</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>iDRAC 5.10.10.00</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>FOLDER08299705M/1/iDRAC-with-Lifecycle-Controller_Firmware_FPTF1_WN64_5.10.10.00_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>iDRAC-with-Lifecycle-Controller_Firmware_FPTF1_WN64_5.10.10.00_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>5.10.10.00</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>IDRAC</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
    <PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>25227</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>FRMW</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>5.00.00.00</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>

  </INSTANCENAME>
      </VALUE.NAMEDINSTANCE>
    </SIMPLEREQ>
  </MESSAGE>
</CIM>

- INFO, get repo based update list data is also copied to file "repo_based_update_list.xml"
  1. Now if you want to apply the updates, run install again but pass in True for --applyreboot and --rebootneeded arguments so the updates will now get applied.

Example:

InstallFromRepositoryREDFISH.py -ip 192.168.0.120 -u root -p calvin --install --shareip downloads.dell.com --sharetype HTTPS --applyupdate True --rebootneeded True --sharename catalog

Thanks Tex