40e9b92e | 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This pa
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This patchset does not intend to modify any intent on any existing copyrights or licenses, only to standardize their inclusion.
[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects
Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
0309c216 | 10-Jan-2025 |
Igor Kanyuka <ifelmail@gmail.com> |
Improve subscriptions logging
If the event is not sent to the destination it was supposed to be sent to, it's hard to find out why it was not sent, and what was the message content the code was work
Improve subscriptions logging
If the event is not sent to the destination it was supposed to be sent to, it's hard to find out why it was not sent, and what was the message content the code was working with. Having additional logging (mostly debug) helps with troubleshooting.
Tested: Built an image with these changes, ran in QEMU, enabled debug logging, setup subscription: ``` { "@odata.id": "/redfish/v1/EventService/Subscriptions/3489160873", "@odata.type": "#EventDestination.v1_14_1.EventDestination", "Context": "127.0.0.1", "DeliveryRetryPolicy": "RetryForever", "Destination": "http://127.0.0.1:8888/events", "EventFormatType": "Event", "HeartbeatIntervalMinutes": 10, "HttpHeaders": [], "Id": "3489160873", "MessageIds": [], "MetricReportDefinitions": [], "Name": "Event Destination 3489160873", "Protocol": "Redfish", "RegistryPrefixes": [], "ResourceTypes": [], "SendHeartbeat": false, "SubscriptionType": "RedfishEvent", "VerifyCertificate": true } ```
and sent a message: ``` root@bmc:~# busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging \ xyz.openbmc_project.Logging.Create \ Create 'ssa{ss}' \ OpenBMC.0.1.PowerButtonPressed \ xyz.openbmc_project.Logging.Entry.Level.Error 0
o "/xyz/openbmc_project/logging/entry/16" ```
Got this in the log: ``` Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:65] Handling new DBus Event Log Entry Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface org.freedesktop.DBus.Peer Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface org.freedesktop.DBus.Introspectable Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface org.freedesktop.DBus.Properties Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Common.FilePath Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Software.Version Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Association.Definitions Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Object.Delete Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found dbus interface xyz.openbmc_project.Logging.Entry Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:59] Found Event Log Entry Id=16, Timestamp=, Message= Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG subscription.cpp:283] Processing logEntry: 16, '' Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG event_log.cpp:134] formatEventLogEntry: could not find messageID '' for log entry 16 in registry Jan 13 04:13:13 bmc bmcwebd[823]: [WARNING subscription.cpp:292] Read eventLog entry failed Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG subscription.cpp:317] No log entries available to be transferred. ```
Change-Id: I5cc8d48a0258f2419a7bd4f726f185abbd628110 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
show more ...
|
6282bc71 | 19-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Don't forward skip or only to aggregator
These two parameters are not idempotent, and are currently being run first on the satellite, then again on the aggregator. This results in errors and unexpe
Don't forward skip or only to aggregator
These two parameters are not idempotent, and are currently being run first on the satellite, then again on the aggregator. This results in errors and unexpected results.
This commit detects when we're parsing a top collection, and filters out those two parameters from being applied to the satellite request.
To accomplish rewriting the URI, a new Request API needs added for non-const access to the URI object.
Tested: Aggregator shows results as expected. Query params are not forwarded to satellite
Change-Id: I99cbbb08da9fcd06c9ee10d371b253e32d01f59b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
60e995cd | 09-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out journal utils
A number of the journald utilities are distinct from Redfish, and could be reused. Functions moved are copy/paste with no modifications.
Tested: Journald LogService GET sti
Break out journal utils
A number of the journald utilities are distinct from Redfish, and could be reused. Functions moved are copy/paste with no modifications.
Tested: Journald LogService GET still functions correctly Redfish service validator fails no new checks.
Change-Id: Icf1c28152e14f3e0c1c5203aac50c40d56bb272e Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
f1137a9d | 06-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Remove base from journal calls
Base from the journal helper function. This is only ever used for base10, and is only used in one spot. There's no need need to have this as an argument. Just use d
Remove base from journal calls
Base from the journal helper function. This is only ever used for base10, and is only used in one spot. There's no need need to have this as an argument. Just use defaults.
Tested: Redfish service validator passes. Journal entries at /redfish/v1/Managers/LogService/Journal/Entries look correct
Change-Id: I427ddde1c1fc89cb8116fd9cb30b8fd799ba58b5 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
56431b29 | 03-Dec-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
dbus event subscriptions: test dbus_log_watcher
Currently that code is still unfinished, but we can already define some trivial testcases.
The main result of this function is populating EventLogObj
dbus event subscriptions: test dbus_log_watcher
Currently that code is still unfinished, but we can already define some trivial testcases.
The main result of this function is populating EventLogObjectsType.
Tested: Unit tests pass.
Change-Id: I2e23147190be33192d41176413c16cd98c7bfd81 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
546d0785 | 10-Jan-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
dbus event subscription: add MessageId
Use dbus property 'Message' for the redfish Message Id.
The dbus property is not documented to be used for this purpose in the interface definition [1] but th
dbus event subscription: add MessageId
Use dbus property 'Message' for the redfish Message Id.
The dbus property is not documented to be used for this purpose in the interface definition [1] but the design [3] uses it. If there is no valid MessageId, the event filtering code will drop the event anyways.
Tested: The code was already tested in this form in [2] but found to perhaps not be compliant to the redfish specification
References: [1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Logging/Entry.interface.yaml[2] 6c58a03e1f6818c3cd0a521466f69ef9e869bf25 [3] https://github.com/openbmc/docs/blob/d886ce89fe66c128b3ab492e530ad48fa0c1b4eb/designs/event-logging.md?plain=1#L448
Change-Id: I4dfe0194e02dc657403d3c0c7162528ec7a597c2 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
4a7a15c2 | 03-Dec-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
dbus event subscription: add timestamp
Get the timestamp from dbus xyz.openbmc_project.Logging.Entry 'Timestamp' property.
This is then transformed into 'EventTimestamp' property.
Tested: Manually
dbus event subscription: add timestamp
Get the timestamp from dbus xyz.openbmc_project.Logging.Entry 'Timestamp' property.
This is then transformed into 'EventTimestamp' property.
Tested: Manually tested [1]
This is already done in this way for the polling api, in log_services.hpp
1455 objectToFillOut["Created"] = 1456 redfish::time_utils::getDateTimeUintMs(entry.Timestamp);
using the same function. So there is nothing new here.
[1] https://discord.com/channels/775381525260664832/1285909954095616050/1327330501937205382
Change-Id: I49670b13d609ac54a5c9d21da9ff1697c7524b5d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
1c588de9 | 09-Jan-2025 |
Abiola Asojo <abiola.asojo@ibm.com> |
Fix --buildtype=debug build error message
Fixes error: .../bmcweb/redfish-core/include/event_service_manager.hpp:175:34: ... potential null pointer dereference [-Werror=null-dereference]
Tested: No
Fix --buildtype=debug build error message
Fixes error: .../bmcweb/redfish-core/include/event_service_manager.hpp:175:34: ... potential null pointer dereference [-Werror=null-dereference]
Tested: No longer see this error with buildtype debug
Change-Id: Id245e09267eb52e8eac2bf4eb0e94489409eac2e Signed-off-by: Abiola Asojo <abiola.asojo@ibm.com>
show more ...
|
a6bd55b0 | 13-Jan-2025 |
Gunnar Mills <gmills@us.ibm.com> |
Add path of problem device to trace
Needed this to debug a problem. Makes this trace a lot more useful.
Tested: This now printed the devices causing the problems.
Change-Id: I0cb1529cfa9fec4334730
Add path of problem device to trace
Needed this to debug a problem. Makes this trace a lot more useful.
Tested: This now printed the devices causing the problems.
Change-Id: I0cb1529cfa9fec4334730cab1cf2010a00218b6e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
7da633f0 | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Clang-tidy updates for 19
Update to add new checks that are now available to us. Fix the minor issues we have. A few of our checks that we previously had enabled have been renamed, so remove those
Clang-tidy updates for 19
Update to add new checks that are now available to us. Fix the minor issues we have. A few of our checks that we previously had enabled have been renamed, so remove those from the file as well.
Change-Id: Idbbfc3cb7ba42ac780e557554d7ae8ab190e7551 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
f2656d1b | 13-Jan-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
ci: fix ci ubasan failure
remove an unused std::shared_ptr<Subscription>& from void Subscription::resHandler(...)
Since it was just a reference, it was non-owning anyways and removing it should not
ci: fix ci ubasan failure
remove an unused std::shared_ptr<Subscription>& from void Subscription::resHandler(...)
Since it was just a reference, it was non-owning anyways and removing it should not have any impact to the lifetime of the managed object.
Tested: Inspection only.
Change-Id: Iab57e456d5a7ae32305e1a38ddcc37c0f0156ed4 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
a5f87d48 | 07-Jan-2025 |
Gunnar Mills <gmills@us.ibm.com> |
SW: Don't log if no association
We define logging levels in DEVELOPING.md[1], an error is "Something went wrong, and we weren't able to give the expected response. Service is still operational. "err
SW: Don't log if no association
We define logging levels in DEVELOPING.md[1], an error is "Something went wrong, and we weren't able to give the expected response. Service is still operational. "error" should be used for unexpected conditions that prevented bmcweb from fulfilling the request. "error" shall be used for 5xx errors.".
This clearly isn't an error since we just ignore not having an association and move on. Moved these traces to DEBUG. Andrew mentioned these cluttering the journal when running CI.
[1]: https://github.com/openbmc/bmcweb/blob/master/DEVELOPING.md#logging-levels
Tested: This is changing a Logging Level only.
Change-Id: If9324ab32a1f30f446a1b6f359d8a76af899378a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
4ac78946 | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Add content type to HTTP events
Some receiving servers require that content-type be sent. The Redfish specification does not clarify whether or not content-type should be specified, but the HTTP RF
Add content type to HTTP events
Some receiving servers require that content-type be sent. The Redfish specification does not clarify whether or not content-type should be specified, but the HTTP RFC makees it clear, as does security guidelines.
Tested: Set up Redfish-Event-Listener and modify to print headers. Observe that application/json header is now set when events are submitted to the server.
Change-Id: Idc96848e04f185743b14bd345d46418d38f5f5b1 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
492ec93a | 09-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Refactor large lambda
Similar to other patches, refactor this large lambda into a normal function.
Tested: Redfish service validator passes
Change-Id: I45e0b421f04ad8351de367bfdc7b8512bf10ca45 Sig
Refactor large lambda
Similar to other patches, refactor this large lambda into a normal function.
Tested: Redfish service validator passes
Change-Id: I45e0b421f04ad8351de367bfdc7b8512bf10ca45 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
58c71488 | 19-Oct-2024 |
Ed Tanous <etanous@nvidia.com> |
Transition to simpler trigger interface
Using this simpler interface allows us to simplify the unpacking code, and remove the use of a variant containing a variant, which has caused bugs in the past
Transition to simpler trigger interface
Using this simpler interface allows us to simplify the unpacking code, and remove the use of a variant containing a variant, which has caused bugs in the past. Splitting these apart allows us to replicate the Redfish interfaces with less code.
Tested:
Discrete and Numeric triggers both create correctly ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X POST https://192.168.7.2/redfish/v1/TelemetryService/Triggers -d '{"Name": "eds", "NumericThresholds": {"LowerCritical": {"Reading": 1.0, "Activation": "Increasing", "DwellTime": "P1S"}}}' curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X POST https://192.168.7.2/redfish/v1/TelemetryService/Triggers -d '{"Name": "eds", "DiscreteTriggers": [{"DwellTime": "P1S", "Severity": "OK", "Value": "1234"}]}
```
Change-Id: If898e2285f90f78b22e47cc670e4206ba4368665 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
e3648032 | 16-Oct-2024 |
Ed Tanous <etanous@nvidia.com> |
Make trigger use common types
Trigger having its own variant causes us to duplicate code. This was left out of the original refactoring because it was complex given the variant of a variant status.
Make trigger use common types
Trigger having its own variant causes us to duplicate code. This was left out of the original refactoring because it was complex given the variant of a variant status.
This commit finally does the port.
Tested: Unclear what tests exist for triggers that would use this code ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X POST https://192.168.7.2/redfish/v1/TelemetryService/Triggers -d '{"Name": "eds", "NumericThresholds": {"LowerCritical": {"Reading": 1.0, "Activation": "Increasing", "DwellTime": "P1S"}}}' ```
Succeeds. GET on the resource results in: { "@odata.id": "/redfish/v1/TelemetryService/Triggers/eds", "@odata.type": "#Triggers.v1_2_0.Triggers", "Id": "eds", "Links": { "MetricReportDefinitions": [] }, "MetricProperties": [], "MetricType": "Numeric", "Name": "eds", "NumericThresholds": { "LowerCritical": { "Activation": "Increasing", "DwellTime": "PT1.000S", "Reading": 1.0 } }, "TriggerActions": [] }
Change-Id: I8f683cc9423ee2ba111d3ca1889e78f7d33433c9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
dac07cad | 31-Dec-2024 |
Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com> |
Fix MRD patch request with overwriting metrics
Follow-up for [1] Patch request with body:
{"Metrics": [{"MetricProperties": ["<path_to_sensor>"]}]}
updates metric properly, without appending to ol
Fix MRD patch request with overwriting metrics
Follow-up for [1] Patch request with body:
{"Metrics": [{"MetricProperties": ["<path_to_sensor>"]}]}
updates metric properly, without appending to old "MetricProperties" values
[1]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76532
Change-Id: I9e2bbea28f3b17adeb61c7f3e54eec87c103ef54 Signed-off-by: Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com>
show more ...
|
b437a535 | 20-Dec-2024 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
account_service: Move to unpackproperty method
Change-Id: If677e2b4e9bd03b359913670d120f15d4a5f29b9 Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> |
a64919e8 | 12-Dec-2024 |
Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com> |
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
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>
show more ...
|
770362fe | 16-Dec-2024 |
Milton D. Miller II <mdmii@outlook.com> |
Use raw content URL
Replace the message registry URL with the official GitHub raw download URL to give the json content not a web SCM GUI.
Change-Id: I0ac800ee3803c9bef3a6a799b20887df84c3c173 Signe
Use raw content URL
Replace the message registry URL with the official GitHub raw download URL to give the json content not a web SCM GUI.
Change-Id: I0ac800ee3803c9bef3a6a799b20887df84c3c173 Signed-off-by: Milton Miller <mdmii@outlook.com>
show more ...
|
6e1a52fa | 15-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix setting gateways
There's a number of conditions in setting gateways that don't work properly. Specifically, one of the issues is setting a gateway on an address that already exists. It returns
Fix setting gateways
There's a number of conditions in setting gateways that don't work properly. Specifically, one of the issues is setting a gateway on an address that already exists. It returns a PropertyValueConflict error on Ipv4Addresses/1/Gateway with Ipv4Addresses/1/Gateway
Obviously an address can't conflict with itself, so this is wrong.
To address this, move the gateway setting and selection code into a routine outside of the main loop, after all the gateways are accounted for, and so we can treat them separately.
Tested; PATCH to an existing ip address works, and no longer returns the error.
More test cases likely needed.
Change-Id: I0339e02fc27164337416637153d0b0f744b64ad8 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
81ee0e74 | 20-Dec-2024 |
Chandramohan Harkude <Chandramohan.harkude@gmail.com> |
Update Submit Test event feature to send custom data
Changes Added : Updated the submit test event feature to send test data as per spec
https://www.dmtf.org/sites/default/files/standards/documents
Update Submit Test event feature to send custom data
Changes Added : Updated the submit test event feature to send test data as per spec
https://www.dmtf.org/sites/default/files/standards/documents/ DSP2046_2019.1.pdf
Testing :
Tested sending custom test data and same data received at the event listener Change-Id: I2c2363a676aafd39c121c9fe4e16402c0f5961e2 Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
show more ...
|
a8a5bc1b | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Generate heartbeat registry
Generate the heartbeat registry, and adjust the #includes of the other generated registries.
Tested: Redfish service validator succeeds.
Change-Id: Iedbf1ae8dc655966669
Generate heartbeat registry
Generate the heartbeat registry, and adjust the #includes of the other generated registries.
Tested: Redfish service validator succeeds.
Change-Id: Iedbf1ae8dc6559666691f1feb71af08e856d5c80 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
847deee3 | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Generate resource event
Generate Resource event registry
Tested: On last patch of series. No behavior changes.
Change-Id: I924919db0e7fbde8ed698de6b59b86f788de9708 Signed-off-by: Ed Tanous <etano
Generate resource event
Generate Resource event registry
Tested: On last patch of series. No behavior changes.
Change-Id: I924919db0e7fbde8ed698de6b59b86f788de9708 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|