summaryrefslogtreecommitdiff
path: root/redfish-core/include/redfish.hpp
diff options
context:
space:
mode:
authorClaire Weinan <cweinan@google.com>2022-03-02 01:18:25 +0300
committerEd Tanous <ed@tanous.net>2022-06-24 19:06:48 +0300
commitfdd26906ef8884977df85c915444206c8a183639 (patch)
tree0ac1e7efe0b6d4d82868fa4b56c2b2bcbc921cf3 /redfish-core/include/redfish.hpp
parent80d37e76bc27e19c29cc7522423f95f98c958873 (diff)
downloadbmcweb-fdd26906ef8884977df85c915444206c8a183639.tar.xz
LogService: Add support for Fault Log
The corresponding log service is at /redfish/v1/Managers/bmc/LogServices/FaultLog Fault Log is a new type of dump for aggregating fault data. For details please see https://github.com/openbmc/docs/blob/master/designs/hw-fault-monitor.md We're currently assuming we'll have a single Fault Log instance per BMC, which can support multiple host processors. Tested: First enabled redfish-dump-log option Fault Log showed up in the expected LogService collection: ./curl_bin -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Managers/bmc/LogServices/ { "@odata.id": "/redfish/v1/Managers/bmc/LogServices", "@odata.type": "#LogServiceCollection.LogServiceCollection", "Description": "Collection of LogServices for this Manager", "Members": [ { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal" }, { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Dump" }, { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/FaultLog" } ], "Members@odata.count": 3, "Name": "Open BMC Log Services Collection" } FaultLog dump entries are created when a fault is detected by a BMC daemon -- we don't support FaultLog dump entry creation requested by a Redfish client via the CollectDiagnosticData LogService action. Fault Log CollectDiagnosticData returned Not Found (HTTP error 404) as expected: $curl -k -H "X-Auth-Token: $token" -X POST http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Actions/LogService.CollectDiagnosticData -d '{"DiagnosticDataType":"Manager", "OEMDiagnosticDataType":"FaultLog"}' Not Found Generated Fault Log dump entries via BMC console: busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/faultlog xyz.openbmc_project.Dump.Create CreateDump a{sv} 0 Retrieved Fault Log dump entries (including with query parameters top and skip): curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1 curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries?\$skip=2 curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries?\$top=3 Deleted Fault Log dump entry: curl -k -H "X-Auth-Token: $token" -X DELETE http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1 Note: The following command to clear the Fault Log will not work until Fault Log entries have the required D-Bus interface implemented (xyz.openbmc_project.Dump.Entry.FaultLog): curl -k -H "X-Auth-Token: $token" -X POST http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Actions/LogService.ClearLog Redfish Service Validator succeeded on the following URIs: /redfish/v1/Managers/bmc/LogServices /redfish/v1/Managers/bmc/LogServices/FaultLog /redfish/v1/Managers/bmc/LogServices/FaultLog/Entries Also did cursory testing of BMC Dump (/redfish/v1/Managers/bmc/LogServices/Dump/) and System Dump (/redfish/v1/Systems/system/LogServices/Dump/) for code paths that were refactored. Signed-off-by: Claire Weinan <cweinan@google.com> Change-Id: I80b5444e61263f79e89b10abd556d59af6f17c8c
Diffstat (limited to 'redfish-core/include/redfish.hpp')
-rw-r--r--redfish-core/include/redfish.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index b7dd3b3d79..c961b2db05 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -119,6 +119,11 @@ class RedfishService
requestRoutesBMCDumpEntry(app);
requestRoutesBMCDumpCreate(app);
requestRoutesBMCDumpClear(app);
+
+ requestRoutesFaultLogDumpService(app);
+ requestRoutesFaultLogDumpEntryCollection(app);
+ requestRoutesFaultLogDumpEntry(app);
+ requestRoutesFaultLogDumpClear(app);
#endif
#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES