| commit | 54417b02efbfe896d6ef442cfc6a721314aac3f8 | [log] [tgz] |
|---|---|---|
| author | Sui Chen <suichen@google.com> | Thu Mar 24 14:59:52 2022 -0700 |
| committer | Ed Tanous <ed@tanous.net> | Tue Apr 12 18:43:57 2022 +0000 |
| tree | 4fdce17342f38ef369ab6fee76953c707a0c3d83 | |
| parent | 928fefb9a542b816d7c0418077def2b3874d1b0f [diff] |
Skip on log entries not found in the message registry
Because logs populated by fillEventLogEntryJson are expected to be
found in the message registry log entries that get returned in this
function should have non-empty message and severity, because of the way
registries work.
Currently, for a log entry that is not present in the registry, the
function will use its log entry as-is and leave the message and severity
fields empty. This can cause the Redfish Service Validator to generate
an error.
This change fixes the fillEventLogEntryJson function so that when a log
message is not found in the registry, the message is not used for
populating the response, and is logged for further analysis.
TESTED:
First populate an offending entry.
echo "1970-01-01T00:00:47.991326+00:00 OpenBMC.1.0.ServiceStarted," > \
/var/log/redfish
Then run the Service Validator.
Before this change:
URL: /redfish/v1/Systems/system/LogServices/EventLog/Entries/60
*** /redfish/v1/Systems/system/LogServices/EventLog/Entries/60
Type (LogEntry.v1_8_0.LogEntry), GET SUCCESS (time: 0)
Severity: Empty string found - Services should omit properties if not
supported
Severity: Value Enum not found in ['OK', 'Warning', 'Critical']
Message: Empty string found - Services should omit properties if not
supported
FAIL...
After: the above response disappears from the response, the Validator
error disappears, and the following appears in the system journal:
(1970-01-01 13:01:47) [WARNING "log_services.hpp":1129] Log entry not
found in registry: 1970-01-01T00:00:47.991326+00:00
OpenBMC.1.0.ServiceStarted,
Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: Ifa600d1de0e6e0cea33e9e8dfde621ee9d4e3325
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.