| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the org.open_power.Logging.PEL D-Bus interface on
/xyz/openbmc_project/logging.
It provides the following methods:
* getPEL - Return a unix FD to the PEL data based on the PEL id.
* getPELFromOBMCID - Return PEL data in a vector based on the
corresponding OpenBMC event log id.
* hostAck - Called when the host has sent the PEL up to the OS,
which is the final step in the reporting process.
* hostReject - Called when the host has an issue with a PEL, either:
- The host doesn't have any more room for PELs at this moment.
- The PEL was malformed.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I633ae9e26d8336973363a1a207e8fd493f7ff7d2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create the PLDMInterface class and pass it into the constructor
of the Manager class. This is done at this level so that it
can be easily mocked for testing.
Add a --enable-dont-send-pels-to-host configure option for systems
that don't need PELs sent to the host. If this is set, then don't
create and pass in the PLDMInterface class, and then the Manager
class won't create a HostNotifier class to do the sending.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I34059470ee117e65c5c02b684a9d916571135bfd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Derive a PLDMInterface class from the HostInterface class to implement
sending the 'new file available' PLDM command to notify the host of the
ID and size of PELs.
The command response is received asynchronously by watching for activity
on the MCTP file descriptor that was used for the command. If a
response isn't received in 10 seconds, it will be considered a failure.
Both on response success and failure the class will call the registered
callback function and pass it the result.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ica00da590628cc81114a48e2831a436dc2115269
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).
It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.
This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.
The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.
Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.
"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},
"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},
"User Data": {
"Data": "This is a string"
}
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The message registry is a JSON file that holds data required to create a
PEL out of an OpenBMC event log. It includes fields like 'subsystem',
'event type', 'action flags', 'SRC reason code', etc.
Many fields in the message registry are optional, and a very minimal
entry make look like:
{
"Name": "xyz.openbmc_project.Power.Error.Fault",
"Subsystem": "power_supply",
"ActionFlags": ["service_action", "report"],
"SRC":
{
"ReasonCode": "0x2030"
}
}
This commit adds support to look up a message registry entry based on an
OpenBMC event log's 'Message' property (i.e.
xyz.openbmc_project.Power.Error.Fault) and then fill in a structure with
the fields found. Future commits will fill in the SRC related fields,
as well as actually create the PEL.
The message registry file can be found on the BMC at:
/usr/share/phosphor-logging/pels/message_registry.json.
For testing, users can put their own message_registry.json in
/etc/phosphor-logging, and that will take precedence.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ie4195ed7e58ab6a231271f6b295e63b1d0a4cd78
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create generatePELID() to return a unique 4B PEL ID every time it is
called. It will start at a base value, and then increment by 1 each
time. It uses a file to save the next value to use.
This will be used by the PEL handling code to create unique values
for the error log ID field in the Private Header section.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I841a8dcc5dc48e2b663004be3dccfb114ba366f2
|
|
|
|
|
|
|
|
| |
Start using the sdeventplus event mechanisms so that future code
can take advantage of it for things like timers and other events.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6ffe80266257bfd3512a5b848c47f5ccfb5206e8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal of extensions is to extend phosphor-logging's
`xyz.openbmc_project.Logging.Entry` log support to allow other log
formats to be created without incurring extra D-Bus call overhead.
The README.md change in this commit provides additional documentation on
how extensions work. The summary is that they allow code that resides
in this repository to provide functions that can be called at certain
points (startup, log creation/deletion) such that the code can then
create their own logs based on the contents of an OpenBMC log. A
specific extension's code is compiled in using a --enable configure
option, so platforms that did not use those log formats would incur no
performance/size penalties.
This commit provides the support for extensions, plus a basic OpenPower
PEL (Platform Event Log) extension as the first extension. PELs are
event logs used only on some OpenPower systems.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ifbb31325261c157678c29bbebc7f6d32d282582f
|
|
|
|
|
|
|
|
| |
Use the defaults in the pkg check where the default error message is
sufficient to identify which package is missing.
Change-Id: If99dcef3cfe918a7d0926cf4fa1eb34f1b619f03
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Update configure.ac to choose the c++17 standard
Change-Id: Ie34c3148c7f24f3b85931644da14bba93631d74a
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The application implements the xyz.openbmc_project.Network.Client D-Bus
interface to set a remote rsyslog server's address and port in the
rsyslog config file.
This lets us configure rsyslog to be able to stream out logs.
TODO: Exception handling and validation will be handled in subsequent
commits.
Change-Id: I8917daab3f0de1806d2f1aafe99cb3a872f19184
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
-Add unit tests for error wrapping
Change-Id: Ib15620d84de8ab5abdc85b8f88dd7c05f83fd6f3
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the xyz.openbmc_project.Software.Version interface to
the elog entries. This allows a user to know what BMC code
level was running when the error was created. The level is
persisted along with the other elog fields.
If this code is flashed on a system that was running older code,
and there were existing error logs, the version property will
be left empty in the restored log entries.
Older code is still able to restore logs created by this code
as the version property is at the end of the serialized data
and so is just ignored by Cereal.
Resolves openbmc/openbmc#3133
Tested: Check that new error logs have the code level, and that
restarting phosphor-log-manager preserves that property
on the existing logs. Various incantations of running
the older code with logs created by this code, and running
this code with logs created by older code.
Change-Id: I682aa3bf97c8352ce6dda05dfdf55d33173de891
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Read the BMC code version once at startup. This will
be added to error logs in future commits.
The code is getting the version from a file instead
of from D-Bus in order to reduce dependencies.
Tested: Call the function and check that it returned the
correct thing.
Change-Id: I9a4729e946a130ec32c375c283fd22a7658121f5
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.
Change-Id: Ic91925be70a9577aaf746223320ab704acb9c3aa
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Utilization of the persistent filesystem in BMC has shown
that there is room to double the number of error logs
allowed on BMC systems. This increased size will assist
in debugging of intermittent issues that occur over time.
Change-Id: I81d5ff4ed42822b6a37779b5d190ad405df1a87d
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Added new Cap for info(and below) severity errors, if cap size reaches,
next commited error of severity:info(and below) will replace the first
entry of severity:info(and below).
Resolves openbmc/openbmc#2381
Change-Id: I2e56c28a934bf3139e57b36d252bd5ad3e1dd90f
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of the CI build noticed elog parser and mako script are not
exported becuse of conditional check in the Makefile.
Removed conditional check so that files are exported all the time.
Conditional check works for bitbake build as the conditional value
is set for native recipe build.
Change-Id: I65a020757b7176e299af70a8ba9a647b415891be
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I2dc3f5e7c3d104f5d9152b7c44f77068a162e94a
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Installed elog parser and mako scripts are used by repositories
to build elog-errors.hpp for local application specific errors
Change-Id: I2353185d28db59b052d2167d6f37f1b385978bb3
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Cereal class versioning helps to handle data de-serialization
across different class versions that differ in the way, a
particular data is serialized.
Change-Id: Ica01c4cb0c213e0dca8824fcfcfaa5cb43c5bc2e
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1617
Change-Id: I5850e5addb723e6f5102eb4677bb365285c1a633
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use Cereal to implement serialization and de-serialization of
properties of error d-bus objects.
Serialize and persist error d-bus objects as they are put on the bus.
De-serialize and restore them (if persistent ones exist) when
phosphor-log-manager starts up.
Change-Id: I1f5df1abbe74bfdb86e3e82a78ff7115e90e2112
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Error metadata handlers are compiled based on a specific compile flag
(-DPROCESS_META), which in turn is set if a configure flag is enabled
(--enable-metadata-processing).
Change-Id: I77319f38cfd219bb831f9a3ee731441211e7bb9b
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Implement handler of the metadata CALLOUT_DEVICE_PATH. This handler will
convert a device path to an inventory path and call out the latter.
Change-Id: Icbf9c841884ec139f35ea2ac94648e355b421bb2
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The callout mappings are generated at build time by a script,
which needs an input YAML file. This change enables providing such a
YAML file by the phosphor-logging recipe.
Change-Id: I8e174d60e37eabb6d26ff7822ab5c9f38d35e0a6
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a config variable that can be passed via a recipe to
point the parser to a directory where the error yaml files are.
Rename elog-gen.hpp to elog-errors.hpp, which better matches the
exception error log file names.
Include elog-gen.hpp in elog.hpp so that callers that need to
create and commit error logs only need to include one header file.
Change-Id: Ie3cd65ac761c1f7b2c99c50a2273859283a5ab4b
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Auto-generate the Manager code during build time
using the sdbus++ tool.
Closes: openbmc/phosphor-logging#1
Change-Id: Idb66725dc2b3a919981dc1a0acfebfde16c4420f
Signed-off-by: Adriana Kobylak <anoo@linux.vnet.ibm.com>
|
|
|
|
|
|
|
| |
Per design direction, all dbus object paths should be lower-case.
Change-Id: I444e981a91b5269b6af3642d5771a64324acfd7c
Signed-off-by: Adriana Kobylak <anoo@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ObjectManager needs to be added to the top most
path of the dbus objects that it manages, so need to
initialize it with Logging/ and it'd manage the
Logging/Internal/ and Logging/Entry/ objects.
Fixes openbmc/openbmc#1170.
Change-Id: Ie659a2deaed2967ebca326a86b2e7fd7e637f784
Signed-off-by: Adriana Kobylak <anoo@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Provide a pkg-config for clients using our headers.
Partially resolves openbmc/openbmc#1106
Change-Id: I185da26a0034b4bb315d2b279c776eea87c14a82
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Link to libphosphor_dbus.so so that the Entry
code is auto-generated.
Change-Id: I845d083456a1094a49f773b3ec64240d4515b3ac
Signed-off-by: Adriana Kobylak <anoo@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
| |
Implement the generated code to create an error/event
entry dbus object.
Change-Id: I881636fe3e8de680d9a15fff1fe933d5e22eed06
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Add the lookup mako target to the makefile to get it built.
Use the lookup map to find the metadata that needs to be
added to the error log. Use the transaction id to filter
for the desired journal entries.
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Change-Id: Ia57dc83aab4f7ee35f8de32a799c862be28113f7
|
|
|
|
|
|
|
|
|
| |
For each journal entry, add the transaction id for the process
that called the log interface. This will be used to identify all
the journal entries associated with a dbus message.
Change-Id: Id934253bd77a517315e6cdba01a8ac819ad95b52
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I414c2842840b0d623966f92b3a79d3223b52b299
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I9431b7d3df37fe92adaa9acb5172c8cfcdb38e4e
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Id2ad6a75b6ee3f7226c7cfd274dba24de89f9363
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I5c5f7a550a8f272251893ff616408c41d32281f9
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
Framework to create an error log entry based on information
from the journal log.
1. elog.yaml - User defined reason codes for error scenarios that
include description, priority level, and desired metadata fields.
2. elog_parser.py - Parser for the yaml file
3. elog-gen.hpp - Auto-generated file based created by the parser
that includes the error log structures. Including for now for ref.
4. elog.hpp - Error log template to create (log a journal log
entry with the predefined error log information).
Usage: elog<RC>(NAME(value), prev_entry<NAME>()...)
where RC - Reason code, NAME - metadata name
being logged to a journal entry, prev_entry - A Metadata entry that
has previously being logged to a journal entry.
Example:
log<level::DEBUG>(
msg("Info trace to log filename"),
entry(file_not_found::file_name::str, my_filename));
elog<file_not_found>(file_not_found::errnum(2),
file_not_found::file_path("/tmp/"),
prev_entry<file_not_found::file_name>());
Change-Id: Ic51cee80b58e341c071c366c5e2146fd6694012c
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|