History log of /openbmc/phosphor-fan-presence/presence/error_reporter.cpp (Results 1 – 10 of 10)
Revision Date Author Comments
# 5e15c3ba 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

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

show more ...


# fbf4703f 17-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

use std::format instead of fmt::format

The std::format is sufficient for the uses in this repository except
for in one file (override_fan_target.cpp, since P2286 isn't supported
by GCC yet). Switch

use std::format instead of fmt::format

The std::format is sufficient for the uses in this repository except
for in one file (override_fan_target.cpp, since P2286 isn't supported
by GCC yet). Switch to std::format whenever possible.

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

show more ...


# 61b73296 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

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

show more ...


# cb356d48 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: I9029cc722e7712633c15436bd3868d8c3209f567

show more ...


# 76e73c2a 21-Apr-2021 Matt Spinler <spinler@us.ibm.com>

Let PowerState class run multiple callbacks

Previously the PowerState class could only handle a single callback
function. This commit changes that to allow other callback functions to

Let PowerState class run multiple callbacks

Previously the PowerState class could only handle a single callback
function. This commit changes that to allow other callback functions to
be added with a addCallback() method. The callback functions are then
executed when the power state changes.

This also changes the use of the PowerState object in the fan presence
code to a shared_ptr instead of a unique_ptr, and adds a function to
return the PowerState object to use in the app, creating it if
necessary. This allows multiple pieces of the code to add their own
callbacks to the same object.

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

show more ...


# c674510e 22-Oct-2020 Matt Spinler <spinler@us.ibm.com>

Save the Logger output as plain text, not JSON

This file is sent in when an event log is created to be used as FFDC.
The output is smaller and also slightly easier to read when it is in

Save the Logger output as plain text, not JSON

This file is sent in when an event log is created to be used as FFDC.
The output is smaller and also slightly easier to read when it is in a
text file of the form: <timestamp>: <messsage>.

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

show more ...


# 9e9f599c 30-Sep-2020 Matt Spinler <spinler@us.ibm.com>

presence: Make error time be per fan

Previously there was a global value for the amount of time a fan needed
to be missing before an event log was created. This commit changes it
so

presence: Make error time be per fan

Previously there was a global value for the amount of time a fan needed
to be missing before an event log was created. This commit changes it
so that instead the value is specified per fan in the JSON.

This way, the times can be different or left off completely on a fan to
fan basis. The ErrorReporter object will only be created if there is at
least one fan with a time value.

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

show more ...


# 39fcd50e 24-Sep-2020 Matt Spinler <spinler@us.ibm.com>

presence: Create event logs for missing fans

After the fan missing timer expires, create an OpenBMC event log with
the name xyz.openbmc_project.Fan.Error.Missing. It will call out the

presence: Create event logs for missing fans

After the fan missing timer expires, create an OpenBMC event log with
the name xyz.openbmc_project.Fan.Error.Missing. It will call out the
fan using the CALLOUT_INVENTORY_PATH AdditionalData keyword.

It will also add the Logger output in JSON as FFDC by saving it in a
file and passing in that file's descriptor as the event log API
dictates.

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

show more ...


# 0dc85eef 24-Sep-2020 Matt Spinler <spinler@us.ibm.com>

presence: Track missing fans with timers

Fill in the ErrorReporter class to track fan presence status using Timer
objects. The timers will be started if power is on when fans are
re

presence: Track missing fans with timers

Fill in the ErrorReporter class to track fan presence status using Timer
objects. The timers will be started if power is on when fans are
removed. If a fan is replaced before the timer expires, or if the
system powers off before the timer expires, the timer will be stopped.

The function called when a timer expires is currently stubbed, but
eventually it will create an event log.

The class watches presence changes by watching the Present property for
the fans in the inventory. Technically, it could watch an internal
status, but this method was chosen because
a) It makes testing easier, so presence changes can be forced using
busctl as opposed to physically removing hardware.
b) There wasn't really a good place to hook in presence state watches.
c) The application would already crash anyway if the inventory service
wasn't working for some reason.

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

show more ...


# e8122390 24-Sep-2020 Matt Spinler <spinler@us.ibm.com>

presence: Create ErrorReporter class

This class will, eventually, create event logs for missing fans.

This first commit will just create a stubbed out class if there is a
'repor

presence: Create ErrorReporter class

This class will, eventually, create event logs for missing fans.

This first commit will just create a stubbed out class if there is a
'reporting' section in the configuration JSON. From the JSON, the class
will pull out the value for the number of seconds to wait between first
detecting a fan is missing and creating the event log for it.

This requires a slight change to the existing JSON format, however the
JsonConfig class was updated to support both the old and new formats.

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

show more ...