9008975e | 20-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix regression on metadata uri
e9f120141c8d2a1404660e46ce2126c83521405d caused a regression on this that can be seen from the find and replace. Unfortunately service validator doesn't catch this, b
Fix regression on metadata uri
e9f120141c8d2a1404660e46ce2126c83521405d caused a regression on this that can be seen from the find and replace. Unfortunately service validator doesn't catch this, but protocol validator does.
Tested: Run redfish protocol validator and see this test is now passing.
Change-Id: Ie90be9e7dd9332924a33f71ee6125b82cb21bcec Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
a8770740 | 17-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Enable gcc-14 builds
gcc-14 enables the std::chrono features we need for doing lots of time conversions. For whatever reason, std::chrono accepts a an hour of 60, whereas date.h didn't. This test
Enable gcc-14 builds
gcc-14 enables the std::chrono features we need for doing lots of time conversions. For whatever reason, std::chrono accepts a an hour of 60, whereas date.h didn't. This test case is really just a corner case, so accept either answer.
Tested: Unit tests pass. Good coverage.
Change-Id: I2fb7fcbebb2a4126b36f99d27b216b835d1e2994 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
d109e2b6 | 18-Nov-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
Refactor: move registries functions to their file
There were same functions from namespace 'registries' in event_service_manager.hpp. Move them to registries.cpp/hpp.
Tested: - Using Redfish Event
Refactor: move registries functions to their file
There were same functions from namespace 'registries' in event_service_manager.hpp. Move them to registries.cpp/hpp.
Tested: - Using Redfish Event Listener, test subscriptions and eventing. - Redfish Service Validator passes
Change-Id: Id0912f6581637bb4117e67b138122c355256b561 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
b80ba2e4 | 18-Nov-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
Refactor: extract src/event_log.cpp
event_service_manager.hpp contains namespace 'event_log' which is confusing. Extract it to a separate header and cpp file to have the filename match the namespace
Refactor: extract src/event_log.cpp
event_service_manager.hpp contains namespace 'event_log' which is confusing. Extract it to a separate header and cpp file to have the filename match the namespace.
No functional changes have been made to the code.
Tested: - Using Redfish Event Listener, test subscriptions and eventing. - Redfish Service Validator passes
Change-Id: Ia0bf658b8b46f92aede059d46e8de48f160e073e Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
6a42dc61 | 16-Sep-2024 |
Potin Lai <potin.lai@quantatw.com> |
Change primary postcode interface to byte array
At least one processor implementation currently uses 9 byte post codes, which does not fit nicely into any standard types. The backends are changing
Change primary postcode interface to byte array
At least one processor implementation currently uses 9 byte post codes, which does not fit nicely into any standard types. The backends are changing dbus interface to be two arrays rather than a {uint64, array}, which will allow arbitrary sized postcodes[1].
[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/74633
Tested: - Test with 9 bytes postcode system ``` { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of POST Code Log Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2024-10-08T16:37:51.180760+00:00", "EntryType": "Event", "Id": "B1-1", "Message": "Boot Count: 1; Time Stamp Offset: 0.0000 seconds; POST Code: 0x01000000000001C000", "MessageArgs": [ "1", "0.0000", "0x01000000000001C000" ], "MessageId": "OpenBMC.0.2.BIOSPOSTCode", "Name": "POST Code Log Entry", "Severity": "OK" }, { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-2", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2024-10-08T16:37:51.282429+00:00", "EntryType": "Event", "Id": "B1-2", "Message": "Boot Count: 1; Time Stamp Offset: 0.1017 seconds; POST Code: 0x01000000020001C100", "MessageArgs": [ "1", "0.1017", "0x01000000020001C100" ], "MessageId": "OpenBMC.0.2.BIOSPOSTCode", "Name": "POST Code Log Entry", "Severity": "OK" }, { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-3", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2024-10-08T16:37:51.654501+00:00", "EntryType": "Event", "Id": "B1-3", "Message": "Boot Count: 1; Time Stamp Offset: 0.4737 seconds; POST Code: 0x01000000010001C000", "MessageArgs": [ "1", "0.4737", "0x01000000010001C000" ], "MessageId": "OpenBMC.0.2.BIOSPOSTCode", "Name": "POST Code Log Entry", "Severity": "OK" }, ...... } ```
- Test attachment (secondary postcode) with maunul feed postcode - promary: 0x010203040506070809 - secondary: 0x090807060504030201 ``` root@bmc:~# busctl set-property xyz.openbmc_project.State.Boot.Raw /xyz/openbmc_project/state/boot/raw0 xyz.openbmc_project.State.Boot.Raw Value '(ayay)' 9 1 2 3 4 5 6 7 8 9 9 9 8 7 6 5 4 3 2 1 root@bmc:~# curl -u root:0penBmc -k https://127.0.0.1/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1 { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment", "Created": "2024-10-15T00:52:38.408819+00:00", "EntryType": "Event", "Id": "B1-1", "Message": "Boot Count: 1; Time Stamp Offset: 0.0000 seconds; POST Code: 0x010203040506070809", "MessageArgs": [ "1", "0.0000", "0x010203040506070809" ], "MessageId": "OpenBMC.0.2.BIOSPOSTCode", "Name": "POST Code Log Entry", "Severity": "OK" } root@bmc:~# curl -u root:0penBmc -k https://127.0.0.1/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment CQgHBgUEAwIB ```
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: Id5e8779b191e733e6be32294d21a0a1775c48db4
show more ...
|
9f892fa6 | 12-Nov-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
fix redfish validator error for Update interface
Fix the redfish validator error for BIOS version with redfish-updateservice-use-dbus feature enabled. If there is no host bios version, for example,
fix redfish validator error for Update interface
Fix the redfish validator error for BIOS version with redfish-updateservice-use-dbus feature enabled. If there is no host bios version, for example, in case the flash_bios feature is not enabled, the populateSoftwareInformation shouldn't return an error.
Tested - Before Fix: Redfish Validator failed with errors -
1 err.Bios.Bios errors in /redfish/v1/Systems/system 1 err.Collection(Manager.Manager) errors in /redfish/v1/Systems/system 2 failProp errors in /redfish/v1/Systems/system 2 fails errors in /redfish/v1/Systems/system 1 failGet errors in /redfish/v1/Systems/system/Bios 1 fails errors in /redfish/v1/Systems/system/Bios … err.Bios.Bios: 1 err.Collection(Manager.Manager): 3 err.Collection(Resource.Item): 1 … Validation has failed: 16 problems found
After Fix: Redfish Validator Passed -
Metadata: Namespaces missing from $metadata: set()
Elapsed time: 0:00:33 missingRedfishAlias: 1 pass: 4343 passAction: 16 passGet: 217 passRedfishUri: 208 skipNoSchema: 3 skipOptional: 4001 unvalidated: 1 unverifiedAdditional.complex: 1 warnDeprecated: 5 warningPresent: 6 warnings: 4 Validation has succeeded.
Change-Id: I881c6a780b9f2662fb81a17c258ff09f352668d7 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
02c1e29f | 15-Nov-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
Refactor: break up event_service_manager.hpp
'class Subscription' can be extracted into a separate file.
No changes have been made to the code.
Tested:
- Using Redfish Event Listener, test subscr
Refactor: break up event_service_manager.hpp
'class Subscription' can be extracted into a separate file.
No changes have been made to the code.
Tested:
- Using Redfish Event Listener, test subscriptions and eventing. - Redfish Service Validator passes
Change-Id: Id0076ef617e36cbb85629a386a4511a4fdb5e4da Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
5145decd | 13-Nov-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Redfish.md: Add some missing system properties
When looking at SerialConsole, noticed it wasn't in Redfish.md. Added it along with FabricAdapters and PCIeDevices which were also missing.
Tested: No
Redfish.md: Add some missing system properties
When looking at SerialConsole, noticed it wasn't in Redfish.md. Added it along with FabricAdapters and PCIeDevices which were also missing.
Tested: None. Doc change only.
Change-Id: I91b9a007647fe678020d655b92284b2ff1b4bd47 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
fa800c8a | 13-Nov-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Manager: Remove SerialConsole and TODO
In 2020, the OCP Profile moved to accept SerialConsole in either Manager or System.[1]
That was the reason of still having this code. SerialConsole was deprec
Manager: Remove SerialConsole and TODO
In 2020, the OCP Profile moved to accept SerialConsole in either Manager or System.[1]
That was the reason of still having this code. SerialConsole was deprecated in Manager v1_10_0. v1_19_2 is the latest Manager version[2].
SerialConsole was added to System in 2021[3]. In 2023, SerialConsole was enhanced to get the status not just hardcode to enabled.
[1]: https://github.com/opencomputeproject/HWMgmt-OCP-Profiles/issues/23 [2]: https://redfish.dmtf.org/schemas/v1/Manager.v1_19_2.json [3]: https://github.com/openbmc/bmcweb/commit/0e8ac5e706c531d2a3e2fc8390d9a31b90a91eb1 [4]: https://github.com/openbmc/bmcweb/commit/5c3e927283e32e1633ccd409f34ee17fab626ca1
Tested: Covered by automated tests.
Change-Id: I0a95e9215d4aa4626a3da75c989cb7d5eaf94be1 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
d27c31e9 | 15-Oct-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
update service name for UPDATESERVICE_USE_DBUS
Update the Dbus service name and path for BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS. As part of updated implementation the new BMC code updater daemon name
update service name for UPDATESERVICE_USE_DBUS
Update the Dbus service name and path for BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS. As part of updated implementation the new BMC code updater daemon name is xyz.openbmc_project.Software.Manager, update setActiveImage and FactoryReset flows to reflect so.
Tested: ``` > curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X POST https://${bmc}/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults -d '{"ResetType": "ResetAll"}' { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request completed successfully.", "MessageArgs": [], "MessageId": "Base.1.19.0.Success", "MessageSeverity": "OK", "Resolution": "None." } ] }
> curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH https://${bmc}/redfish/v1/Managers/bmc -d '{"Links": {"ActiveSoftwareImage": {"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/70f4c0cb"}}}' { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request completed successfully.", "MessageArgs": [], "MessageId": "Base.1.19.0.Success", "MessageSeverity": "OK", "Resolution": "None." } ] } ```
Change-Id: I42ef2485fa119474b7fd12ea94dd654c3432c067 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
5fe4ef35 | 19-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Make UserSubscription as shared_ptr in Subscription
Currently UserSubscription are used as value in Subscription. This causes the copy of the object between subscriptionsMap and subscriptionConfigMa
Make UserSubscription as shared_ptr in Subscription
Currently UserSubscription are used as value in Subscription. This causes the copy of the object between subscriptionsMap and subscriptionConfigMap when doing PATCH.
Using a shared_ptr for UserSubscription avoids the memory copy of it.
Tested:
- Using Redfish Event Listener, test subscriptions and eventing. - Redfish Service Validator passes
Change-Id: I5821b72f28ba737a5c9b75288d377766c84c6a6a Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
b07942e3 | 31-Oct-2024 |
George Liu <liuxiwei@ieisystem.com> |
Fix snmp port out of range
SNMP out of range port doesn't works, it should throw HTTPS 400 error It went ahead and configures it, with default port which is not the correct behavior.
Tested: If the
Fix snmp port out of range
SNMP out of range port doesn't works, it should throw HTTPS 400 error It went ahead and configures it, with default port which is not the correct behavior.
Tested: If the snmp port is out of range, a 400 error will be thrown. ``` $ curl --header "Content-Type: application/json" X POST -i -k -u root:0penBmc https://{bmc}/redfish/v1/EventService/Subscriptions --data-raw '{"Destination": "snmp://xx.xx.xx.76:65537","SubscriptionType": "SNMPTrap", "Protocol": "SNMPv2c"}' -vv ...
< HTTP/1.1 400 Bad Request ...
{ "Destination@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value '\"snmp://xx.xx.xx.76:65537\"' for the property Destination is of a different format than the property can accept.", "MessageArgs": [ "\"snmp://xx.xx.xx.76:65537\"", "Destination" ], "MessageId": "Base.1.16.0.PropertyValueFormatError", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." } ] * Connection #0 to host 127.0.0.1 left intact } ```
Change-Id: I6e002153ca37b4eb3d4538a64fa61ab35e9dab85 Signed-off-by: George Liu <liuxiwei@ieisystem.com>
show more ...
|
02ea923f | 25-Oct-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Remove 2nd incorrect TotalCores
bmcweb has 2 places where it is setting the processor's TotalCores, here and in the getCpuDataByInterface call[1].
The way being removed of getting TotalCores, assum
Remove 2nd incorrect TotalCores
bmcweb has 2 places where it is setting the processor's TotalCores, here and in the getCpuDataByInterface call[1].
The way being removed of getting TotalCores, assumes the path of cores is <processorPath/core*>, it also has some interesting logic for present.
The getCpuDataByInterface goes out to D-Bus and gets the CoreCount value, part of the CPU interface[2] in PDI.
IBM isn't using this path way of getting TotalCores. Don't see any company that is but hard to know. Since this way is wrong, don't think we should put behind a meson option, instead just remove.
History: Aug, 2019: IBM added getting "TotalCores" by assuming this core path[3] Aug, 2020: Intel added CPU properties including corecount to PDI[4] Sept, 2020: Intel adds using this D-Bus property[5]
Long term, it would be good to model the cores, the cores and processor have an association,[6] the bmcweb review for the cores is using this association[7].
[1]: https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/processor.hpp#L133 [2]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/73c931fb942daa714bfff17e950b9d5622a25842/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml#L46 [3]: https://github.com/openbmc/bmcweb/commit/ec8faf9243b6f6320daeb3ba6a94d1f257034506 [4]: https://github.com/openbmc/phosphor-dbus-interfaces/commit/259f49e0c40b287d9ea79f77db1654da47161340 [5]: https://github.com/openbmc/bmcweb/commit/029cc1f4106968f7e871d17a8bcb71a303a12ffa [6]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/56395 [7]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/38570
Tested: It builds. TotalCores is still there.
Change-Id: I9f244a33eca0e4a9838eb55ada09733807439877 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
a91e0057 | 28-Oct-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Redfish.md: Fix up Chassis
This "Shall be included if... otherwise will be omit" isn't correct. There isn't any check for this, so just remove. Added a bunch of missing properties.
Change-Id: If0ef
Redfish.md: Fix up Chassis
This "Shall be included if... otherwise will be omit" isn't correct. There isn't any check for this, so just remove. Added a bunch of missing properties.
Change-Id: If0ef8f92ed87a71d5ac11d891005b7b491b7282b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
f7125653 | 23-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Remove SubscriptionId get and set functions
There are places to get or set subscription id differently like `userSub.id` directly, or via `get/setSubscriptionId()` functions.
However, those aux fun
Remove SubscriptionId get and set functions
There are places to get or set subscription id differently like `userSub.id` directly, or via `get/setSubscriptionId()` functions.
However, those aux functions are used only once and can be replaced to access `userSub.id` directly.
Tested: - Complies good - Subscription GET and PATCH work correctly
Change-Id: I5cf81ba3ec0cb754387b40614e6309dca9a5305e Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
463a0e3e | 14-Oct-2024 |
Ed Tanous <etanous@nvidia.com> |
Explicitly set verify_none
As reported, there are cases where a valid certificate isn't present, but a browser still prompts for an MTLS cert. Fix that by explicitly setting verify_none if strict t
Explicitly set verify_none
As reported, there are cases where a valid certificate isn't present, but a browser still prompts for an MTLS cert. Fix that by explicitly setting verify_none if strict tls isn't enabled. Unclear what impacts this will have elsewhere:
Tested (not yet done on this patch): with a self-signed certificate, logging into chrome no longer prompts the certificate screen.
Change-Id: Iaf7d25fec15ad547a6c741c9410995e19ba22016 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
a0969c70 | 19-Sep-2024 |
Myung Bae <myungbae@us.ibm.com> |
Remove subscription for TerminateAfterRetries policy
Redfish Data Model [1] section 6.42.5.2 and EventDestination schema [2] specify that the subscription is terminated under the following policy an
Remove subscription for TerminateAfterRetries policy
Redfish Data Model [1] section 6.42.5.2 and EventDestination schema [2] specify that the subscription is terminated under the following policy and the conditions.
DeliveryRetryPolicy: - `TerminateAfterRetries`: ``` This value shall indicate the subscription is terminated after the maximum number of retries is reached, specified by the DeliveryRetryAttempts property in the event service. ```
This implements this policy to delete subscription of the stale client connections after trying `DeliveryRetryAttempts` when `DeliveryRetryPolicy == TerminateAfterRetries`.
Tested: 1) Subscription with blocked communication between bmcweb and listener
- Run Redfish Event Listener [3] to subscribe events with `DeliveryRetryPolicy == TerminateAfterRetries`
- Check the subscription creation ``` curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/ ```
- Generate an event and check the delivery to the listener. For example, ``` curl -k -X POST https://${bmc}/redfish/v1/EventService/Actions/EventService.SubmitTestEvent ```
- Block the communication between bmcweb and listener (or modify the listener not to delete the subscription at its exit, and kill the listener so that its subscription is still alive)
- If the above task is already finished, generate more events and wait for the sufficient time till `DeliveryRetryAttempts`.
- bmcweb journal log may contain the entries like ``` Sep 20 10:47:55 p10bmc bmcwebd[286]: [ERROR http_client.hpp:444] Maximum number of retries reached. https://9.3.62.209:8080/Redfish-Event-Listener Sep 20 10:47:55 p10bmc bmcwebd[286]: [ERROR event_service_manager.hpp:1459] Subscription 590587653 is deleted after MaxRetryAttempts ```
- Check the subscription again if the subscription is deleted.
2) Redfish Validator passes
[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2024.3.html [2] https://github.com/openbmc/bmcweb/blob/878edd599b1706ec8ffe6c3d81ba7cb3534f6393/redfish-core/schema/dmtf/csdl/EventDestination_v1.xml#L857 [3] https://github.com/DMTF/Redfish-Event-Listener
Change-Id: I6e41288995cbb6e37e17a7ef1be093abb7ce54b9 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
d8f8a7d7 | 23-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Fix persistent data directory creation
The commit c282e8b6c7f7f4e4ec94e4d1f1a380803e13da08 [1] causes an error like
``` Oct 23 16:46:25 p10bmc bmcwebd[8985]: [CRITICAL persistent_data.hpp:220] Can'
Fix persistent data directory creation
The commit c282e8b6c7f7f4e4ec94e4d1f1a380803e13da08 [1] causes an error like
``` Oct 23 16:46:25 p10bmc bmcwebd[8985]: [CRITICAL persistent_data.hpp:220] Can't create persistent folders Invalid argument ```
It is because the given persistent data filename does not contain the directory name.
Tested:
- Update subscription data like ``` curl -k -X PATCH https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID} \ -H "Content-Type: application/json" \ -d '{"VerifyCertificate": false}' ```
- And check the above error. - Restart bmcweb and check whether it is stored
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/75314
Change-Id: I0aa4768bbdb195b5247fd30c5078ada60187a4b3 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
6424e434 | 18-Oct-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove annoying log
This log logs for every file on startup, and doesn't really add a lot of value. Remove.
Tested: static files are no longer logged on startup.
Change-Id: I9394c2c28457b6e846733
Remove annoying log
This log logs for every file on startup, and doesn't really add a lot of value. Remove.
Tested: static files are no longer logged on startup.
Change-Id: I9394c2c28457b6e846733dde7712aa97bb5a96fc Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
c282e8b6 | 01-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Make sure directory exists
Handle cases where the persistent data directory might not exist, or might not be writable (as would be the case in unit tests) by ignoring the error.
This allows unit te
Make sure directory exists
Handle cases where the persistent data directory might not exist, or might not be writable (as would be the case in unit tests) by ignoring the error.
This allows unit tests to fail gracefully
Tested: Unit tests pass when persistent data dir isn't writable. bmcweb boots and restores file session file normally when manually restarted.
Change-Id: Idbd5155bed8be20738a85a55f0d4f876344a2439 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
29d7ca98 | 16-Oct-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix out of date validator instructions
Redfish service validator has been a properly installable package since[1]
Update the instructions to make it trivial to install and use.
[1] https://github.
Fix out of date validator instructions
Redfish service validator has been a properly installable package since[1]
Update the instructions to make it trivial to install and use.
[1] https://github.com/DMTF/Redfish-Service-Validator/commit/51d4c0dddc0fc5a3697839bf0683f965a9464941
Change-Id: Ib94a7983e5cf2759561205c44549cf144d26a61e Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
116370d8 | 08-Oct-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out lambdas in http server
These lambdas originally came from crow[1] and are a lot harder to maintain than normal methods. Move to normal methods.
Tested: Unit tests pass. Good coverage on
Break out lambdas in http server
These lambdas originally came from crow[1] and are a lot harder to maintain than normal methods. Move to normal methods.
Tested: Unit tests pass. Good coverage on connection class.
[1] https://github.com/CrowCpp/Crow/blob/master/include/crow/http_connection.h#L485
Change-Id: I9b177a0c456e44a261ea335f68354ad857739662 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
56ba386d | 10-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Fix Persistent Subscription PATCH
The `RedfishEvent` subscription is expected to be persistent over bmc reboot or bmcweb restart. However, the properties on PATCH are currently not persistent after
Fix Persistent Subscription PATCH
The `RedfishEvent` subscription is expected to be persistent over bmc reboot or bmcweb restart. However, the properties on PATCH are currently not persistent after reboot or bmcweb restart.
This commit is to sync those properties to the persistent store after PATCH.
In addition, this commit fixes a missing `id` copy when a new UserSubscription is created in [1] (introduced by [2]). As a result, it may cause the following messages during bmcweb start after subscription POST or PATCH like ``` Oct 16 14:37:34 p10bmc systemd[1]: Started Start bmcwebd server. Oct 16 14:37:34 p10bmc bmcwebd[15320]: [ERROR event_service_store.hpp:253] Subscription missing required field information, refusing to restore Oct 16 14:37:34 p10bmc bmcwebd[15320]: [ERROR persistent_data.hpp:166] Problem reading subscription from persistent store ``` After this, those subscriptions become lost.
Tested:
1. Subscription PATCH
- Create a subscription (e.g. use Redfish-Service-Validator).
- GET subscription and check the properties ``` SUBID=<id> curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID} ```
- PATCH subscription with a different value. ``` curl -k -X PATCH https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID} \ -H "Content-Type: application/json" -d '{"DeliveryRetryPolicy":"RetryForever"}' ```
- Reboot BMC or restart bmcweb
- GET subscription and check the properties ``` curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID} ````
Before the fix, the property values are the same as before PATCH. After the fix, the last patched property values will be kept.
2. Redfish Service Validator passes
[1] https://github.com/openbmc/bmcweb/blob/21a94d5cd4be74a85c978c0cd63e4c633093c531/redfish-core/include/event_service_manager.hpp#L812 [2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/65720
Change-Id: If5d2f622cc945faa6999d1e3e70211e881e19a79 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
7585b760 | 17-Oct-2024 |
Jishnu CM <jishnunambiarcm@duck.com> |
Adds redfish error for GenerateSecretKeyRequired
This commit contains the redfish error to be returned when it finds that MFA is enabled and the user has to generate secret key to proceed further.
Adds redfish error for GenerateSecretKeyRequired
This commit contains the redfish error to be returned when it finds that MFA is enabled and the user has to generate secret key to proceed further.
Used and tested in https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74938.
Change-Id: If13b96729510fc7b165aa792f1e1d23a811ca733 Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
show more ...
|
340d74c8 | 12-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Handling of OutOfRange in ReadJson
Currently readJsonPatch returns `PropertValueNotInList` in case when an input integer is out of range. This change is to return `PropertyValueOutOfRange` for the
Handling of OutOfRange in ReadJson
Currently readJsonPatch returns `PropertValueNotInList` in case when an input integer is out of range. This change is to return `PropertyValueOutOfRange` for the case out-of-range integer input.
Tested:
- Verify PATCH with an out-of-value integer. e.g. ``` $ curl -k -X PATCH https://${bmc}/redfish/v1/EventService/ -H "Content-Type: application/json" -d '{ "DeliveryRetryIntervalSeconds" : 4294967296}' ```
Before the change, its `MessageId` is `PropertyValueNotInList`. ``` "Message": "The value '4294967296' for the property DeliveryRetryIntervalSeconds is not in the list of acceptable values.", "MessageId": "Base.1.19.0.PropertyValueNotInList", "MessageSeverity": "Warning", "Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed." ```
After the change, its `MessageId` will be `PropertyValueOutOfRange`.
``` "Message": "The value '4294967296' for the property DeliveryRetryIntervalSeconds is not in the supported range of acceptable values.", "MessageId": "Base.1.19.0.PropertyValueOutOfRange", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." ```
- Redfish Service Validator passes
Change-Id: I0d0c5ecbc9f416b68fa7c0e81a0ea896ec2e50af Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|