-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HW-Isolation: Fix Additional Data Uri #1128
base: 1110
Are you sure you want to change the base?
Conversation
a762c72
to
55a74ac
Compare
The guard records could be associated with hidden or visible PEL. The additional URI for visible pel would be /redfish/v1/Systems/system/LogServices/EventLog/Entries/<id>/attachment and for the hidden ones it has be /redfish/v1/Systems/system/LogServices/CELog/Entries/<id>/attachment So before adding the AdditionalDataURI, check for the hidden property of the PEL and add the URI accordingly. Tested and found it works as expected ``` { "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of System Hardware Isolation Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries/1", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/CELog/Entries/824/attachment", "Created": "2025-01-23T12:57:02+00:00", "EntryType": "Event", "Id": "1", "Links": { "OriginOfCondition": { "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu0/SubProcessors/core0" } }, "Message": "Spare Guard Record core0", "MessageArgs": [ "Spare", "core0" ], "MessageId": "OpenBMC.0.6.GuardRecord", "Name": "Hardware Isolation Entry", "Severity": "OK" }, { "@odata.id": "/redfish/v1/Systems/system/LogServices/HardwareIsolation/Entries/3", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/830/attachment", "Created": "2025-01-23T13:08:31+00:00", "EntryType": "Event", "Id": "3", "Links": { "OriginOfCondition": { "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu1/SubProcessors/core0" } }, "Message": "Spare Guard Record core0", "MessageArgs": [ "Spare", "core0" ], "MessageId": "OpenBMC.0.6.GuardRecord", "Name": "Hardware Isolation Entry", "Severity": "OK" }, } ```
55a74ac
to
03e553c
Compare
? asyncResp->res | ||
.jsonValue["Members"] | ||
[entryJsonIdx - 1] | ||
: asyncResp->res.jsonValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this already defined above L7125?
nlohmann::json& entryJson =
(entryJsonIdx > 0
? asyncResp->res.jsonValue["Members"][entryJsonIdx - 1]
: asyncResp->res.jsonValue);
If so, can L7243 be written as
entryJson["AdditionalDataURI"] =
boost::urls::format(
"/redfish/v1/Systems/system/LogServices/{}/Entries/{}/attachment",
logPath, entryID);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is within the asyn dbus callback. So by the time, the dbus call is successful with the hidden property value, it could have moved out the function
The guard records could be associated with hidden or visible PEL. The additional URI for visible pel would be
/redfish/v1/Systems/system/LogServices/EventLog/Entries//attachment and for the hidden ones it has be
/redfish/v1/Systems/system/LogServices/CELog/Entries//attachment
So before adding the AdditionalDataURI, check for the hidden property of the PEL and add the URI accordingly.
Tested and found it works as expected