commit | d4342a9202e8781a3634a14c4d5311aaaab23fda | [log] [tgz] |
---|---|---|
author | Tim Lee <timlee660101@gmail.com> | Mon Apr 27 11:47:58 2020 +0800 |
committer | James Feist <james.feist@linux.intel.com> | Wed Jun 03 16:44:38 2020 +0000 |
tree | b3ed438837f2d2bb96baacdfb2e1e2eed3b3b55c | |
parent | dc3fbbd0b0021ae888a97bf48a62f30129fc3f4d [diff] |
log_services: Fix Severity Empty string found issue when running Redfish Service Validator Symptom: When running Redfish Service Validator, we found that Severity Empty string issue except first post code in PostCodesEntry. *** /redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1 Regetting resource from URI /redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1 Type (#LogEntry.v1_4_0.LogEntry), GET SUCCESS (time: 0) PASS *** /redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-2 Regetting resource from URI /redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-2 Type (#LogEntry.v1_4_0.LogEntry), GET SUCCESS (time: 0) Severity: Empty string found - Services should omit properties if not supported Severity: Invalid Enum value '' found, expected ['OK', 'Warning', 'Critical'] FAIL... Root cause: In fillPostCodeEntry(), this statement "severity = message->severity" only be executed once. And another statement {"Severity", std::move(severity)} in the end of this function will clear severity string to null after calling std::move() standard function. Thus, only first post code Severity is 'OK', but the others are NULL. Solution: Move this statement "severity = message->severity" to for loop in fillPostCodeEntry() then all post codes will be recorded with correct severity string 'OK'. Tested: Passed the Redfish Service Validator and verified "Severity": "OK" in /redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-2 { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-2", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-04-27T01:48:10+00:00", "EntryType": "Event", "Id": "B1-2", "Message": "Boot Count: 1: TS Offset: 0.0046; POST Code: 0x02", "MessageArgs": [ "1", "0.0046", "0x02" ], "MessageId": "OpenBMC.0.1.BIOSPOSTCode", "Name": "POST Code Log Entry", "Severity": "OK" } Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: Ibfccfa47cfe8e0f58e7f24650871edda5d248674
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/CMakeLists.txt
and then compiling. For example, cmake -DBMCWEB_ENABLE_KVM=NO ...
followed by make
. The option names become C++ preprocessor symbols that control which code is compiled into the program.
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.