| commit | 447d0daa6ed1855a9fcd077f17665ff8d9683db3 | [log] [tgz] |
|---|---|---|
| author | Adriana Kobylak <anoo@us.ibm.com> | Mon Mar 15 13:40:52 2021 -0500 |
| committer | Adriana Kobylak <anoo@us.ibm.com> | Tue Mar 16 14:50:19 2021 +0000 |
| tree | 77c3419b95f06607ecfd562b040ac10131f8022f | |
| parent | 1fd6dddf7d8203b04a0ff9878f74bc07ffdc0a1e [diff] |
image_manager: Create error on machine mismatch
Currently the image manager only logs a journal entry if the machine
does not match. Create an error log so that it is easier to the user to
determine what the error is since an error log is exposed via REST and
the web interface. Use the existing ImageFailure error, as it seems
relevant to the machine not matching.
Tested: Verified a new ImageFailure error was created:
$ curl -k -H "X-Auth-Token: $token" \
https://${bmc}/xyz/openbmc_project/logging/entry/2
{
"data": {
"AdditionalData": [
"FAIL=Machine name does not match",
"PATH=/tmp/images/imageL4OiKL/MANIFEST",
"_PID=487"
],
"Message": "xyz.openbmc_project.Software.Image.Error.ImageFailure",
$ curl -k -H "X-Auth-Token: $token"
https://${bmc}/xyz/openbmc_project/logging/entry/4
{
"data": {
"AdditionalData": [
"FAIL=MANIFEST is missing machine name",
"PATH=/tmp/images/imageqwT1cj/MANIFEST",
"_PID=477"
],
"Message": "xyz.openbmc_project.Software.Image.Error.ImageFailure",
Change-Id: Ie6681acea51e328c4bfe5bbd3af9aff32e8e539d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.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.