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>
diff --git a/meson.options b/meson.options
index d1a9dda..5e9e796 100644
--- a/meson.options
+++ b/meson.options
@@ -329,7 +329,7 @@
option(
'redfish-updateservice-use-dbus',
type: 'feature',
- value: 'disabled',
+ value: 'enabled',
description: '''Enables xyz.openbmc_project.Software.Update D-Bus interface
to propagate UpdateService requests to the corresponding
updater daemons instead of moving files to /tmp/images dir.