commit | 9c495c62baa219f3cc60935cd5a46657846d7232 | [log] [tgz] |
---|---|---|
author | Jonico Eustaquio <jonico.eustaquio@fii-na.com> | Tue Jul 02 16:35:14 2024 -0500 |
committer | Jonico Eustaquio <jonico.eustaquio@fii-na.com> | Mon Sep 23 21:32:20 2024 +0000 |
tree | 672e6d57ec765ed3fefad3bc3a5f87977c2dd8fa | |
parent | 483ae8f09371cadeda4be02d8c109ac5dae5a98e [diff] |
Change selDelete to return void to avoid magic numbers The selDelete function is changed to throw a ResourceNotFound error when attempting to delete a non-existent SEL record instead of returning a magic number to signal phosphor-ipmi-host. Additionally, the phosphor-ipmi-host package will call the SELDelete method to call selDelete function so the dbus method name has been updated to reflect that. Tested: 1. Generated SEL entries 2. Delete a SEL entry using: busctl call xyz.openbmc_project.Logging.IPMI \ /xyz/openbmc_project/Logging/IPMI xyz.openbmc_project.Logging.IPMI \ SELDelete q <RecordID> 3. Using ipmitool sel list, all remaining SEL entries are seen 4. See a ResourceNotFound error if used a RecordID not already in SEL Change-Id: I33f0b70e9fbe4c7d8dc0f35589ae3096ed5fe269 Signed-off-by: Jonico Eustaquio <jonico.eustaquio@fii-na.com>
The SEL Logger daemon handles all requests to add new IPMI SEL records to the journal. SEL records stored in the journal are identified by the standard MESSAGE_ID metadata. Other metadata fields are used to store event-specific information for each record.
SEL records are identified in the journal using the MESSAGE_ID field.
The MESSAGE_ID for SEL records is "b370836ccf2f4850ac5bee185b77893a".
The additional metadata fields for a SEL record are
IPMI_SEL_RECORD_ID = Two byte unique SEL Record ID IPMI_SEL_RECORD_TYPE = The type of SEL entry (system or OEM) which determines the definition of the remaining bytes IPMI_SEL_GENERATOR_ID = The IPMI Generator ID (usually the IPMB Slave Address) of the requester IPMI_SEL_SENSOR_PATH = D-Bus path of the sensor in the event IPMI_SEL_EVENT_DIR = Direction of the event (assert or deassert) IPMI_SEL_DATA = Raw binary data included in the SEL record
The SEL Logger daemon exposes an interface for manually adding System and OEM type SEL events, and provides the capability to monitor for types of events and log them automatically.
The interface for System type events requires
The interface for OEM type events requires
The MESSAGE_ID and IPMI_SEL_RECORD_ID metadata fields are added by the daemon.
The SEL Logger daemon can be configured to watch for specific types of events and automatically log SEL records for them.
As an example, the SEL Logger has a "threshold event monitor" which implements a D-Bus match for any "PropertiesChanged" event on the xyz.openbmc_project.Sensor.Threshold
interface. The handler then checks for any new threshold events and logs SEL records accordingly.