| ab8aaeba | 27-Aug-2025 |
Oliver Brewka <oliver.brewka@9elements.com> |
Add DBus EventLog to Manager
In order to get access to the EventLog on multi-host platforms, add Journal EventLog to Manager. This implementation is based on the discussion we had on patch 76319 [1]
Add DBus EventLog to Manager
In order to get access to the EventLog on multi-host platforms, add Journal EventLog to Manager. This implementation is based on the discussion we had on patch 76319 [1].
TLDR: On multi-host, we technically would have to split the event log on a per host node basis, so that each host node has its own specific event log.
However, this is currently not supported so we had to decide, whether we put it on a specific ComputerSystem, or refactor the current implementation of the EventLog, to allow for the EventLog LogService to be part of the Managers resource. We chose the latter one, because a), it is not clear on which ComputerSystem to put the EventLog, as long as we aren't splitting the event log per host node, and b), if that particular ComputerSystem is not existing at runtime, there would be no access to the EventLog at all.
This feature can be enabled with the redfish-eventlog-location meson option. By default it is set to 'systems', which translates to the EventLog being under the Systems resource. To enable the EventLog under the Managers resource set
``` -Dredfish-eventlog-location=managers ``` This in turn, disables the EventLog under the ComputerSystem resource.
Tested: Redfish validation succeeded for both ComputerSystem and Managers tree.
Patch LogEntry: ``` $ curl -k -X PATCH 'https://'"${BMC}"':'"${BMC_WEBPORT}"'/redfish/v1/Managers/bmc/LogServices/EventLog/Entries/4444' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"'' \ -H "Content-Type: application/json" -d "{"Resolved":true}"
$ busctl introspect xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/4444
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Logging.Entry interface - - - .GetEntry method - h - .AdditionalData property a{ss} 5 "CALLOUT_INVENTORY_PATH" "/xyz/open... emits-change writable .EventId property s "" emits-change writable .Id property u 4444 emits-change writable .Message property s "xyz.openbmc_project.Sensor.Threshold... emits-change writable .Resolution property s "" emits-change writable .Resolved property b true emits-change writable
```
Delete LogEntry: ``` $ busctl tree xyz.openbmc_project.Logging ... | |- /xyz/openbmc_project/logging/entry/6498 | |- /xyz/openbmc_project/logging/entry/6499 | |- /xyz/openbmc_project/logging/entry/6500 | |- /xyz/openbmc_project/logging/entry/6501 ...
$ curl -k -X DELETE 'https://'"${BMC}"':4443/redfish/v1/Managers/bmc/LogServices/EventLog/Entries/6500' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"'' \ -H "Content-Type: application/json"
| |- /xyz/openbmc_project/logging/entry/6498 | |- /xyz/openbmc_project/logging/entry/6499 | |- /xyz/openbmc_project/logging/entry/6501 ```
ClearLog action: ``` $ curl -k -X POST 'https://'"${BMC}"':4443/redfish/v1/Managers/bmc/LogServices/EventLog/Actions/LogService.ClearLog' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"'' \ -H "Content-Type: application/json"
{ "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request completed successfully.", "MessageArgs": [], "MessageId": "Base.1.19.Success", "MessageSeverity": "OK", "Resolution": "None." } ] } ```
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76319
Change-Id: Ie619af8e10a723aef2e02ef03796851511b05008 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
show more ...
|
| 43feb5cd | 24-Sep-2025 |
Oliver Brewka <oliver.brewka@9elements.com> |
Add Journal EventLog to Manager
In order to get access to the EventLog on multi-host platforms, add Journal EventLog to Manager. This implementation is based on the discussion we had on patch 76319
Add Journal EventLog to Manager
In order to get access to the EventLog on multi-host platforms, add Journal EventLog to Manager. This implementation is based on the discussion we had on patch 76319 [1].
TLDR: On multi-host, we technically would have to split the event log on a per host node basis, so that each host node has its own specific event log.
However, this is currently not supported so we had to decide, whether we put it on a specific ComputerSystem, or refactor the current implementation of the EventLog, to allow for the EventLog LogService to be part of the Managers resource. We chose the latter one, because a), it is not clear on which ComputerSystem to put the EventLog, as long as we aren't splitting the event log per host node, and b), if that particular ComputerSystem is not existing at runtime, there would be no access to the EventLog at all.
This feature can be enabled with the redfish-eventlog-location meson option. By default it is set to 'systems', which translates to the EventLog being under the Systems resource. To enable the EventLog under the Managers resource set
``` -Dredfish-eventlog-location=managers ``` This in turn, disables the EventLog under the ComputerSystem resource.
Tested: Redfish validation succeeded for both ComputerSystem and Managers tree.
``` curl command: curl -w "@curl-format.txt" -c cjar -b cjar -k -X GET 'https://'"${BMC}"':4443/redfish/v1/'"$ROUTE"'' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"''
GET /redfish/v1/Managers/bmc/LogServices { "@odata.id": "/redfish/v1/Managers/bmc/LogServices", "@odata.type": "#LogServiceCollection.LogServiceCollection", "Description": "Collection of LogServices for this Manager", "Members": [ { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal" }, { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog" } ], "Members@odata.count": 2, "Name": "Open BMC Log Services Collection" }
GET /redfish/v1/Managers/bmc/LogServices/EventLog { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog", "@odata.type": "#LogService.v1_2_0.LogService", "Actions": { "#LogService.ClearLog": { "target": "/redfish/v1/Managers/bmc/LogServices/EventLog/Actions/LogService.ClearLog" } }, "DateTime": "2025-09-24T15:22:36+00:00", "DateTimeLocalOffset": "+00:00", "Description": "Manager Event Log Service", "Entries": { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries" }, "Id": "EventLog", "Name": "Event Log Service", "OverWritePolicy": "WrapsWhenFull" }
GET /redfish/v1/Managers/bmc/LogServices/EventLog/Entries { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of Manager Event Log Entries", "Members": [ { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries/1730009576", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2024-10-27T06:12:56+00:00", "EntryType": "Event", "Id": "1730009576", "Message": "Host system DC power is off", "MessageArgs": [], "MessageId": "OpenBMC.0.1.DCPowerOff", "Name": "Manager Event Log Entry", "Severity": "OK" }, ... ], "Members@odata.count": 2820, "Members@odata.nextLink": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries?$skip=1000", "Name": "Manager Event Log Entries" }
GET /redfish/v1/Managers/bmc/LogServices/EventLog/Entries/1730009576 { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries/1730009576", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2024-10-27T06:12:56+00:00", "EntryType": "Event", "Id": "1730009576", "Message": "Host system DC power is off", "MessageArgs": [], "MessageId": "OpenBMC.0.1.DCPowerOff", "Name": "Manager Event Log Entry", "Severity": "OK" } ``` ClearLog action: Log files are being successfully deleted from /var/log
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76319
Change-Id: If5b4fe10151b6bfd28a1b49c41f8cfcec1b9132c Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
show more ...
|
| b0a8d97b | 21-Sep-2025 |
Joey Berkovitz <joey@berkovitz.us> |
PasswordChangeRequired: Fix error message
The PasswordChangeRequired error was incorrectly formatted. Per the spec, it should be an error response and 403 on all requests except for session creation
PasswordChangeRequired: Fix error message
The PasswordChangeRequired error was incorrectly formatted. Per the spec, it should be an error response and 403 on all requests except for session creation, which is just a `@Message.ExtendedInfo` annotation. See [1].
This is a follow-up to 1c651ee12ad55ab6626c2baf3754aecda305ba43 which accidentally only broke out the password change logic for session creation. This change adjusts the non-session-creation error response for PasswordChangeRequired to return a proper error.
Tested: - Built a romulus image - Ran `passwd --expire root` - curl to Managers and session creation
``` ╰─○ curl -kv --user "$BMC_USER:$BMC_PASS" https: //localhost:2443/redfish/v1/Managers < HTTP/2 403 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The password provided for this account must be changed before access is granted. PATCH the Password property for this account located at the target URI '/redfish/v1/AccountService/Accounts/root' to complete this process.", "MessageArgs": [ "/redfish/v1/AccountService/Accounts/root" ], "MessageId": "Base.1.19.PasswordChangeRequired", "MessageSeverity": "Critical", "Resolution": "Change the password for this account using a PATCH to the Password property at the URI provided." } ], "code": "Base.1.19.PasswordChangeRequired", "message": "The password provided for this account must be changed before access is granted. PATCH the Password property for this account located at the target URI '/redfish/v1/AccountService/Accounts/root' to complete this process." } }
╰─○ curl -kv -X POST -H 'Content-Type: application/json' -d '{"UserName": "root", "Password": "..."}' https://localhost:2443/redfish/v1/SessionService/Sessions < HTTP/2 201 { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The password provided for this account must be changed before access is granted. PATCH the Password property for this account located at the target URI '/redfish/v1/AccountService/Accounts/root' to complete this process.", "MessageArgs": [ "/redfish/v1/AccountService/Accounts/root" ], "MessageId": "Base.1.19.PasswordChangeRequired", "MessageSeverity": "Critical", "Resolution": "Change the password for this account using a PATCH to the Password property at the URI provided." } ], "@odata.id": "/redfish/v1/SessionService/Sessions/klDQdHSMME", "@odata.type": "#Session.v1_7_0.Session", "ClientOriginIPAddress": "0.0.0.0", "Description": "Manager User Session", "Id": "klDQdHSMME", "Name": "User Session", "Roles": [ "Administrator" ], "UserName": "root" } ```
[1]: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.22.1.html#password-change-required-handling
Change-Id: I0ab50b4e2298d13ae00f84bc7891c2a14610e1b2 Signed-off-by: Joey Berkovitz <joey@berkovitz.us>
show more ...
|
| 83237dd6 | 11-Jan-2021 |
SunnySrivastava1984 <sunnsr25@in.ibm.com> |
Inventory properties via Assembly schema
This commit implements Redfish Assembly schema. This schema will be used to publish inventory data for FRUs which are attached to a given Chassis and does no
Inventory properties via Assembly schema
This commit implements Redfish Assembly schema. This schema will be used to publish inventory data for FRUs which are attached to a given Chassis and does not map to any specific schema definition.
The properties which are published in this commit are LocationCode, SparePartNumber, Model, SerialNumber and PartNumber.
One of the major use case to publish these properties via redfish is for anyone to identify the inventory and its location in the system, which in turn will help them in repair/replacement related to that FRU.
The validator has been executed on the change and no error has been found. As this has been tested on a development image some fields are empty in the below pasted output for which warning was thrown by validator but no errors.
Sample Output with [1]: ``` { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly", "@odata.type": "#Assembly.v1_5_1.Assembly", "Assemblies": [ { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/0", "@odata.type": "#Assembly.v1_5_1.AssemblyData", "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.1234567-D0" } }, "Manufacturer": "", "MemberId": "0", "Model": "", "Name": "base_op_panel_blyth", "PartNumber": "", "SerialNumber": "", "Status": { "Health": "OK", "State": "Absent" } }, { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/1", "@odata.type": "#Assembly.v1_5_1.AssemblyData", "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.1234567-D1" } }, "Manufacturer": "", "MemberId": "1", "Model": "6B86", "Name": "lcd_op_panel_hill", "PartNumber": "PN12345", "SerialNumber": "YL6B86010000", "Status": { "Health": "OK", "State": "Enabled" } } ], "Assemblies@odata.count": 2, "Id": "Assembly", "Name": "Assembly Collection" } ```
[1] https://gerrit.openbmc.org/c/openbmc/openbmc/+/83907
Change-Id: I2d462340fe1a0b0eb387697f0ff70fcafde3f8d9 Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
| 37937d51 | 21-Feb-2023 |
George Liu <liuxiwei@inspur.com> |
Implement Fabric PortCollection and Port schemas
This implements 2 schemas for FabricAdapters [1][2].
The implementation uses `GetAssociatedSubTreePathsById` & `GetAssociatedSubTreeById`. - https:/
Implement Fabric PortCollection and Port schemas
This implements 2 schemas for FabricAdapters [1][2].
The implementation uses `GetAssociatedSubTreePathsById` & `GetAssociatedSubTreeById`. - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999
The association is defined via - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/62881.
The backend port examples are also committed via - https://gerrit.openbmc.org/c/openbmc/openpower-vpd-parser/+/66540 - https://gerrit.openbmc.org/c/openbmc/openpower-vpd-parser/+/70888 - https://gerrit.openbmc.org/c/openbmc/openbmc/+/66541
The current submission only implements the basic properties of Port (e.g. Id, Name etc) as a foundation of the future additional properties. - Location - LocationIndicatorActive - Status
One example of Ports is this cable card for the i/o expansion drawers and modeling the 2 ports on the cable card [3]. These ports have an identify led, a location code, and a status.
Tested: - Redfish Validator passes - perform GET methods like these:
``` curl -k -X GET https://${bmc}/redfish/v1/Systems/system/FabricAdapters/disk_backplane0 { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0", "@odata.type": "#FabricAdapter.v1_4_0.FabricAdapter", "Id": "disk_backplane0", ... "Ports": { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports" }, ... } ```
``` curl -k -X GET https://${bmc}/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports", "@odata.type": "#PortCollection.PortCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports/dp0_connector4" }, { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports/dp0_connector5" } ], "Members@odata.count": 2, "Name": "Port Collection" } ```
``` curl -k -X GET https://${bmc}:18080/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports/dp0_connector4 { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports/dp0_connector4", "@odata.type": "#Port.v1_7_0.Port", "Id": "dp0_connector4", "Name": "dp0_connector4" }% ```
Also try the invalid port like
``` curl -k -X GET https://${bmc}:18080/redfish/v1/Systems/system/FabricAdapters/io_module1/Ports/INVALID { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Port named 'INVALID' was not found.", "MessageArgs": [ "Port", "INVALID" ], "MessageId": "Base.1.16.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.16.0.ResourceNotFound", "message": "The requested resource of type Port named 'INVALID' was not found." } }% ```
[1] https://redfish.dmtf.org/schemas/v1/PortCollection_v1.xml [2] https://redfish.dmtf.org/schemas/v1/Port_v1.xml [3] https://www.ibm.com/docs/en/power10?topic=details-pcie4-cable-adapter-fc-ej24-ccin-6b92
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I8c64c16764e85c0716e264263708b18f897a2c0c Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|