Closed an0wak closed 2 years ago
hi @an0wak
Rollback is supported in Redfish for iDRAC 9 (iDRAC 7/8 not supported), please see script "DeviceFirmwareRollbackREDFISH.py" for this feature.
Thanks Tex
Thanks Tex - exactly what I needed - was looking @ powershell version. but I can translate it.
@an0wak
Created a cmdlet for rollback support, example of executing it to rollback BIOS version:
PS C:\> Set-DeviceFirmwareRollbackREDFISH -idrac_ip 192.168.0.120 -idrac_username root -idrac_password calvin -get_rollback_devices y
- Supported Rollback Devices -
/redfish/v1/UpdateService/FirmwareInventory/Previous-101560-25.5.8.0001__RAID.Mezzanine.1-1
/redfish/v1/UpdateService/FirmwareInventory/Previous-105516-19.5.12__NIC.Embedded.1-1-1
/redfish/v1/UpdateService/FirmwareInventory/Previous-159-2.11.2__BIOS.Setup.1-1
/redfish/v1/UpdateService/FirmwareInventory/Previous-25227-5.10.00.00__iDRAC.Embedded.1-1
PS C:\> Set-DeviceFirmwareRollbackREDFISH -idrac_ip 192.168.0.120 -idrac_username root -idrac_password calvin -rollback_uri "/redfish/v1/UpdateService/FirmwareInventory/Previous-159-2.11.2__BIOS.Setup.1-1" -reboot_server y
- INFO, creating rollback job ID for URI '/redfish/v1/UpdateService/FirmwareInventory/Previous-159-2.11.2__BIOS.Setup.1-1'
- PASS, statuscode 202 returned successfully for POST command to create update job ID 'JID_369901007312'
- INFO, script will now loop polling the job status every 5 seconds until marked either scheduled or completed
- Job ID 'JID_369901007312' not marked scheduled or completed, checking job status again
- Job ID 'JID_369901007312' not marked scheduled or completed, checking job status again
- Job ID 'JID_369901007312' not marked scheduled or completed, checking job status again
- Job ID 'JID_369901007312' not marked scheduled or completed, checking job status again
- PASS, job ID 'JID_369901007312' successfully marked as scheduled
- INFO, user selected to reboot the server now to rollback device firmware.
- PASS, statuscode 200 returned successfully to get current power state
- INFO, Server current power state is ON, performing graceful shutdown
- PASS, statuscode 204 returned to attempt graceful server shutdown
- PASS, validated server in OFF state
- PASS, statuscode 204 returned successfully to power ON the server
- INFO, script will now loop polling the job status every 30 seconds until marked completed
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- Job ID 'JID_369901007312' not marked completed, checking job status again
- PASS, job ID 'JID_369901007312' successfully marked as completed
Rollback Firmware job execution time:
Minutes Seconds
------- -------
5 42
Within RACADM there is a rollback command.
Unfortunately I am unable to find the equivalent through the API? Does it exist?
Regards