#
2edce4e2 |
| 17-Jan-2024 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Use raw procedure names in PEL msg reg
Start using the raw maintenance procedure names in the PEL message registry, such as BMC0001, instead of the enum values, such as 'bmc_firmware'. This wa
PEL: Use raw procedure names in PEL msg reg
Start using the raw maintenance procedure names in the PEL message registry, such as BMC0001, instead of the enum values, such as 'bmc_firmware'. This way, the script that generates documentation can list the procedure in the section for that PEL. This was requested by the support team.
Note that there is still one user of the enums - the checkstop analysis code uses them when it creates callouts by passing in them via JSON user data files.
There are pointers added to the README and schema to find the available procedures and their descriptions.
Tested: - The unit tests still work which verify the callout contents when PEL callouts are created via the message registry. - Also manually verified PEL procedure callouts look correct when created from the message registry.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I3e8416956120d4dae1ff40592fd0df4f0285d072
show more ...
|
#
0dd22c83 |
| 04-May-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Clear deconfig flag after callout replaced
Making use of the previous commit's framework to call a function when a fan or power supply becomes present, add code to the Manager class to register
PEL: Clear deconfig flag after callout replaced
Making use of the previous commit's framework to call a function when a fan or power supply becomes present, add code to the Manager class to register a callback that will clear the deconfig flag for all PELs created with the power-thermal or fan component ID that have the location code of the replaced fan/PS as a callout.
This way, the degraded mode reporting code will no longer pick up those PELs in its report as since the hardware was replaced those PELs are no longer relevant.
This is necessary only for fans or power supplies because they're the only N+1 hardware that can be hot plugged at runtime. And also because this is what the IBM service team wants.
Tested: Simulated missing hardware (changed present D-Bus property for fans, toggled PSU presence GPIO in the simulator for PSs). Saw errors get created for it, then simulated replacing it and saw those errors have their deconfig flag cleared, verifying before and after with peltool:
``` // Remove and replace fan phosphor-fan-monitor: Fan /system/chassis/motherboard/fan0 presence state change to false phosphor-log-manager: Created PEL 0x50000002 (BMC ID 2) with SRC 110076F1 phosphor-fan-monitor: Fan /system/chassis/motherboard/fan0 presence state change to true phosphor-log-manager: Detected FRU /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0 (U78DB.ND0.1234567-A0) present phosphor-log-manager: Clearing deconfig flag in PEL 0x50000002 with SRC 110076F1 because U78DB.ND0.1234567-A0 was replaced
// Remove and replace PS phosphor-log-manager: Created PEL 0x50000003 (BMC ID 3) with SRC 110015F6 ... phosphor-psu-monitor: Updating inventory present property. present:true invpath:/system/chassis/motherboard/powersupply0 name:powersupply0 phosphor-log-manager: Detected FRU /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0 (U78DB.ND0.1234567-E0) present phosphor-log-manager: Clearing deconfig flag in PEL 0x50000003 with SRC 110015F6 because U78DB.ND0.1234567-E0 was replaced ```
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iee05b4a612ca8f438f8c89f37b4e7b529a131a9f
show more ...
|
#
784b02e7 |
| 25-Apr-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL:test: Refactor mocked checkDumpStatus usage
When creating an instance of the SRC class in a testcase, it needs a filled in mock of the checkDumpStatus() function. Instead of manually doing that
PEL:test: Refactor mocked checkDumpStatus usage
When creating an instance of the SRC class in a testcase, it needs a filled in mock of the checkDumpStatus() function. Instead of manually doing that everywhere a PEL or SRC class is created, just do it in the constructor of the mock DataInterface class.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I74790c67251465aae87d318ea37891d9eabab5e5
show more ...
|
#
32e36b8c |
| 25-Apr-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL:pel_manager_test: Refactor temp dir cleanup
Several testcases were creating a temporary directory and then removing it at the end, except for one which missed the cleanup so the dir would stick
PEL:pel_manager_test: Refactor temp dir cleanup
Several testcases were creating a temporary directory and then removing it at the end, except for one which missed the cleanup so the dir would stick around in /tmp after the run was done.
To fix that and to make sure it doesn't happen again, just add the creating and deleting of the temp directory to the test fixture class so the deleting happens automatically.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2abb720b4c0aeb9dec6117d6399c3e4692709c68
show more ...
|
#
0bf04b5d |
| 28-Apr-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Convert a BCDTime to epoch milliseconds
Add a new function to convert a BCDTime value from a PEL to the number of milliseconds since the epoch.
This will be used to put the PEL creation timest
PEL: Convert a BCDTime to epoch milliseconds
Add a new function to convert a BCDTime value from a PEL to the number of milliseconds since the epoch.
This will be used to put the PEL creation timestamp on D-Bus.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ic470c9324e959b3e6a7eea29db4162a45dd54fc3
show more ...
|
#
bad056be |
| 25-Jan-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Handle multiple inv paths per loc code
DataInterface::getInventoryFromLocCode() was only returning a single inventory path from GetFRUsByExpandedLocationCode() even though multiple paths may ha
PEL: Handle multiple inv paths per loc code
DataInterface::getInventoryFromLocCode() was only returning a single inventory path from GetFRUsByExpandedLocationCode() even though multiple paths may have been returned.
Mostly that was fine, except when a processor on a DCM was called out. That would lead to only one processor on the DCM being set to not functional by service_indicators.cpp, so on the web UI the actual CPU called out may not have been marked as unhealthy (health status critical in Redfish).
This commit changes getInventoryFromLocCode() to return all the paths that GetFRUsByExpandedLocationCode() returns, and then makes the corresponding changes in service_indicators.cpp to be able to handle multiple inventory paths per location code when setting them to not functional and creating a critical association.
The other code that was calling this function can just use the first path returned, since in those cases it's just needed to get the VPD information for the PEL, and all the paths would return the same info anyway since they had the same location code.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ia16f50881e4a4f84c171ae20b7a99eddcc98ad4f
show more ...
|
#
d96fa60d |
| 15-Dec-2022 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Create class to read from the journal
Create a Journal class that can extract messages out of the journal and return them as a vector of strings that look like:
"Dec 14 15:58:17 systemd[1]: sy
PEL: Create class to read from the journal
Create a Journal class that can extract messages out of the journal and return them as a vector of strings that look like:
"Dec 14 15:58:17 systemd[1]: systemd-tmpfiles-clean.service: Deactivated successfully."
It can either grab the previous N entries, or the previous N entries that match a specific SYSLOG_IDENTIFIER value.
The class follows the same strategy as the DataInterface class where a base class pointer is passed into the PEL Manager class so that during unit test it can be mocked.
Future commits will capture the journal into PEL UserData sections.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9f4bb304c4b213165049fa00de2e62f962ae67f1
show more ...
|
#
2544b419 |
| 04-Oct-2022 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update with latest
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I329396457b83bb2eb8740629b4ac1fbe9106bced
|
#
be952d2e |
| 01-Jul-2022 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Fix more cppcheck warnings
This is the second of two commits to fix most of the cppcheck warnings in the PEL code. It doesn't fix all of them because some are false positives and some are just
PEL: Fix more cppcheck warnings
This is the second of two commits to fix most of the cppcheck warnings in the PEL code. It doesn't fix all of them because some are false positives and some are just suggestions.
It's broken up into two commits to make them smaller.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id9f462386df85fd25d09529d6b410115ff4ccba8
show more ...
|
#
45e83521 |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibc25db433a6926f7ee43ea83312c3ac14f480c33
show more ...
|
#
0003af14 |
| 08-Jun-2022 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Sanitize D-Bus fields that come from PELs
The Resolution D-Bus property is filled with values from the PEL callout fields like the serial and part numbers. These fields usually come from EEPRO
PEL: Sanitize D-Bus fields that come from PELs
The Resolution D-Bus property is filled with values from the PEL callout fields like the serial and part numbers. These fields usually come from EEPROMs, and may not necessarily be valid printable values if the code that creates the PEL doesn't sanitize the values first. If any of the characters were invalid, the daemon would crash when D-Bus broker disconnects it from D-Bus since it doesn't allow invalid values on D-Bus.
Prevent this crash by converting any non printable characters in the Resolution property to spaces. This also sanitizes the EventId property which contains the SRC ASCII string and hex words just to be safe.
This is really just a concern for non-BMC created PELs, since the BMC code that reads EEPROMs already sanitizes the values when it reads them, but PELs have come in from other subsystems that don't.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: If0e80fd9db27446f5367ed046e4bca2eb62e3fb2
show more ...
|
#
3e274432 |
| 14-Sep-2021 |
Sumit Kumar <sumit_kumar@in.ibm.com> |
PEL: Write terminating SRC to the progress SRC Check for incoming pels for severity type 0x51 - Critical error, System termination. If found, fetch the SRC and add this SRC to progre
PEL: Write terminating SRC to the progress SRC Check for incoming pels for severity type 0x51 - Critical error, System termination. If found, fetch the SRC and add this SRC to progress SRC interface on dbus. In addition set the terminate bit in BMC created pels only. Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com> Change-Id: I26194a26743263183dcb61e097c745c4705fa006
show more ...
|
#
66491c61 |
| 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic8e6ade739bd5ea6e79cac6b9bb2b182748e10c8
|
#
9d43a727 |
| 24-Aug-2021 |
Sumit Kumar <sumit_kumar@in.ibm.com> |
PEL: Update bmc & platform dump status in SRC section With every PEL creation, the status of bmc and platform dumps - Hardware and Hypervisor would be checked and status bits in SRC
PEL: Update bmc & platform dump status in SRC section With every PEL creation, the status of bmc and platform dumps - Hardware and Hypervisor would be checked and status bits in SRC section updated accordingly. Change-Id: I3ec7626611cf330f2ce235a97ee3046c0d32b6ab Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
show more ...
|
#
ea2873dd |
| 18-Aug-2021 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Change BMCSP01 maint procedure to BMC0001 This name change allows 4 characters of uniqueness instead of just 2. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id:
PEL: Change BMCSP01 maint procedure to BMC0001 This name change allows 4 characters of uniqueness instead of just 2. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I12cb883619a3a3c2f843dd7ccc3db6524dea3459
show more ...
|
#
479b6927 |
| 17-Aug-2021 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Remove 'no_vpd_for_fru' maintenance procedure This procedure was being used in a callout when the location code could not be found on an inventory item. The code was changed to jus
PEL: Remove 'no_vpd_for_fru' maintenance procedure This procedure was being used in a callout when the location code could not be found on an inventory item. The code was changed to just not add a callout in this case. This was done for the following reasons: 1) There's no expected reason that the inventory would be missing a location code for a valid inventory path. 2) There wasn't a way to give a hint to the end user about what the callout should be in that case. Usually maintenance procedures should have steps one can take to still do the appropriate replacement. 3) Because of 1), this case indicates a bad inventory path passed in by the caller. Theoretically there is a way to have a 'bmc_code' callout, but that wouldn't be appropriate to add in this log since the intent of this one is for another problem. 3a) There is no way to create a new error log from inside a PEL section, and I don't think this one case warrants coming up with a way to do so. 4) The inventory path in question is still being added into a UserData section so that development can debug it. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I0757080f04942807cc34029d8667387db6b959fe
show more ...
|
#
2ccdcef9 |
| 31-Jul-2021 |
Sumit Kumar <sumit_kumar@in.ibm.com> |
PEL: Guard against hostboot sending down duplicate PEL Ids This commit is to guard against hostboot sending down PEL Id that we already have in our repository. This caused PEL to get
PEL: Guard against hostboot sending down duplicate PEL Ids This commit is to guard against hostboot sending down PEL Id that we already have in our repository. This caused PEL to get orphaned in the filesystem without a corresponding valid openbmc event log Id. The action is to move such PELs to archive folder. Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com> Change-Id: I46bb865b4b87ec0b59f362e3f79a1b5a6710a45c
show more ...
|
#
593a4c66 |
| 16-Jun-2021 |
Vijay Lobo <vijaylobo@gmail.com> |
PEL: Support resolution property Support resolution property to add callouts Tested: Created new PEL using busctl and checked for the property to see if the value is updated. Th
PEL: Support resolution property Support resolution property to add callouts Tested: Created new PEL using busctl and checked for the property to see if the value is updated. The error log daemon was restarted and the property is checked again to make sure the value is restored. Verified serialization of new error log by recreating it on a old code version to make sure logs are created w/o the new property and the daemon did not crash. Result: root@rainier:~# busctl get-property xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging/entry/1 xyz.openbmc_project.Logging.\ Entry Resolution s "1. Priority: High, Procedure: BMCSP02\n2. Priority: Medium, PN: \ SVCDOCS\n" Test with location Code: root@p10bmc:~# busctl get-property xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging/entry/3 xyz.openbmc_project.Logging.Entry \ Resolution s "1. Location Code: U78DA.ND0.1234567-P0, Priority: Medium, PN: SVCDOCS\n2. \ Priority: Low, Procedure: BMCSP02\n" Signed-off-by: Vijay Lobo <vijaylobo@gmail.com> Change-Id: I44eebbf794efeb8e752fff98de7c638c927982cd
show more ...
|
#
530efbfc |
| 24-Jun-2021 |
Ramesh Iyyar <rameshi1@in.ibm.com> |
PEL: Manager: Implemented the GetBMCLogIdFromPELId dbus method In OpenPOWER based system, the application may need to get the OpenBMC event log id by using the PEL id (aka Entry ID (EID)
PEL: Manager: Implemented the GetBMCLogIdFromPELId dbus method In OpenPOWER based system, the application may need to get the OpenBMC event log id by using the PEL id (aka Entry ID (EID) which is a unique id in the PEL) so added the interface for the same. Tested: - Tested by below unit test cases. - With valid PEL ID - With invalid PEL ID - Tested by using busctl command - With valid PEL ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetBMCLogIdFromPELId u 1342211909 >>> u 4534 ``` - With invalid PEL ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetBMCLogIdFromPELId u 0xFFFFFFFF >>> Call failed: Invalid argument was given. ``` DBus interface: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/44421 Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com> Change-Id: Ibc67c0d1ad83457800847853e30254e2d9be53e6
show more ...
|
#
f4203c47 |
| 24-Jun-2021 |
Ramesh Iyyar <rameshi1@in.ibm.com> |
PEL: Manager: Implemented the GetPELIdFromBMCLogId dbus method In OpenPOWER based system, the application may need to get the PEL id (aka Entry ID (EID) which is a unique id in the PEL)
PEL: Manager: Implemented the GetPELIdFromBMCLogId dbus method In OpenPOWER based system, the application may need to get the PEL id (aka Entry ID (EID) which is a unique id in the PEL) by using OpenBMC event log id so added the interface for the same. Tested: - Tested by below unit test cases. - With valid OpenBMC Event Log ID - With invalid OpenBMC Event Log ID - Tested by using busctl command - With valid OpenBMC Event Log ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetPELIdFromBMCLogId u 4534 >>> u 1342211909 ``` - With invalid OpenBMC Event Log ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetPELIdFromBMCLogId u 0xFFFFFFFF >>> Call failed: Invalid argument was given. ``` DBus interface: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/44420 Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com> Change-Id: I60ff5b86bb82cef2c2d3ceab74c49de5b6f6f99d
show more ...
|
#
1d8835bb |
| 07-Jun-2021 |
Sumit Kumar <sumit_kumar@in.ibm.com> |
PEL: Deleted PELs moved to new folder under logs - PELs whose corresponding event logs have been deleted will be available in the archive folder. - Archive folder size is tracke
PEL: Deleted PELs moved to new folder under logs - PELs whose corresponding event logs have been deleted will be available in the archive folder. - Archive folder size is tracked under sizeWarning() function. - Archived PELs log can be viewed using peltool with flag --archive. - PELs deleted using peltool is not archived. - Updated README.md Change-Id: Ie2c1b4c2ca30fb79904bc9d582a01ef8102aed0e Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
show more ...
|
#
d354a398 |
| 01-Jun-2021 |
Vijay Lobo <vijaylobo@gmail.com> |
PEL: Support eventId property Support eventId property to add SRC and the hex words to the property Tested by creating the PEL log and to make sure that the eventId property was
PEL: Support eventId property Support eventId property to add SRC and the hex words to the property Tested by creating the PEL log and to make sure that the eventId property was updated properly with 9 words and then its present in the right format when the logging daemon is restarted Test result: root@rainier# busctl get-property xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1 xyz.openbmc_project.Logging.Entry EventId s "BD8D1001 00000055 2E2D0010 00000000 00000000 00000000 00000000 00000000 00000000" Also tested with old version of error log and new version with the eventId property to make sure we don't have issues in serialization Change-Id: I8e39804cd3d47f0e321c1cf533b97bf165c07518 Signed-off-by: Vijay Lobo <vijaylobo@gmail.com>
show more ...
|
#
d26fa3e7 |
| 21-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: clean up various compile warnings Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags
openpower-pels: clean up various compile warnings Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags of Meson. Issues fixed: - many unused parameters - invalid case fall-through - excess semi-colons - incorrect 'const' on return-by-value type - removal of variable length array in test case - uncaught return from 'system' call in test case Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8af69184042cf8661d1307a02ecf3afcab4724a1
show more ...
|
#
993168de |
| 07-Apr-2021 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Change method of asserting a fault LED There was a recent change in direction on how PELs should request that fault LEDs be turned on. Previously, the code would talk to the LED
PEL: Change method of asserting a fault LED There was a recent change in direction on how PELs should request that fault LEDs be turned on. Previously, the code would talk to the LED group objects directly. The new direction is to set the Functional property on the OperationalStatus interface on the inventory objects in question to false, and the LED manager code will watch that to know when to turn on the LEDs. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ieebb09ba002843cf863359a09aba26540356aa91
show more ...
|
#
1ab6696f |
| 29-Oct-2020 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Use the real system names property There is now a 'Names' property on the new xyz.openbmc_project.Configuration.IBMCompatibleSystem interface that the DataInterface::getSystemNa
PEL: Use the real system names property There is now a 'Names' property on the new xyz.openbmc_project.Configuration.IBMCompatibleSystem interface that the DataInterface::getSystemNames function will read. The existing code was mostly a placeholder until the actual interface showed up on D-Bus. Since the path that holds the interface is system specific, and the PEL code should only rarely need this, the code was changed to read it on demand instead of at caching it startup. Since getSystemNames() no longer returns a cached value, the signature was changed slightly to remove the reference from the returned std::vector<std::string> value. The UserHeader constructor used to make a call to getSystemNames every time, and that was changed to only call it when actually necessary, which is when there is a severity value defined in the message registry that depends on the system name. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I1d4f307ef38287b631f94dae2b8929307d129029
show more ...
|