History log of /openbmc/phosphor-logging/extensions/openpower-pels/manager.cpp (Results 1 – 25 of 79)
Revision Date Author Comments
# 760b9817 18-Mar-2025 harsh-agarwal1 <harsh.agarwal@ibm.com>

PEL: Enable deletion if PEL file is deleted

- This ensures that PEL objects are deleted if PEL files are
deleted, irrespective of links to HWIsolation records.

Tested:
Sample output:
```bash
$ bu

PEL: Enable deletion if PEL file is deleted

- This ensures that PEL objects are deleted if PEL files are
deleted, irrespective of links to HWIsolation records.

Tested:
Sample output:
```bash
$ busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/
logging/entry/3 xyz.openbmc_project.Object.Delete Delete
Call failed: The service is temporarily unavailable.

$ peltool -D
```
PEL entry 3 was deleted in above example.
Change-Id: I416fad1d9dc832393b1ba689d582c602e27c79c6
Signed-off-by: Harsh Agarwal <Harsh.Agarwal@ibm.com>

show more ...


# 25291157 01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: Iac96affe709a51dd865117d006cb033cf5c624b1
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: Iac96affe709a51dd865117d006cb033cf5c624b1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# b6d3e2fc 18-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have b

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.

See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.

Change-Id: I754b2a89844754c9d87ca20a829cce32dd7feb51
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# e5940634 22-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

extension: use map in create extension

Adjust the Create extension to use a map for metadata instead of
vector.

Tested: Unit tests updated and passing.

Signed-off-by: Patrick Williams <patrick@stw

extension: use map in create extension

Adjust the Create extension to use a map for metadata instead of
vector.

Tested: Unit tests updated and passing.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9bd62b8dcc8b18a61958ed64de98b52a48333637

show more ...


# d763db35 03-Sep-2024 harsh-agarwal1 <harsh.agarwal@ibm.com>

PEL: Prevent deletion if it's associated with HWIsolation

- This ensures that PELs linked to HWIsolation records are protected
from accidental deletion.
- Shows error message of "Call failed: The se

PEL: Prevent deletion if it's associated with HWIsolation

- This ensures that PELs linked to HWIsolation records are protected
from accidental deletion.
- Shows error message of "Call failed: The service is temporarily
unavailable.", when attempting to delete such a PEL individually.
- If trying to Delete all, will skip such PELs without showing any
message.

Tested:
Sample output:
```bash
$ busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/
logging xyz.openbmc_project.Collection.DeleteAll DeleteAll

$ busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/
logging/entry/2 xyz.openbmc_project.Object.Delete Delete
Call failed: The service is temporarily unavailable.

