commit | 64fa91675a10fbc429b53b92e7f3ce77ce831c59 | [log] [tgz] |
---|---|---|
author | Jagpal Singh Gill <paligill@gmail.com> | Tue Nov 12 16:16:47 2024 -0800 |
committer | Patrick Williams <patrick@stwcx.xyz> | Thu Dec 12 17:33:37 2024 +0000 |
tree | aa8cd7a61d0bd0ffcae173536988fba6d405d892 | |
parent | 67b2e53b2e598bb50fddfa1531e3ab7c2adf2007 [diff] |
change default to use fw Update D-Bus interface Currently, the firmware update images are being downloaded onto /tmp/images directory which are watched by phosphor-bmc-code-mgmt to start an update. The current flow only supports single update at a time. More details on problem description and specific requirements have been captured in [1]. The intent of this change is to start the use of an Update D-Bus interface which has been implemented using redfish-updateservice-use-dbus feature flag. Through this change BMCWeb will download the image in memory and pass the image fd to the backend using D-Bus interface. Change redfish-updateservice-use-dbus default to enabled. [1]: https://github.com/openbmc/docs/blob/master/designs/code-update.md Related PRs: https://gerrit.openbmc.org/q/topic:EnableUpdateInterface Tested: ``` Metadata: Namespaces missing from $metadata: set() Elapsed time: 0:00:33 missingRedfishAlias: 1 pass: 4343 passAction: 16 passGet: 217 passRedfishUri: 208 skipNoSchema: 3 skipOptional: 4001 unvalidated: 1 unverifiedAdditional.complex: 1 warnDeprecated: 5 warningPresent: 6 warnings: 4 Validation has succeeded. > curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/UpdateService/FirmwareInventory { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/a79d71e4" } ], "Members@odata.count": 1, "Name": "Software Inventory Collection" } > curl -k -H "X-Auth-Token: $token" -H "Content-Type:multipart/form-data" -X POST -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/a79d71e4\"],\"@Redfish.OperationApplyTime\":\"OnReset\"};type=application/json" -F "UpdateFile=@obmc-phosphor-image-romulus-20241015174416.static.mtd.tar;type=application/octet-stream" https://${bmc}/redfish/v1/UpdateService/update { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "Id": "0", "TaskState": "Running", "TaskStatus": "OK" } > curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/TaskService/Tasks/0 { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2024-11-14T01:01:36+00:00", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.3.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 10 percent complete.", "MessageArgs": [ "0", "10" ], "MessageId": "TaskEvent.1.0.3.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 100 percent complete.", "MessageArgs": [ "0", "100" ], "MessageId": "TaskEvent.1.0.3.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has completed.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.3.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update" }, "PercentComplete": 100, "StartTime": "2024-11-14T01:01:04+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ``` Change-Id: Ice710e9b44e60bc60b7c2d512ac6d98fa770dc56 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson setup builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects
.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data
namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.