dell / iDRAC-Redfish-Scripting

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

Can add a sample for "Targets" parameter use in SimpleUpdate API? #247

Closed poisson0106 closed 1 year ago

poisson0106 commented 1 year ago

Hi

Recently I used the DeviceFirmwareSimpleUpdateREDFISH.py in this repository to implement an install firmware task by iDrac. With check the Dell API document https://developer.dell.com/apis/2978/versions/6.xx/openapi.yaml/paths/~1redfish~1v1~1UpdateService~1Actions~1UpdateService.SimpleUpdate/post , I found that there is an parameter called "Targets" which indicates "An array of URIs that indicate where to apply the update image.“ But I'm not clear about how to use this parameters and what effect this parameter is. Since when calling simpleUpate, it seems to update current node by downloaded firmware. So not very clear what means "where to apply the update image" and also not clear what URI refers to.

So can there be another example code added in DeviceFirmwareSimpleUpdateREDFISH.py to show how to use this parameter?

Thanks

texroemer commented 1 year ago

Hi @poisson0106

Targets parameter for SimpleUpdate action is not supported by iDRAC. This is a documentation issue and i've already escalated to internal teams at Dell to get this corrected in the documentation.

Thanks for pointing this out. Tex

poisson0106 commented 1 year ago

Hi @texroemer

Thank you for your reply! So I wonder there is a way to tell iDrac which device should be applied to update with provided firmware package in Redfish API? In my case, I meet a issue that one firmware EXE package contains two updates for two devices. But I only need to update one of them. If I upload this firmware EXE package to iDrac, it will hint me to upgrade both of them. So is there anyway to update certain one?

Thanks

texroemer commented 1 year ago

Currently the behavior you described is not supported by iDRAC. Say your server has Intel X710 integrated card and Intel X710 pcie card. When you upload the Dell Update Package (DUP) for Intel X710 card, the DUP will update both the integrated and pcie card since these devices leverage the same component ID in the DUP package.xml file.

But this is a great idea and i'll bring this up to iDRAC internal teams, see if this support can get added in a future iDRAC release where if the DUP can handle updating multiple same devices, allow the user to select which device the update gets applied to.

Btw can you let me know which two devices are being updated for the same DUP?

poisson0106 commented 1 year ago

Hi @texroemer

With PowerEdge XR4510c and XR4520c, M2 SSD would be used both as boot disk under BOSS and capacity disk. The disks can be of different capacity, for example 480G disk for BOSS, and 1.92TB disk for capacity. We only want BOSS firmware to be upgraded

Do you know suppose I have two disks on the node. Disk 1 is already using Firmware version 2, Disk 2 is using Firmware version 1. When I upgrade firmware version 2 through iDRAC, will the upgrade skip upgrade disk1 or will reinstall the firmware 2 for disk 1?

texroemer commented 1 year ago

Thanks for the details about what devices you're trying to update. So this workflow is currently also not supported by iDRAC. Once the DUP payload has downloaded, it will attempt to apply to all supported devices which have the same component ID. As a workaround you'll need to remove the drive you don't want the firmware to get applied to and then run the update.

Also I've already started an internal discussion with our teams about adding this support in a future iDRAC release.

Thanks Tex

texroemer commented 1 year ago

Found out a better workaround until iDRAC supports this workflow. From the OS you can run the update package and only update a specific drive. See below where i tell the BIN file to only update one of the drives in my server.

[root@localhost opt]# ./SAS-Drive_Firmware_D7RNT_LN64_DSA4_A00.BIN -qi -q
Disk.Bay.0:Enclosure.RAID.Integrated.1-1,DSA3
Disk.Bay.1:Enclosure.RAID.Integrated.1-1,DSA3

[root@localhost opt]# ./SAS-Drive_Firmware_D7RNT_LN64_DSA4_A00.BIN --selectiveupdate=Disk.Bay.0:Enclosure.RAID.Integrated.1-1 -q
Collecting inventory...
...
Running validation...

MZILT3T8HBLS0D3

The version of this Update Package is newer than the currently installed version.
Software application name: Firmware for - Disk 0 of PERC H745 Front Controller 0
FQDD: Disk.Bay.0:Enclosure.RAID.Integrated.1-1
 Package version: DSA4
Installed version: DSA3

Executing update...
WARNING: DO NOT STOP THIS PROCESS OR INSTALL OTHER PRODUCTS WHILE UPDATE IS IN PROGRESS.
THESE ACTIONS MAY CAUSE YOUR SYSTEM TO BECOME UNSTABLE!
....................................................................................................................
The update completed successfully.

[root@localhost opt]# ./SAS-Drive_Firmware_D7RNT_LN64_DSA4_A00.BIN -qi -q
Disk.Bay.0:Enclosure.RAID.Integrated.1-1,DSA4
Disk.Bay.1:Enclosure.RAID.Integrated.1-1,DSA3

After you run the update from the OS, OS will report the correct firmware version for each drive but iDRAC firmware will not be updated and report the correct version. Reboot the server to update iDRAC firmware inventory.

Thanks Tex

poisson0106 commented 1 year ago

Hi @texroemer

Thank you for your workaround. We will try to use it in our environment. Thank you for the detailed reply, I have no more question so I close this issue.

Thanks