| commit | 5622ee92750f7f7af0d47314c1b679e975652022 | [log] [tgz] |
|---|---|---|
| author | Alexander Hansen <alexander.hansen@9elements.com> | Tue Feb 18 14:13:30 2025 +0100 |
| committer | Alexander Hansen <alexander.hansen@9elements.com> | Fri Feb 21 14:09:04 2025 +0100 |
| tree | 18023f988c4a3424ac289f6ca54764fb37b0eebe | |
| parent | 85aed223a200a7769a27a281662ce991db09420a [diff] |
common: activation progress not taking effect
'class Device' has member function
```
bool setUpdateProgress(uint8_t progress) const;
```
to update the activation status, which set the activation status for
device->softwarePending.
'softwarePending' however was only set on the class after the update to
the device already succeeded. So 'Device::updateDevice' could not
update the activation progress via 'Device::setUpdateProgress'
Fix this bug by setting 'softwarePending' before 'updateDevice' is
called.
Tested: With SPI Device Code Updater.
The activation progress is now set as expected.
```
curl --silent --insecure --user root:root https://${bmc}/redfish/v1/TaskService/Tasks/0
```
Output:
```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"EndTime": "2025-02-18T14:05:46+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.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.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 20 percent complete.",
"MessageArgs": [
"0",
"20"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 70 percent complete.",
"MessageArgs": [
"0",
"70"
],
"MessageId": "TaskEvent.1.0.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.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.TaskCompletedOK",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"JsonBody": "null",
"TargetUri": "/redfish/v1/UpdateService/update"
},
"PercentComplete": 90,
"StartTime": "2025-02-18T14:04:47+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Completed",
"TaskStatus": "OK"
}
```
Change-Id: I4b22a37215357b83300f8368f75d3c025cd5d06b
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps:
meson buildninja -C buildTo clean the repository run rm -r build.