commit | fdd26906ef8884977df85c915444206c8a183639 | [log] [tgz] |
---|---|---|
author | Claire Weinan <cweinan@google.com> | Tue Mar 01 14:18:25 2022 -0800 |
committer | Ed Tanous <ed@tanous.net> | Fri Jun 24 16:06:48 2022 +0000 |
tree | 0ac1e7efe0b6d4d82868fa4b56c2b2bcbc921cf3 | |
parent | 80d37e76bc27e19c29cc7522423f95f98c958873 [diff] |
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
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/meson_options.txt
and then compiling. For example, meson <builddir> -Dkvm=disabled ...
followed by ninja
in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.