Redfish Software Updates in OpenBMC

Andrew Geissler geissonator at gmail.com
Fri Jan 11 09:43:02 AEDT 2019


Greetings,

Recently I've started to dig into what it's going to take to fully support
our OpenBMC implementation of code update within Redfish.
Specifically, how to support our REST based upload of the .tar images for
both our BMC and BIOS.

The current flow is the following for both BMC and BIOS:

# Upload image and get hash back identifying image
hash = POST -T <file_to_upload> https://${bmc}/upload/image

# Activate the image (i.e. write it to the flash chip)
PUT -d '{"data":
  "xyz.openbmc_project.Software.Activation.RequestedActivations.Active"}' \
  https://${bmc}/xyz/openbmc_project/software/<hash>/attr/RequestedActivation

# wait for update to complete
GET https://${bmc}/xyz/openbmc_project/software/<hash>/attr/Progress

# Verify "Activation" property is set to "Active"
GET https://${bmc}/xyz/openbmc_project/software/<hash>

# If a BMC update, reboot the BMC

There are then a set of REST api's we support to query the firmware images
loaded, which one's are active, and what the priority of each. We have a
priority concept for systems that support redundant flash chips which allows
a user to quickly switch between the activated firmware image for BMC or BIOS.


Redfish defines a UpdateService schema[a]. An action available on the
UpdateService is a SimpleUpdate interface. I think the flow to use this would
look like this:

# Retrieve the URI to upload an image to
HttpPushUri = GET  /redfish/v1/UpdateService

# Upload firmware image
ImageURI = POST HttpPushUri

# Call SimpleUpdate and point it to the "ImageURI" (returned from POST) Also
# point it to the redfish "Targets" to update(i.e. /redfish/v1/Managers/openbmc)
task = POST redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate

# Call TaskService (?) to see when operations is completed
GET redfish/v1/TaskService/Tasks/<task>

The main issue with the above is the loss of our ability to have multiple
firmware images of the same type in a system and to be able to change the
priority of them to switch back and forth between them. It's also not obvious
to me what the target is for the BIOS when doing an update of it? There are OEM
options for both Actions and Properties if needed (but would be great to avoid).

I looked around a bit at other implementations of the UpdateService.
SuperMicro[b] and Dell[c] created their own OEM commands for the update
process (although Dell seems to also support the SimpleUpdate as well[d])

If any of you are reading, I'd appreciate some thoughts on why you went the OEM
route. Was it for more fine grained control? Or maybe for issues like I
highlight above with multiple image support?

We already have a good start on our UpdateService support in bmcweb:
https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/update_service.hpp

So before I dig much deeper, I'd definitely like to get some feedback from
the community on what y'all are thinking with software update and redfish!


[a] https://redfish.dmtf.org/schemas/UpdateService.v1_3_0.json
[b] https://www.supermicro.com/manuals/other/RedfishRefGuide.pdf
[c] https://topics-cdn.dell.com/pdf/idrac9-lifecycle-controller-v3212121_api-guide_en-us.pdf
[d] https://github.com/dell/iDRAC-Redfish-Scripting/blob/master/Redfish%20Python/DeviceFirmwareSimpleUpdateREDFISH.py

SuperMicro OEM Examples of Software Update:
# BMC
POST https://<IP>/redfish/v1/UpdateService/FirmwareInventory/BMC/Actions/Oem/FirmwareInventory.EnterBMCUpdateMode
POST https://<IP>/redfish/v1/UpdateService/FirmwareInventory/BMC/Actions/Oem/FirmwareInventory.UploadBMC
(File)
POST https://<IP>/redfish/v1/UpdateService/FirmwareInventory/BMC/Actions/Oem/FirmwareInventory.UpdateBMC
(preserve flags)
GET https://<IP>redfish/v1/UpdateService/FirmwareInventory/BMC/

# BIOS
POST https://<IP>/redfish/v1/UpdateService/FirmwareInventory/BIOS/Actions/Oem/FirmwareInventory.EnterBIOSUpdateMode
POST https://<IP>/redfish/v1/UpdateService/FirmwareInventory/BIOS/Actions/Oem/FirmwareInventory.UploadBIOS
(File)
POST https://<IP>/redfish/v1/UpdateService/FirmwareInventory/BIOS/Actions/Oem/FirmwareInventory.UpdateBIOS
(preserve flags)
GET https://<IP>redfish/v1/UpdateService/FirmwareInventory/BIOS/

Thanks,
Andrew


More information about the openbmc mailing list