| 9ad2c6f4 | 22-Oct-2025 |
Ed Tanous <etanous@nvidia.com> |
Update to boost 1.89
Update the subtree boost to 1.89; Keep the "required" version at 1.88 because that's currently what yocto uses. Now that we don't need old versions, the branch for boost 1.84
Update to boost 1.89
Update the subtree boost to 1.89; Keep the "required" version at 1.88 because that's currently what yocto uses. Now that we don't need old versions, the branch for boost 1.84 support is removed, and we can universally pull in boost::process as a library.
Additionally boost::core::string_view has defined a std::formatter nearly identical to what was done there, so there's now a conflict. Add a version check and shift to the boost provided formatter when it's available.
Tested: Code builds out of tree correctly.
Change-Id: I15a10da084da8f9d9460781b16a0fdc92987fc9a Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 1aa94df4 | 31-Jul-2025 |
Harshit Aghera <haghera@nvidia.com> |
sensor_utils: Add PeakReading property
Add support for PeakReading and PeakReadingTime for sensors. This enhancement allows sensor readings to include max observed value information in the Redfish A
sensor_utils: Add PeakReading property
Add support for PeakReading and PeakReadingTime for sensors. This enhancement allows sensor readings to include max observed value information in the Redfish API, along with timestamp. It uses PDI xyz.openbmc_project.Telemetry.Report. Property PeakReading is added if OperationType in PDI property ReadingParameters is set to Maximum.
Current Limitation - The ResetMetrics action is currently not supported for sensor URIs. As a result, the ability to clear PeakReading values for GPU Power Sensors has not been implemented.
Future Consideration - If ResetMetrics action support is added in the future, the corresponding functionality will also need to be implemented in the dbus-sensor application to ensure full compatibility.
Schema: https://redfish.dmtf.org/schemas/v1/Sensor.v1_2_0.yaml (PeakReading)
Backend implementation for reference: https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/82479
Tested: Build an image for nvl32-obmc machine with the following patches cherry picked.
https://gerrit.openbmc.org/c/openbmc/openbmc/+/85490 https://gerrit.openbmc.org/c/openbmc/bmcweb/+/82449.
The patch cherry-picks the following patches that are currently under review.
``` 1. device tree https://lore.kernel.org/all/aRbLqH8pLWCQryhu@molberding.nvidia.com/ 2. mctpd patches https://github.com/CodeConstruct/mctp/pull/85 3. u-boot changes https://lore.kernel.org/openbmc/20251121-msx4-v1-0-fc0118b666c1@nvidia.com/T/#t 4. kernel changes as specified in the openbmc patch (for espi) 5. entity-manager changes https://gerrit.openbmc.org/c/openbmc/entity-manager/+/85455 6. platform-init changes https://gerrit.openbmc.org/c/openbmc/platform-init/+/85456 7. spi changes https://lore.kernel.org/all/20251121-w25q01jv_fixup-v1-1-3d175050db73@nvidia.com/ ```
``` > curl -s -k -u 'root:0penBmc' https://10.137.203.137/redfish/v1/Chassis/NVIDIA_GB200_1/Sensors/power_NVIDIA_GB200_GPU_0_Power_0 { "@odata.id": "/redfish/v1/Chassis/NVIDIA_GB200_1/Sensors/power_NVIDIA_GB200_GPU_0_Power_0", "@odata.type": "#Sensor.v1_2_0.Sensor", "Id": "power_NVIDIA_GB200_GPU_0_Power_0", "Name": "NVIDIA GB200 GPU 0 Power 0", "PeakReading": 52.671, "PeakReadingTime": 0, "Reading": 27.214, "ReadingRangeMax": 5000.0, "ReadingRangeMin": 0.0, "ReadingType": "Power", "ReadingUnits": "W", "Status": { "Health": "OK", "State": "Enabled" } }% ````
Change-Id: I8c1ab6ce85f31419db4a1d931bf99722d24afbd7 Signed-off-by: Harshit Aghera <haghera@nvidia.com>
show more ...
|
| 6cbd6c41 | 10-Jul-2025 |
Ed Tanous <etanous@nvidia.com> |
fix: add account checking inside verifyMtls
Currently if we don't have account in bmcweb but have valid format certificate, we will have 500 internal server error when we send request to bmcweb. But
fix: add account checking inside verifyMtls
Currently if we don't have account in bmcweb but have valid format certificate, we will have 500 internal server error when we send request to bmcweb. But, if we don't have valid format certificate, we will get 401 unauthorized. This is not ideal as the http code is not appropriate. Also, this might introduce some security risk as the user can deduce whether their certificate format is valid or not based on the http code.
This patch is intended to solve this issue by checking whether the username exists in the system. If not, we will return nullptr inside verifyMtls function, which result in 401 unauthorized response if the user have valid format of certificate, but there is no related username inside the system
Change-Id: I479a10ed2bcce2c9969e19fa3aab9686ba4c71be Signed-off-by: Malik Akbar Hashemi Rafsanjani <malikrafsan@meta.com> Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| e5dd4999 | 17-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Remove getNthStringFromPath function
This utility function is being removed for several reasons. First, it does not verify the full string on URIs and paths, so things like /foo/bar/baz/valid_id wo
Remove getNthStringFromPath function
This utility function is being removed for several reasons. First, it does not verify the full string on URIs and paths, so things like /foo/bar/baz/valid_id would still pass this check.
Second, it is used for both URIs and dbus paths, both of which we have better utility functions these days respectively, boost::url for urls and sdbusplus::message::object_path for dbus paths. Neither of the two is escaped properly when this function is used.
Therefore, remove it and replace it with the appropriate alternatives.
The existing URI functions were found to not accept fragments (given they are rarely used in PATCH). Add support for fragments to cover the getNthStringFromPath use cases.
Tested: Redfish service validator passes.
Change-Id: Ibc6755ad69397123d7fef0e0b764042bbb48888b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 13880454 | 17-Sep-2025 |
Ed Tanous <etanous@nvidia.com> |
Read state directory from systemd file
Reading the state dir from the systemd service file gives us flexibility to define the bmcweb state from wherever we like, rather than just using the current d
Read state directory from systemd file
Reading the state dir from the systemd service file gives us flexibility to define the bmcweb state from wherever we like, rather than just using the current directory, which might not be writable.
Tested: bmcweb boots, shows state is persisted in the same location as previously.
Change-Id: I9c048421fe249b73b1cae2ff5204ffd357cd3123 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 55385c70 | 06-Aug-2025 |
Ed Tanous <etanous@nvidia.com> |
Clean up CLI naming
Now that all applications run through one CLI, names like run() don't make a lot of sense. Update names to match the new reality, make bmcweb with no arguments launch the webser
Clean up CLI naming
Now that all applications run through one CLI, names like run() don't make a lot of sense. Update names to match the new reality, make bmcweb with no arguments launch the webserver once again.
Tested: bmcweb boots. Change-Id: I011b57507872a9518a9c470b58779805504c7293 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 1060065e | 07-Aug-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
identity.hpp: add header guard
Add `#pragma once` to a header file.
Noticed this issue when trying unity build in yocto environment.
``` bbmcweblib.a.p/bmcweblib-unity0.cpp | In file included from
identity.hpp: add header guard
Add `#pragma once` to a header file.
Noticed this issue when trying unity build in yocto environment.
``` bbmcweblib.a.p/bmcweblib-unity0.cpp | In file included from ../git/redfish-core/lib/network_protocol.hpp:14, | from /home/alexander/openbmc/build/s8030/tmp/work/arm1176jzs-openbmc-linux-gnueabi/bmcweb/1.0+git/build/../git/redfish-core/src/redfish.cpp:30, | from libbmcweblib.a.p/bmcweblib-unity0.cpp:13: | ../git/include/identity.hpp:7:20: error: redefinition of 'std::string getHostName()' | 7 | inline std::string getHostName() | | ^~~~~~~~~~~ | In file included from /home/alexander/openbmc/build/s8030/tmp/work/arm1176jzs-openbmc-linux-gnueabi/bmcweb/1.0+git/build/../git/http/mutual_tls.cpp:7, | from libbmcweblib.a.p/bmcweblib-unity0.cpp:1: | ../git/include/identity.hpp:7:20: note: 'std::string getHostName()' previously defined here | 7 | inline std::string getHostName() | | ^~~~~~~~~~~ | ninja: build stopped: subcommand failed. | INFO: autodetecting backend as ninja ```
Tested: Inspection only.
Change-Id: Ib7811ee12da763203b50fc81d39d642d2de3e212 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| b2539069 | 12-Mar-2024 |
Ed Tanous <etanous@nvidia.com> |
Implement zstd decompression
Given the size of Redfish schemas these days, it would be nice to be able to store them on disk in a zstd format. Unfortunately, not all clients support zstd at this ti
Implement zstd decompression
Given the size of Redfish schemas these days, it would be nice to be able to store them on disk in a zstd format. Unfortunately, not all clients support zstd at this time.
This commit implements reading of zstd files from disk, as well as decompressing zstd in the case where the client does not support zstd as a return type.
Tested: Implanted an artificial zstd file into the system, and observed correct decompression both with an allow-encoding header of empty string and zstd.
Change-Id: I8b631bb943de99002fdd6745340aec010ee591ff Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| e30d3345 | 24-Jun-2025 |
Corey Ethington <cethington@coreweave.com> |
Add ServiceIdentification
Implements GET and PATCH support for ServiceIdentification in Managers/bmc and service root.
Tested: - Refish Service Validator passes - Tested on romulus: 1. GET initial
Add ServiceIdentification
Implements GET and PATCH support for ServiceIdentification in Managers/bmc and service root.
Tested: - Refish Service Validator passes - Tested on romulus: 1. GET initial value ``` curl -k "https://$BMC/redfish/v1" { ... } ``` ServiceIdentification is not yet present in service root, as expected ``` curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc" { ... "ServiceIdentification": "", ... } ```
2. PATCH and GET with valid value ``` curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \ -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "foo"}' { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request completed successfully.", "MessageArgs": [], "MessageId": "Base.1.19.Success", "MessageSeverity": "OK", "Resolution": "None." } ] }
curl -k "https://$BMC/redfish/v1" { ... "ServiceIdentification": "foo", ... }
curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc" { ... "ServiceIdentification": "foo", ... } ```
3. PATCH and GET with invalid value ``` curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \ -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "$$$"}' { "ServiceIdentification@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value provided for the property ServiceIdentification is not valid.", "MessageArgs": [ "ServiceIdentification" ], "MessageId": "Base.1.19.PropertyValueError", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." } ] }
curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \ -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The string 'ServiceIdentification' exceeds the length limit 99.", "MessageArgs": [ "ServiceIdentification", "99" ], "MessageId": "Base.1.19.StringValueTooLong", "MessageSeverity": "Warning", "Resolution": "Resubmit the request with an appropriate string length." } ], "code": "Base.1.19.StringValueTooLong", "message": "The string 'ServiceIdentification' exceeds the length limit 99." } }
curl -k "https://$BMC/redfish/v1" { ... "ServiceIdentification": "foo", ... }
curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc" { ... "ServiceIdentification": "foo", ... } ```
Change-Id: I5b71a73e947ec64cabb8d93c8503a18fb43b8937 Signed-off-by: Corey Ethington <cethington@coreweave.com>
show more ...
|
| 82b286fb | 06-May-2025 |
Ed Tanous <ed@tanous.net> |
Remove implicit conversions
Since 2020, nlohmann has recognized that implicit conversions to and from json are an issue. Many bugs have been caused at both development time and runtime due to unexp
Remove implicit conversions
Since 2020, nlohmann has recognized that implicit conversions to and from json are an issue. Many bugs have been caused at both development time and runtime due to unexpected implicit conversions from json to std::string/int/bool. This commit disables implicit conversions using JSON_USE_IMPLICIT_CONVERSIONS [1]. This option will become the default in the future. That comment was written 3 years ago at this point, so we should prepare.
Tested: Redfish service validator passes.
[1] https://json.nlohmann.me/api/macros/json_use_implicit_conversions/ Change-Id: Id6cc47b9bbf8889e4777fd6d77ec992f3139962c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 6136e852 | 14-May-2025 |
Myung Bae <myungbae@us.ibm.com> |
Fix inconsistent persistent subscription load
When BMC reboots or bmcweb restarts, the persistent subscriptions may not be loaded properly but they may still be in the file.
Later on if BMC reboots
Fix inconsistent persistent subscription load
When BMC reboots or bmcweb restarts, the persistent subscriptions may not be loaded properly but they may still be in the file.
Later on if BMC reboots or bmcweb restarts, those unloaded subscriptions may potentially and unexpectedly cause the reload into the active subscriptions.
The key cause is due to the compiler evaluation order for the function arguments where the last argument is evaluated and pushed into the stack first. As the result, the first argument `newSub->id` may already be invalid after the last argument `std::make_shared<>(std::move(*newSub))` is evaluated and pushed into the parameter stack [1]. This may cause the failure of `subscriptionsConfigMap.emplace()` and results in the missing instantiation of the persistent subscriptions.
Tested: - Create many subscriptions - GET subscriptions ``` curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions { "@odata.id": "/redfish/v1/EventService/Subscriptions", "@odata.type": "#EventDestinationCollection.EventDestinationCollection", "Members": [ { "@odata.id": "/redfish/v1/EventService/Subscriptions/1187258741" }, ... { "@odata.id": "/redfish/v1/EventService/Subscriptions/949306789" } ], "Members@odata.count": 6, "Name": "Event Destination Collections" } ``` - Restart bmcweb - GET subscriptions again and check whether they are the same. - Sometimes, none or only a few may be instantiated like
``` curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions { "@odata.id": "/redfish/v1/EventService/Subscriptions", "@odata.type": "#EventDestinationCollection.EventDestinationCollection", "Members": [ { "@odata.id": "/redfish/v1/EventService/Subscriptions/1187258741" } ], "Members@odata.count": 1, "Name": "Event Destination Collections" } ``` - However, the file `/home/root/bmcweb_persistent_data.json` still has the old entries.
- Also verify Redfish Service Validator to pass
[1] https://github.com/openbmc/bmcweb/blob/0c814aa604b36cff01b495f9c335f981c7be83be/include/persistent_data.hpp#L184
Change-Id: Ia8a3c1bd3d4f4e479b599077ba8f26e47f8d22ef Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
| 86e41a89 | 06-May-2025 |
Malik Akbar Hashemi Rafsanjani <malikrafsan@meta.com> |
fix: resolve incorrect key on bmcweb persistent file
This commit is intended to fix the bug on bmcweb when we send patch request to `/redfish/v1/AccountService`, especially when changing the `Certif
fix: resolve incorrect key on bmcweb persistent file
This commit is intended to fix the bug on bmcweb when we send patch request to `/redfish/v1/AccountService`, especially when changing the `CertificateMappingAttribute`. The expected behavior is that if we send the patch request, the bmc device will update the internal state and also update the persistent file (`bmcweb_persistent_data.json`) to store the current `CertificateMappingAttribute`. This is done so that after we reboot, the bmc device will retain the `CertificateMappingAttribute`
However, currently that doesn't happen because there is mismatch on the key on the persistent file. It should be "MTLSCommonNameParseMode", instead of "TLSCommonNameParseMode". This commit is intended to solve this bug
Change-Id: I38f03fd5eefa76079d76552548b411d95639b470 Signed-off-by: Malik Akbar Hashemi Rafsanjani <malikrafsan@meta.com>
show more ...
|