commit | a64919e811edaf33890dad564fb55eaca3b2f614 | [log] [tgz] |
---|---|---|
author | Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com> | Thu Dec 12 15:32:24 2024 +0100 |
committer | Ed Tanous <ed@tanous.net> | Fri Dec 27 23:59:57 2024 +0000 |
tree | f50e5307ad4bc348b06b833dee848fe1ee3c03f3 | |
parent | 64d31aa098024ae0d413f1e7b5ebf8eee98783ac [diff] |
Fix issues in MRD patch requests After commit [1] 'null' value was being rejected with [json_utils.hpp] Value for key Metrics was incorrect type: null Using 'null' here seems to be one of the cases that [2] describes Commit [3] fixed an issue where {} replaced "MetricProperties" of a metric with an empty array but introduced a different one - trying to replace a metric caused new values in "MetricProperties" to get added to old ones. if (metric.find("MetricProperties") == metric.end()) check was initially present in [4] but got removed at some point, re-adding it fixes the issue Tested: Patch request to [5] with body: {"Metrics": [null]} no longer fails and deletes a metric Patch request with {"Metrics": [{}]} leaves metric unchanged Patch request with {"Metrics": [{"MetricProperties": ["<path_to_sensor>"]}]} updates metric properly, without appending to old "MetricProperties" values Patch requests containing mixed values also work correctly [1]: b14f357f527eae05aa1bd7a115d3f6ed237a35bb [2]: 8099c51796bf6f94ad5fbb1f6844d700f498d3bb [3]: ba498310f761b3c0f475ecbdb293cf1386544a33 [4]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/72319 [5]: https://<bmcip>/redfish/v1/TelemetryService/MetricReportDefinitions/<existing_mrd_name> Change-Id: Ia3d4699784f493bd63a2df4d6edf5053760221e1 Signed-off-by: Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com>
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson setup builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects
.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data
namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.