| commit | 517d9a58b35238ba45ab74812b397e942a9f662a | [log] [tgz] |
|---|---|---|
| author | Tony Lee <tony.lee@quantatw.com> | Tue Jun 28 15:41:23 2022 +0800 |
| committer | Ed Tanous <ed@tanous.net> | Tue Jun 28 14:47:44 2022 +0000 |
| tree | 0bda14156c4f350e7db06272f8aa7c04ded17de0 | |
| parent | af24660d2f406d19d871adf7aed8a0dff43b0033 [diff] |
Fix fail on get PostCode entry
Get url /redfish/v1/Systems/system/LogServices/PostCodes/Entries/<str>
return error.
Compare with sha dcf2ebc020257bc298d948fcb4da761c284e84d7
Condition checking is different from the original.
Tested:
Before fix:
curl -X GET http://${bmc}/redfish/v1/Systems/system/LogServices/PostCodes/Entries
...
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-605",
"@odata.type": "#LogEntry.v1_8_0.LogEntry",
"Created": "1970-01-01T00:11:17+00:00",
"EntryType": "Event",
"Id": "B1-605",
"Message": "Boot Count: 1; Time Stamp Offset: 603.1745 seconds; POST Code: 0x84",
"MessageArgs": [
"1",
"603.1745",
"0x84"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
}
],
curl -X GET http://${bmc}/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-605
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The resource at the URI '/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-605' was not found.",
"MessageArgs": [
"/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-605"
],
"MessageId": "Base.1.11.0.ResourceMissingAtURI",
"MessageSeverity": "Critical",
"Resolution": "Place a valid resource at the URI or correct the URI and resubmit the request."
}
],
"code": "Base.1.11.0.ResourceMissingAtURI",
"message": "The resource at the URI '/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-605' was not found."
}
After fixed:
curl -X GET http://${bmc}/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-605
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Description": "Collection of POST Code Log Entries",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-605",
"@odata.type": "#LogEntry.v1_8_0.LogEntry",
"Created": "1970-01-01T00:11:17+00:00",
"EntryType": "Event",
"Id": "B1-605",
"Message": "Boot Count: 1; Time Stamp Offset: 603.1745 seconds; POST Code: 0x84",
"MessageArgs": [
"1",
"603.1745",
"0x84"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
}
],
Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Change-Id: Iada035214a9c1dc47be00c0ed3010562b80b0a3c
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.