```
Change-Id: I2d28de91bbb0fbc2a991e3d5e5631814d41fe044
Signed-off-by: Harsh Agarwal <Harsh.Agarwal@ibm.com>

show more ...


# 075c7923 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I21d2ca8065f24fd73509229c517f5caf48934b60
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 221b79b3 04-Mar-2024 Paul Fertser <fercerpav@gmail.com>

log_manager: remove redundant createWithFFDC

Fold the functionality of creating an event entry with FFDC appended
into a common implementation to avoid code duplication and to ease
further extension

log_manager: remove redundant createWithFFDC

Fold the functionality of creating an event entry with FFDC appended
into a common implementation to avoid code duplication and to ease
further extension and maintainability.

Build-tested with 'openpower-pel-extension' enabled.

Change-Id: I0f8151b782bf42cc7bc0981e58f6ab1e3cda080c
Signed-off-by: Paul Fertser <fercerpav@gmail.com>

show more ...


# 6ddbf69e 05-Sep-2023 Willy Tu <wltu@google.com>

Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE

Fix the code to support new sdbusplus error without
SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.

Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1
Signed-off-b

Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE

Fix the code to support new sdbusplus error without
SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.

Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 1aa90d49 13-Sep-2023 Jayanth Othayoth <ojayanth@in.ibm.com>

PEL: switch fmt::format to use std::format

fmt::format is supported in the c++ std. This will
help to remove fmt package dependency.

Change-Id: I89f0a5b67bbfe54168a20e93c989a1ae87f54503
Signed-

PEL: switch fmt::format to use std::format

fmt::format is supported in the c++ std. This will
help to remove fmt package dependency.

Change-Id: I89f0a5b67bbfe54168a20e93c989a1ae87f54503
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>

show more ...


# 1cb59f70 20-Jul-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Update Deconfig D-Bus property after clear

When a fan or power supply is replaced, the deconfig flag field in the
PEL is cleared. There is also a Deconfig property on D-Bus that should
match t

PEL: Update Deconfig D-Bus property after clear

When a fan or power supply is replaced, the deconfig flag field in the
PEL is cleared. There is also a Deconfig property on D-Bus that should
match the PEL field, but the code to clear that was missed, so add it.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6fc971953b6e4d1e1c2da421bbc920923b199dbb

show more ...


# fbdfc765 30-Jun-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Use lg2 in Manager class

Modernize it a bit and it makes it easier to see debug traces which can
be done by just running the daemon from the command line. There are
quite a few debug traces in

PEL: Use lg2 in Manager class

Modernize it a bit and it makes it easier to see debug traces which can
be done by just running the daemon from the command line. There are
quite a few debug traces in this file.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id1291e3a3c3882d1ed917d4a414cb6253ebf2644

show more ...


# 3387eac9 06-Jul-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Fixed serializing of elog properties

The PEL code modifies the Resolution and EventId properties on the
standard event log objects to fill them in with PEL specific values. It
was originally d

PEL: Fixed serializing of elog properties

The PEL code modifies the Resolution and EventId properties on the
standard event log objects to fill them in with PEL specific values. It
was originally doing this by using the resolution() and eventId()
override functions on the Entry object that would do the elog serialize
after it updated those properties.

Since then, the code was changed to instead call the resolution() and
eventId() functions that also take the bool skipSignal parameter, which
caused it to not call the overridden functions which meant those
properties weren't serialized and so not restored after a restart.

While we could just also override the functions that take that
skipSignal parameter to do the serialize, those get called when the
event log object is restored on startup, so it would cause unnecessary
calls to serialize.

Instead, just call the serialize() function directly after updating the
event ID and resolution when creating a PEL.

Tested:
The Resolution and EventId D-Bus properties are now correct after the
process is restarted.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8c1822e9c31925983feddab657644c98f37ef079

show more ...


# b25e8a32 07-Jun-2023 Matt Spinler <spinler@us.ibm.com>

PEL: No PC signals when updating entry props

The PEL code has to update properties on the
xyz.openbmc_project.Logging.Entry interface after the corresponding PEL
has been created. These updates don

PEL: No PC signals when updating entry props

The PEL code has to update properties on the
xyz.openbmc_project.Logging.Entry interface after the corresponding PEL
has been created. These updates don't need to send PropertiesChanged
signals since it is when the event log is being created.

The ipmid daemon is watching for PC signals and it was triggering a
bunch of unnecessary activity.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6f9a2992abf0454bc95b44bb9897642cecd3200e

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 ...


# 8e65f4ea 02-May-2023 Matt Spinler <spinler@us.ibm.com>

PEL: New D-Bus properties on PEL entry iface

Fill in the 4 newly added properties on the PEL entry D-Bus interface:
- Platform log ID (PLID)
- Deconfig flag from the SRC section
- Guard flag from th

PEL: New D-Bus properties on PEL entry iface

Fill in the 4 newly added properties on the PEL entry D-Bus interface:
- Platform log ID (PLID)
- Deconfig flag from the SRC section
- Guard flag from the SRC section
- Creation timestamp

These were also added to the PELAttributes map in the Repository class
so that each PEL wouldn't have to be reconstructed from a file again
when creating the D-Bus objects.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7878645f56c634e6111fcecc22ab27673d0c0f5d

show more ...


# 87f39248 01-May-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Catch exception as const

That's the preferred way when catching exceptions.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib4f27c1de673a99e61468adf261050d9c95172df


# 9d921096 15-Dec-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Capture the journal in UserData sections

If a PEL message registry entry has a 'JournalCapture' section, capture
the listed portions of the journal in UserData sections for that error.

If the

PEL: Capture the journal in UserData sections

If a PEL message registry entry has a 'JournalCapture' section, capture
the listed portions of the journal in UserData sections for that error.

If the JSON looks like:

"JournalCapture": {
"NumLines": 30
}

Then the code will capture the previous 30 lines from the journal into a
single UserData section.

If the JSON looks like:

"JournalCapture":
{
"Sections": [
{
"SyslogID": "phosphor-bmc-state-manager",
"NumLines": 20
},
{
"SyslogID": "phosphor-log-manager",
"NumLines": 15
}
]
}

Then the code will create two UserData sections, the first with the most
recent 20 lines from phosphor-bmc-state-manager, and the second with 15
lines from phosphor-log-manager.

If a section would cause the PEL to exceed its maximum size of 16KB, it
will be dropped. While the UserData class does have a shrink() method,
it prunes data from the end, which would cause the most recent journal
entries to be removed, which could be misleading.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2ecbd8002b0e7087eb166a1219c6ab9da14a122a

show more ...


# 7a3ede57 18-Nov-2022 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

Convert ServiceProviderNotify to enum

Converted ServiceProviderNotify to an enum.
Supported options are - "NotSupported", "Notify" and "Inhibit".

Other changes are at the links below.
https://gerri

Convert ServiceProviderNotify to enum

Converted ServiceProviderNotify to an enum.
Supported options are - "NotSupported", "Notify" and "Inhibit".

Other changes are at the links below.
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/47683
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/46886

Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Change-Id: I673f66a3f854683e32f2282abd85f50d630ec884

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


# 45796e82 01-Jul-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Fix some cppcheck warnings

This is the first 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 some cppcheck warnings

This is the first 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: I75937797a6920611b136d600e9efd6c694e4209c

show more ...


# 8b81ec0e 12-Jul-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Update D-Bus event sev based on PEL severity

Put in checks to ensure the D-Bus event log severity agrees with the
final PEL severity for PELs created by the BMC. The D-bus property is
what is

PEL: Update D-Bus event sev based on PEL severity

Put in checks to ensure the D-Bus event log severity agrees with the
final PEL severity for PELs created by the BMC. The D-bus property is
what is used in the Redfish event log, and we want to avoid cases like
having a Critical event log for an informational PEL.

This could happen in the case where the PEL message registry entry for
the event has a hardcoded or manufacturing specific severity value that
is different than the severity the D-Bus event log is first created
with.

This commit ensures that:
* If the PEL is nonError/recovered, the D-Bus severity is one of the
non error ones.
* If the PEL isn't nonError/recovered, then the D-Bus severity also
isn't.
* If the PEL is critical, the D-Bus severity is also critical.

It doesn't try to update the D-Bus severity for every PEL severity
because there isn't a one to one mapping - e.g. Notice, Debug, and
Informational D-Bus severities all map to a PEL severity of
nonError(informational).

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6b0006034090e6d8e33e9f8b136ae50cce489f6e

show more ...


# df5cb830 12-Jul-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Move down quiesce check

Move the check where the host quiesce target may get started based on
the PEL severity to the last thing that happens when either a PEL is
created by BMC code or receive

PEL: Move down quiesce check

Move the check where the host quiesce target may get started based on
the PEL severity to the last thing that happens when either a PEL is
created by BMC code or received by the host. It just seems more
straight forward to not start systemd targets before even filling in all
of the PEL related D-Bus properties.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I689d9947ebeabfdd914b43d32b49c7f1b6cbcdd7

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 ...


# 8bd4ca4e 01-Apr-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Fill in getPELJSON function

This D-Bus method will return the PEL parsed into a JSON string by
calling /usr/bin/peltool and capturing the output.

Signed-off-by: Matt Spinler <spinler@us.ibm.co

PEL: Fill in getPELJSON function

This D-Bus method will return the PEL parsed into a JSON string by
calling /usr/bin/peltool and capturing the output.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I47d2834a569c984a8bb71f06b73255ea5a9f5c7e

show more ...


# aa85a072 23-Mar-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Add getPELJSON D-Bus method stub

In the future this will return the full PEL in JSON. This stub is going
in so the phosphor-dbus-interface yaml for the method can merge without
breaking the bu

PEL: Add getPELJSON D-Bus method stub

In the future this will return the full PEL in JSON. This stub is going
in so the phosphor-dbus-interface yaml for the method can merge without
breaking the build complaining about an unimplemented pure virtual.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I4a0b98a263b544fffba2cc832b4817e7d2ad155b

show more ...


1234