#
3a17e028
|
| 12-Oct-2020 |
Tim Lee <timlee660101@gmail.com> |
update_service: fix segmentation violation when updating images
Symptom: Before repo this issue symptom, we need to enable bmcweb debug option. Due to this issue is relevant to timing about callback
update_service: fix segmentation violation when updating images
Symptom: Before repo this issue symptom, we need to enable bmcweb debug option. Due to this issue is relevant to timing about callback function lifecycle. Thus, enable debugging will increae issue repo rate almost 100%.
Bmcweb.service was terminated abnormal after updating images via Redfish curl command. According debug log, bmcweb.service exited with status=11/SEGV (Segmentation Violation). That's usually a bug in a program such as pointer, null pointer, arrays and so on. The default action for a program upon receiving SIGSEGV is abnormal termination.
Coredump analysis: From the backtrace result that is point to softwareInterfaceAdded() of caller: at/home/tim/git/runbmc/openbmc/olympus-build/tmp/work/armv7a-openbmc-linux-gnueabi/bmcweb/ 1.0+gitAUTOINC+72d566d9eb-r0/recipe-sysroot/usr/include/c++/10.1.0/bits/shared_ptr.h:149 at/home/tim/git/runbmc/openbmc/olympus-build/tmp/work/armv7a-openbmc-linux-gnueabi/bmcweb/ 1.0+gitAUTOINC+72d566d9eb-r0/git/redfish-core/include/../lib/update_service.hpp:315
SEGV happen after executing line 84 in softwareInterfaceAdded() line: 83 // Found our interface, disable callbacks line: 84 fwUpdateMatcher = nullptr; line: 86 // Retrieve service and activate line: 87 crow::connections::systemBus->async_method_call(
Root cause: From coredump and backtrace result that segmentation violation issue in softwareInterfaceAdded(). softwareInterfaceAdded() is a callback function will be called by monitorForSoftwareAvailable(). When there is a signal relate to member is InterfacesAdded in object path /xyz/operbmc_project/software. However, this callback function pointer will set to NULL poniter in itself callback function. Thus, there is possible to hit SEGV issue when accessing to NULL function pointer.
Solution: Set fwUpdateMatcher as nullptr should remove it from softwareInterfaceAdded(). And that will be set as nullptr by call cleanUp() in monitorForSoftwareAvailable() after got response. Thus, it save to remove this line and avoid this SEGV then cause bmcweb.service terminated abnormal.
Tested: Update BMC image using UpdateService POST action: curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/octet-stream" -X POST -T tim/obmc-phosphor-image-olympus-nuvoton-20200921031720.static.mtd.tar https://${bmc}/redfish/v1/UpdateService
Update BMC image using UpdateService.SimpleUpdate POST action: curl -k -H "X-Auth-Token: $token" -X POST https://${bmc}/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate -d '{"ImageURI":"tftp://10.103.61.175/obmc-phosphor-image-olympus-nuvoton-20200921031720.static.mtd.tar"}'
Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: I01dcf56893b5ca64fe1d45f29f3f858761ccf2a8
show more ...
|
#
f23b7296
|
| 15-Oct-2020 |
Ed Tanous <ed@tanous.net> |
Turn on ALL perf checks
1st, alphabetize the tidy-list for good housekeeping.
Next, enable all the clang-tidy performance checks, and resolve all the issues. most of the issues boil down to: 1. Us
Turn on ALL perf checks
1st, alphabetize the tidy-list for good housekeeping.
Next, enable all the clang-tidy performance checks, and resolve all the issues. most of the issues boil down to: 1. Using std::move on const variables. This does nothing. 2. Passing big variables (like std::string) by value. 3. Using double quotes on a find call, which constructs an intermediate string, rather than using the character overload.
Tested Loaded on system, logged in successfully and pulled down webui-vue. No new errors.
Walked the Redfish tree a bit, and observed no new problems.
Ran redfish service validator. Got no new failures (although there are a lot of log service deprecation warnings that we should look at).
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I2238958c4b22c1e554e09a0a1787c744bdbca43e
show more ...
|
#
b5a76932
|
| 29-Sep-2020 |
Ed Tanous <ed@tanous.net> |
Lots of performance improvements
(In the voice of the kid from sixth sense) I see string copies...
Apparently there are a lot of places we make unnecessary copies. This fixes all of them.
Not sure
Lots of performance improvements
(In the voice of the kid from sixth sense) I see string copies...
Apparently there are a lot of places we make unnecessary copies. This fixes all of them.
Not sure how to split this up into smaller patches, or if it even needs split up. It seems pretty easy to review to me, because basically every diff is identical.
Change-Id: I22b4ae4f96f7e4082d2bc701098a04f7bed95369 Signed-off-by: Ed Tanous <ed@tanous.net> Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
show more ...
|
#
3cb3b116
|
| 19-Aug-2020 |
Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> |
update_service: add sufficient delay for fw object to get created
Add support to increase timeoutTimeSeconds to 10 secs to allow firmware object to create successfully to proceed for firmware update
update_service: add sufficient delay for fw object to get created
Add support to increase timeoutTimeSeconds to 10 secs to allow firmware object to create successfully to proceed for firmware update.
Tested: Redfish validator passed.
Updated the firmware using redfish for 16 times continuously. POST: https://<BMC_IP>/redfish/v1/UpdateService/ with <BMC_signed_cap> binary file firmware updated. { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "Id": "0", "TaskState": "Running", "TaskStatus": "OK" }
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> Change-Id: If86862c0c6519b3591bfa7e04cbb1ff13659b0d5
show more ...
|
#
2618d5e3
|
| 18-Aug-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Increase TFTP timeout
IBM, the only user of TFTP, has a system with 200MB images. https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/bmcweb/bmcweb_%25.bbappend#L2
In the futur
Increase TFTP timeout
IBM, the only user of TFTP, has a system with 200MB images. https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/bmcweb/bmcweb_%25.bbappend#L2
In the future this system's images might grow even larger.
Currently timed the TFTP transfer time at 2 min 37 sec on this system.
Bumped to 10 min though for room for the image to grow and pad the timeout in case an even slower network.
Considered a parameter, can add if it would ever get set to a different value.
Tested: TFTP update from GUI works with https://gerrit.openbmc-project.xyz/c/openbmc/webui-vue/+/35738 Change-Id: I1eed110c9605ee1e116670e46f561c66676e5eed Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
cb13a392
|
| 25-Jul-2020 |
Ed Tanous <ed@tanous.net> |
Enable unused variable warnings and resolve
This commit enables the "unused variables" warning in clang. Throughout this, it did point out several issues that would've been functional bugs, so I th
Enable unused variable warnings and resolve
This commit enables the "unused variables" warning in clang. Throughout this, it did point out several issues that would've been functional bugs, so I think it was worthwhile. It also cleaned up several unused variable from old constructs that no longer exist.
Tested: Built with clang. Code no longer emits warnings.
Downloaded bmcweb to system and pulled up the webui, observed webui loads and logs in properly.
Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
52cc112d
|
| 18-Jul-2020 |
Ed Tanous <ed@tanous.net> |
Remove middlewares
Middlewares, while kinda cool from an academic standpoint, make our build times even worse than they already are. Given that we only really use 1 real middleware today (token aut
Remove middlewares
Middlewares, while kinda cool from an academic standpoint, make our build times even worse than they already are. Given that we only really use 1 real middleware today (token auth) and it needs to move into the parser mode anyway (for security limiting buffer sizes), we might as well use this as an opportunity to delete some code.
Some other things that happen: 1. Persistent data now moves out of the crow namespace 2. App is no longer a template 3. All request_routes implementations no longer become templates. This should be a decent (unmeasured) win on compile times.
This commit was part of a commit previously called "various cleanups". This separates ONLY the middleware deletion part of that.
Note, this also deletes about 400 lines of hard to understand code.
Change-Id: I4c19e25491a153a2aa2e4ef46fc797bcb5b3581a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
4e0453b1
|
| 08-Jul-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Codespell redfish-core spelling fixes
These spelling errors were found using https://github.com/codespell-project/codespell Tested: Top commit (along with this) was built and ran against val
Codespell redfish-core spelling fixes
These spelling errors were found using https://github.com/codespell-project/codespell Tested: Top commit (along with this) was built and ran against validator. Change-Id: Ic9dce27b1de8567eedf7753164ef564d3aedf8ca Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
4cde5d90
|
| 11-Jun-2020 |
James Feist <james.feist@linux.intel.com> |
Update Service: Change error message based on error logs
THis adds support for better error responses based on the logs generated by phosphor-software-manager.
Tested: Got 400 error with different
Update Service: Change error message based on error logs
THis adds support for better error responses based on the logs generated by phosphor-software-manager.
Tested: Got 400 error with different messages based on failure type
{ "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid archive.", "MessageArgs": [ "/redfish/v1/UpdateService", "invalid archive" ], "MessageId": "OpenBMC.0.1.0.InvalidUpload", "Resolution": "None.", "Severity": "Warning" } ], "code": "OpenBMC.0.1.0.InvalidUpload", "message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid archive." } }
{ "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid image format.", "MessageArgs": [ "/redfish/v1/UpdateService", "invalid image format" ], "MessageId": "OpenBMC.0.1.0.InvalidUpload", "Resolution": "None.", "Severity": "Warning" } ], "code": "OpenBMC.0.1.0.InvalidUpload", "message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid image format." } }
{ "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_0_0.Message", "Message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources.", "MessageArgs": [ "/redfish/v1/UpdateService" ], "MessageId": "Base.1.4.0.ResourceExhaustion", "Resolution": "Ensure that the resources are available and resubmit the request.", "Severity": "Critical" } ], "code": "Base.1.4.0.ResourceExhaustion", "message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources." } }
Change-Id: Ida9a23c10aedbf9a48c96f4050a04e06bddff284 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
1214b7e7
|
| 04-Jun-2020 |
Gunnar Mills <gmills@us.ibm.com> |
clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Other OpenBMC repos are doing the same.
Tested: Built and validator passed. Change-Id: Ief26c755c9ce
clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Other OpenBMC repos are doing the same.
Tested: Built and validator passed. Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
fd9ab9e1
|
| 19-May-2020 |
James Feist <james.feist@linux.intel.com> |
FW Update: Task: Update messages
This adds reporting of percent updated and changes "staged" to paused to indicate some further action must happen to change state to Completed.
Tested: validator pa
FW Update: Task: Update messages
This adds reporting of percent updated and changes "staged" to paused to indicate some further action must happen to change state to Completed.
Tested: validator passed
"Messages": [ { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has started.", "MessageArgs": [ "2" ], "MessageId": "TaskEvent.1.0.1.TaskStarted", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 5 percent complete.", "MessageArgs": [ "2", 5 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 10 percent complete.", "MessageArgs": [ "2", 10 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 15 percent complete.", "MessageArgs": [ "2", 15 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 20 percent complete.", "MessageArgs": [ "2", 20 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 25 percent complete.", "MessageArgs": [ "2", 25 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 30 percent complete.", "MessageArgs": [ "2", 30 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 35 percent complete.", "MessageArgs": [ "2", 35 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 40 percent complete.", "MessageArgs": [ "2", 40 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 45 percent complete.", "MessageArgs": [ "2", 45 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 50 percent complete.", "MessageArgs": [ "2", 50 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 55 percent complete.", "MessageArgs": [ "2", 55 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 60 percent complete.", "MessageArgs": [ "2", 60 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 65 percent complete.", "MessageArgs": [ "2", 65 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 70 percent complete.", "MessageArgs": [ "2", 70 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 75 percent complete.", "MessageArgs": [ "2", 75 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 80 percent complete.", "MessageArgs": [ "2", 80 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 85 percent complete.", "MessageArgs": [ "2", 85 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 90 percent complete.", "MessageArgs": [ "2", 90 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 95 percent complete.", "MessageArgs": [ "2", 95 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has changed to progress 100 percent complete.", "MessageArgs": [ "2", 100 ], "MessageId": "TaskEvent.1.0.1.TaskProgressChanged", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has been paused.", "MessageArgs": [ "2" ], "MessageId": "TaskEvent.1.0.1.TaskPaused", "Resolution": "None.", "Severity": "Warning" }, { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 2 has Completed.", "MessageArgs": [ "2" ], "MessageId": "TaskEvent.1.0.1.TaskCompletedOK", "Resolution": "None.", "Severity": "OK" } ],
Change-Id: I32103e53486d459fe945a8b451d2092232c12e83 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
e5d5006b
|
| 11-May-2020 |
James Feist <james.feist@linux.intel.com> |
Task: Use TaskEvent messages
Task registry messages make more sense to use for task events then standard registry entries when applicable. Use them.
Tested:
"Messages": [ {
Task: Use TaskEvent messages
Task registry messages make more sense to use for task events then standard registry entries when applicable. Use them.
Tested:
"Messages": [ { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 0 has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.1.TaskStarted", "Resolution": "None.", "Severity": "OK" } ],
Validator passed
Change-Id: I707492544e18def2833e8a2e2216ce803c42c775 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
fe306728
|
| 12-Mar-2020 |
James Feist <james.feist@linux.intel.com> |
Task: Add payload support
This adds the payload values to task responses.
Tested: passed validator
Change-Id: I50467e28ce8142d198f916ea0c63bd413edcd524 Signed-off-by: James Feist <james.feist@linu
Task: Add payload support
This adds the payload values to task responses.
Tested: passed validator
Change-Id: I50467e28ce8142d198f916ea0c63bd413edcd524 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
32898cea
|
| 10-Mar-2020 |
James Feist <james.feist@linux.intel.com> |
task: add fwupdate support
This adds firmware update task service support. It adds a match and updates the task value when the interface changes.
Tested: On successful fwupdate task was created and
task: add fwupdate support
This adds firmware update task service support. It adds a match and updates the task value when the interface changes.
Tested: On successful fwupdate task was created and updated correctly. On failed fwupdate the status went to failed.
Change-Id: Id12cc5d5270e8e45498b665e78601c5c30775323 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
f723d733
|
| 26-Feb-2020 |
Gunnar Mills <gmills@us.ibm.com> |
SoftwareInventory: Implement Bios Related Item
Was a TODO here with the code commented out.
Bios was implemented here: https://github.com/openbmc/bmcweb/commit/d82a3acd1abc04a13f90cef5234416c3e18da
SoftwareInventory: Implement Bios Related Item
Was a TODO here with the code commented out.
Bios was implemented here: https://github.com/openbmc/bmcweb/commit/d82a3acd1abc04a13f90cef5234416c3e18da0e1
Tested: Ran validator curl -k https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Host image", "Id": "9f75c5ad", "Members@odata.count": 1, "Name": "Software Inventory", "RelatedItem": [ { "@odata.id": "/redfish/v1/Systems/system/Bios" } ],
Change-Id: Ifa6148731582cdc7f177e38b19f02fea966738fc Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
dcf46d44
|
| 19-Feb-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Update service: Remove odata.context
Redfish made odata.context optional (1.6.0 of DSP0266, Sept 2018). Redfish has removed odata.context from example payloads in the specification (1.7.0 of DSP0266
Update service: Remove odata.context
Redfish made odata.context optional (1.6.0 of DSP0266, Sept 2018). Redfish has removed odata.context from example payloads in the specification (1.7.0 of DSP0266), removed it from the mockups, and Redfish recommended not using.
The reason for making optional and removing from mockups/examples, "no one could figure out how to use it and it did not add value".
Don't see value in it for our implementation.
Change-Id: I0dbf424c8fb91f448da19ce12b0dadb512880204 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
3f8a743a
|
| 28-Jan-2020 |
AppaRao Puli <apparao.puli@linux.intel.com> |
Add support to fetch the 'Updateable' components
Currently 'Updateable' property value in SoftwareInventory schema is hardcoded. Added support to look through the updateable software associations o
Add support to fetch the 'Updateable' components
Currently 'Updateable' property value in SoftwareInventory schema is hardcoded. Added support to look through the updateable software associations objects and use it for 'Updateable' Redfish property in SoftwareInventory.
Tested: - Checked 'Updateable' Property value for both programmable and non-programmable firmware inventory components and it works as expected. - Ran the Redfish validator and no new issues found.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> Change-Id: Ia24f942f3afe49674ec3628cac0356a5496ef337
show more ...
|
#
2830a9cf
|
| 06-Jan-2020 |
Andrew Geissler <geissonator@yahoo.com> |
only return fw images in FirmwareInventory
Some systems create a xyz.openbmc_project.Software.Version D-bus object for reasons other then storing a FirmwareInventory object. For example the phosphor
only return fw images in FirmwareInventory
Some systems create a xyz.openbmc_project.Software.Version D-bus object for reasons other then storing a FirmwareInventory object. For example the phosphor-logging code can add it to a log to track what level of code was running when a log was created. These should not show up in the Redfish FirmwareInventory API.
Tested:
Before this change, 3 and 4 correlated to phosphor-logs on system curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/ { "@odata.context": "/redfish/v1/$metadata#SoftwareInventoryCollection.SoftwareInventoryCollection", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/3" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/4" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/224cd310" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/3b296352" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/e9b7a436" } ], "Members@odata.count": 5, "Name": "Software Inventory Collection" }
After: Verified 3 and 4 were no longer returned in FirmwareInventory curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/UpdateService/FirmwareInventory/ { "@odata.context": "/redfish/v1/$metadata#SoftwareInventoryCollection.SoftwareInventoryCollection", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/224cd310" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/2d556644" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/7432374c" } ], "Members@odata.count": 3, "Name": "Software Inventory Collection" }
Ran Redfish validator and ensured no errors
Change-Id: I3e99fe7570b87b83f75918873267fb1587add182 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
97d57aaa
|
| 25-Nov-2019 |
Carol Wang <wangkair@cn.ibm.com> |
Redfish: Support health status of firmware inventory objects
Support health status of firmware inventory objects based on the mapping relationship: [dbus status] [redfish state] [redfish he
Redfish: Support health status of firmware inventory objects
Support health status of firmware inventory objects based on the mapping relationship: [dbus status] [redfish state] [redfish health] Ready Disabled OK Activating Updating OK Active Enabled OK NotReady Disabled Warning Invalid Disabled Warning Failed Disabled Warning
Tested: [dbus status] --> [redfish state] --> [redfish health] 1. Ready --> Disabled --> OK $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/software/enumerate { ... "/xyz/openbmc_project/software/9557fe67": { "Activation": "xyz.openbmc_project.Software.Activation.Activations.Ready", ... } $curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/9557fe67 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9557fe67", ... "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Disabled" }, ... } 2. Activating --> Updating --> OK $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/software/enumerate { ... "/xyz/openbmc_project/software/9557fe67": { "Activation": "xyz.openbmc_project.Software.Activation.Activations.Activating", ... } $curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/9557fe67 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9557fe67", ... "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Updating" }, ... } 3. Active --> Enabled --> OK $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/software/enumerate { "data": { "/xyz/openbmc_project/software/9557fe67": { "Activation": "xyz.openbmc_project.Software.Activation.Activations.Active", ... } $ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/9557fe67 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9557fe67", ... "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, ... } 4. Invalid --> Disabled --> Warning # busctl call xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/c0bbba12 \ org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Software.Activation Activation s \ xyz.openbmc_project.Software.Activation.Activations.Invalid $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/software/enumerate { ... "/xyz/openbmc_project/software/c0bbba12": { "Activation": "xyz.openbmc_project.Software.Activation.Activations.Invalid", ... } $ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/c0bbba12 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/c0bbba12", ... "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, ... } 5. NotReady --> Disabled --> Warning # busctl call xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/c0bbba12 \ org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Software.Activation Activation s \ xyz.openbmc_project.Software.Activation.Activations.NotReady $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/software/enumerate { ... "/xyz/openbmc_project/software/c0bbba12": { "Activation": "xyz.openbmc_project.Software.Activation.Activations.NotReady", ... } $ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/c0bbba12 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/c0bbba12", ... "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, ... } 6. Failed --> Disabled --> Warning # busctl call xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/c0bbba12 \ org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Software.Activation Activation s \ xyz.openbmc_project.Software.Activation.Activations.Failed $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/software/enumerate { ... "/xyz/openbmc_project/software/c0bbba12": { "Activation": "xyz.openbmc_project.Software.Activation.Activations.Failed", ... } $ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/c0bbba12 { "@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory", "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/c0bbba12", ... "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, ... }
Validator tool result: Counter({'pass': 2992, 'skipOptional': 2470, 'metadataNamespaces': 1605, 'passGet': 189, 'serviceNamespaces': 71, 'invalidPropertyValue': 10, 'warningPresent': 6, 'passAction': 6, 'optionalAction': 5, 'warnDeprecated': 2, 'unverifiedComplexAdditional': 1}) Validation has succeeded.
Change-Id: Ic475f56d19c0be01ca7aebf67a3f6814d35bcacd Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
show more ...
|
#
274dfe62
|
| 23-Aug-2019 |
Jayashankar Padath <jayashankar.padath@in.ibm.com> |
Redfish: ApplyTime property GET and PATCH support
This change is to GET and PATCH the ApplyTime property using the UpdateServce redfish schema. GET request can be used to check the value before init
Redfish: ApplyTime property GET and PATCH support
This change is to GET and PATCH the ApplyTime property using the UpdateServce redfish schema. GET request can be used to check the value before initiating the BMC image upload and activation. PATCH request can be used to update the ApplyTime value.
If the ApplyTime value is Immediate, force-reboot.service gets called which reboots the BMC. If the ApplyTime value is OnReset, no force reboot will be triggered and the new BMC image will be functional till the user decideds to reboot the BMC manually.
Tested: Changes passed the Redfish-Service-Validator test.
Success Scenarios: 1. If the value of ApplyTime is Immediate (GET request) GET https://$bmc/redfish/v1/UpdateService { "@odata.context": "/redfish/v1/$metadata#UpdateService.UpdateService", "@odata.id": "/redfish/v1/UpdateService", "@odata.type": "#UpdateService.v1_2_0.UpdateService", "ApplyTime": "Immediate", "Description": "Service for Software Update", "FirmwareInventory": { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory" }, "HttpPushUri": "/redfish/v1/UpdateService", "Id": "UpdateService", "Name": "Update Service", "ServiceEnabled": true }
2. PATCH request to change value to OnReset:
PATCH -d '{ "HttpPushUriOptions": { "HttpPushUriApplyTime": { "ApplyTime""OnReset"}}}' https://${bmc}/redfish/v1/UpdateService { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "Successfully Completed Request", "MessageArgs": [], "MessageId": "Base.1.4.0.Success", "Resolution": "None", "Severity": "OK" } ] }
Error Scenarios: 1. Test by giving wrong HttpPushUriOptions name [Given as "HttpPushUriOptions1"]
PATCH -d '{ "HttpPushUriOptions1": { "HttpPushUriApplyTime": { "ApplyTime":"Immediate"}}}' https://${bmc}/redfish/v1/UpdateService { "HttpPushUriOptions1@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The property HttpPushUriOptions1 is not in the list of valid properties for the resource.", "MessageArgs": [ "HttpPushUriOptions1" ], "MessageId": "Base.1.4.0.PropertyUnknown", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed.", "Severity": "Warning" } ] }
2. Test by giving wrong HttpPushUriApplyTime name [Given as "HttpPushUriApplyTime1"]
PATCH -d '{ "HttpPushUriOptions": { "HttpPushUriApplyTime1": { "ApplyTime:"Immediate"}}}' https://${bmc}/redfish/v1/UpdateService { "HttpPushUriApplyTime1@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The property HttpPushUriApplyTime1 is not in the list of valid properties for the resource.", "MessageArgs": [ "HttpPushUriApplyTime1" ], "MessageId": "Base.1.4.0.PropertyUnknown", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed.", "Severity": "Warning" } ] }
3. Test by giving wrong ApplyTime name [Given as "ApplyTime1"] PATCH -d '{ "HttpPushUriOptions": { "HttpPushUriApplyTime": { "ApplyTime1":"Immediate"}}}' https://${bmc}/redfish/v1/UpdateService { "ApplyTime1@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The property ApplyTime1 is not in the list of valid properties for the resource.", "MessageArgs": [ "ApplyTime1" ], "MessageId": "Base.1.4.0.PropertyUnknown", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed.", "Severity": "Warning" } ] }
4. Giving wrong ApplyTime value ["Immediat" instead of "Immediate"] PATCH -d '{ "HttpPushUriOptions": { "HttpPushUriApplyTime": { "ApplyTime":"Immediat"}}}' https://${bmc}/redfish/v1/UpdateService { "ApplyTime@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The value Immediat for the property ApplyTime is not in the list of acceptable values.", "MessageArgs": [ "Immediat", "ApplyTime" ], "MessageId": "Base.1.4.0.PropertyValueNotInList", "Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed.", "Severity": "Warning" } ] }
5. NULL value given for "HttpPushUriOptions" PATCH -d '{ "HttpPushUriOptions": ""}' https://${bmc}/redfish/v1/UpdateSrvice { "HttpPushUriOptions@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The value \"\" for the property HttpPushUriOptions is of a different type than the property can accept.", "MessageArgs": [ "\"\"", "HttpPushUriOptions" ], "MessageId": "Base.1.4.0.PropertyValueTypeError", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed.", "Severity": "Warning" } ] }
6. NULL value given for "HttpPushUriApplyTime" PATCH -d '{ "HttpPushUriOptions": { "HttpPushUriApplyTime":""}}' https:/${bmc}/redfish/v1/UpdateService { "HttpPushUriApplyTime@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The value \"\" for the property HttpPushUriApplyTime is of a different type than the property can accept.", "MessageArgs": [ "\"\"", "HttpPushUriApplyTime" ], "MessageId": "Base.1.4.0.PropertyValueTypeError", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed.", "Severity": "Warning" } ] }
7. NULL value given for "HttpPushUriApplyTime" PATCH -d '{ "HttpPushUriOptions": { "HttpPushUriApplyTime":{ "ApplyTime":""}}}' https://${bmc}/redfish/v1/UpdateService { "ApplyTime@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The value for the property ApplyTime is not in the list of acceptable values.", "MessageArgs": [ "", "ApplyTime" ], "MessageId": "Base.1.4.0.PropertyValueNotInList", "Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed.", "Severity": "Warning" } ] }
Signed-off-by: Jayashankar Padath <jayashankar.padath@in.ibm.com> Change-Id: Icd01bb6c102c0a24285c79ccf4d41fd5fe53f0ed
show more ...
|
#
e1959778
|
| 26-Nov-2019 |
Jason M. Bills <jason.m.bills@linux.intel.com> |
Add "Retry-After" header for temporarily unavailable messages
Whenever the Redfish response is that a service is temporarily unavailable, the "Retry-After" header is added with the same value, so ju
Add "Retry-After" header for temporarily unavailable messages
Whenever the Redfish response is that a service is temporarily unavailable, the "Retry-After" header is added with the same value, so just set the header automatically with the response.
Tested: Confirmed that the "Retry-After" header is set correctly with the Redfish temporarily unavailable message.
Change-Id: I9c940be94d9d284b9633c5caa2ce71ade76d22d5 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
show more ...
|
#
271584ab
|
| 09-Jul-2019 |
Ed Tanous <ed.tanous@intel.com> |
Fix a bunch of warnings
using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems lik
Fix a bunch of warnings
using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems like a good place to start, and would improve things a bit type-wise. This patchset attempts to correct all the issues in one shot.
Tested: It builds. Will test various subsystems that have been touched
Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
show more ...
|
#
49d734ff
|
| 02-Oct-2019 |
James Feist <james.feist@linux.intel.com> |
SoftwareInventory: Catch more interfaces
Expand the path to a larger namespace, and allow non updateable interfaces to not error out.
Tested: More interfaces appeared without error
Change-Id: I4a6
SoftwareInventory: Catch more interfaces
Expand the path to a larger namespace, and allow non updateable interfaces to not error out.
Tested: More interfaces appeared without error
Change-Id: I4a6e3092c868cb5f3fe66401269d5c99f69328c8 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
e2e96770
|
| 03-Oct-2019 |
James Feist <james.feist@linux.intel.com> |
update_service: s/update/image
Not all firmware is updateable, rename it to make sense.
Tested:
"Description": "ME image"
Change-Id: I7f78032726e9e102e9626ae1c788b7be30db2651 Signed-off-by: James
update_service: s/update/image
Not all firmware is updateable, rename it to make sense.
Tested:
"Description": "ME image"
Change-Id: I7f78032726e9e102e9626ae1c788b7be30db2651 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
4e68c45b
|
| 04-Sep-2019 |
Ayushi Smriti <smriti.ayushi@linux.intel.com> |
Fix: Only return error info in invalid URI case
Collection schemas return some valuable parameter information values on get query, even when the URI is invalid and 404/400 error code is returned. Fi
Fix: Only return error info in invalid URI case
Collection schemas return some valuable parameter information values on get query, even when the URI is invalid and 404/400 error code is returned. Fix for the same is provided by packing the json response at proper places and returning only the required error info, for security reasons.
Tested: Verified by redfish GET query for invalid uri cases. Only error msg and info is returned.
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com> Change-Id: Iae45da86c2d2adbc39d78f7c267d551d4e6525f2
show more ...
|