| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Added new commit method that accepts an sdbusplus exception
Deprecate commit which accepts an exception name
Change-Id: I9b5c91eb13466eb576c329ebb7fd00ce33f7dd9f
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Have the entry object store a reference to the error manager, passed via
the entry ctor.
Change-Id: I2c4a8c4c95929ab7005620f44ac17e9654d8e906
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Implement xyz.openbmc_project.Object.Delete to delete an entry object.
Resolves openbmc/openbmc#1327.
Change-Id: I265c26fb9434d0d4cb066fbfa85729782318bd8f
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
The erase method can erase an entry object specified by id.
Change-Id: I86bb2a214b8cf9b951af37f69767ff025f2f5fd0
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
When an error is marked resolved, delete error associations, if any.
When an error is marked un-resolved, re-create error associations, if
there were any.
Change-Id: I49acd2b6f01810e3b19e3fddbc716eb539fc20c0
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Store a copy of the entry object's associations, in case we need to
recreate them, for example when marking an error as unresolved.
Change-Id: I50001365211325505ed3a72b19a46b1438cc9731
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
Set the 'Resolved' property of an error as 'false' by default.
Change-Id: I0618e1f6ca2f74ce3d06aef9572becfcd78d9b60
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>
|
|
|
|
|
|
|
| |
Partial fix for openbmc/openbmc#1112.
Change-Id: Id01fdae36576d99d90775e4c2f6443b87c1198ee
Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
|
|
|
|
|
|
|
| |
Add a comment to describe the PROCESS_META compile flag.
Change-Id: I9dc652fd2f3f7b595177112114b53a650c514772
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I15c18d8e241226b1e9fcbf9c36c703b47b488ce5
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Errors will be created by using the sdbusplus error types, which results
in an sdbusplus exception being thrown.
Error metadata can be verified at compile-time by checking the error
against phosphor-logging error types. This commit maps the sdbusplus
error type to the phosphor type, for this purpose, via template
specializations.
Change-Id: Iee37e2a3846cc3acf3a62270a520ff0c395fd36d
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>
|
|
|
|
|
| |
Change-Id: I5171d013f994a3b40f8c8640d4af99d534ffcf71
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Add test program which can create callouts based on an input device
path. It creates an error, with callouts, with name TestCallout.
Change-Id: I96b66b73ae4a9c00daff06222841a13747c07408
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set generated maps to be const so that they don't get
accidentally overwritten.
Use .find() to access these generated data sets as the [] operator
is not const.
Declare the generated maps as extern so that there's
no need to include the generated .cpp file.
Change-Id: I4efdcace099bec738e1fa9b67decbedd515d3dfa
Signed-off-by: Adriana Kobylak <anoo@us.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 script that can generate callout mappings. The script needs an
input YAML to denote callout mappings. Add an example YAML.
Change-Id: I7b49fe4c586bf7abfed2865cfd776de4d5745ef5
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
YAML is of the form:
<sysfs device path>: <inventory path to be called out>
This will help generate code to map device paths to inventory objects.
Change-Id: I5613e766d0c6b39d9b2c4a6146a747ab321555cb
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Add method to parse out the metadata name and value from the error
metadata, which is of the format "name=value".
Change-Id: I7b6ba790c97faced664a11eb5806f7f87e8166a7
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Check if error metadata fields have associated handlers, if yes, invoke
them before construction the error d-bus object.
Change-Id: I197385c5c43242f633274b82289cd70c85c1d6e7
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
Add rules to generate and build elog-process-metadata.cpp.
Change-Id: If9b61dfd2fbd731708e41a48428115ee40b12d6b
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Specialize metadata handler function template to depict implementation
of this interface.
Change-Id: I398db9c0bf1e0649ce7745d67f3345263ef1abcd
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Add a new mako template to aid elog-gen.py to generate code for handling
the metadata 'process' keyword.
Change-Id: I720ac1e30cf566f5a6bfe090faec6da9742f7423
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
A metadata field found in the journal corresponding to an error could be
special in the sense that it may require building specific error
association objects. Add an interface to build such associations.
Take advantage of the fact that every metadata has a corresponding type
defined.
Change-Id: I09e446879667044c009141443fc0dc6fed8a8b18
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An error metadata field that has the 'process' keyword set to true is
an indication that this metadata will have some associated action that
will take place after this metadata (and associated error) is logged to
the journal and before the associated error is committed.
The associated action will have to be implemented when adding the
'process' keyword.
Add 'process' keyword to an example error definition.
Change-Id: I42ab3fa230479000a88a18046548242c0043ac86
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Pass a list of associations to the Entry ctor. This enables to create
associations between the error object and other objects, if such
associations exist.
Change-Id: I88a517efc0ead0a62b2e6558822d94b8fc1c6070
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Have the Entry object implement the org.openbmc.Associations DBus API in
order to add inventory callouts to errors.
Change-Id: I9c645c90e3de4601cdbb020b591f5da24c733613
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Generate sdbusplus server bindings for the org.openbmc.Associations
interface.
Add YAML file that describes the org.openbmc.Associations interface.
Change-Id: Ic72e372ec817a49f4e6f5305b693173d90ee5e24
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I65894c7acfa75f4601f43de2595e0f1fda89c0bb
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This tool adds an option to the logging-test
to inject an error as specified by command
line.
Change-Id: I1028bd3964db23ed5ffa50414f7a6cc2f880c40c
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
|
|
|
|
|
|
|
| |
Include inherited metadata in the code generated for metadata lookup.
Change-Id: I9389eb08b0c74c94a377f7434ee358965c2fdf2b
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Remove the addition of the extra "namespace Error" while generating
error full names, as the error full name doesn't have the extra "Error".
This extra namespace addition was being done to match up sdbusplus error
binding generation, but this will have to be re-looked at.
Change-Id: Ib99ce8e3a09dd76a23b8cc6fe7e706551a1699d6
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
An error may just want to inherit metadata from another error, without
adding metadata of it's own. In such a case, the metadata file won't
have the "meta" keyword, although it will have the "inherits" keyword.
Accept metadata files that don't have the "meta" keyword.
Change-Id: I4e30e035f19d6af8e0e1f654465d109fe5284a1b
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
journald does not guarantee that sd_journal_get() returns NULL terminated
strings. Specify the actual length of the string (instead of relying on
functions that look for NULL terminators to determine the length) to
compare the transaction id number, otherwise intermittent errors can occur.
Change-Id: I58c34f377866f002a09b07810065b4e064f216b9
Closes: openbmc/openbmc#1217
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently the code would search for a matching string in the whole
TRANSACTION_ID=1234 string, but there may cases that this could
result in a false match.
Change to extract the id number out of the string to do an exact compare.
Change-Id: I2cc0e6b42937a36e9afb942c07c91c0b4469a963
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the phosphor-logging exception name is for example
Device for an error file located in xyz/openbmc_project/Error/Callout/.
It should instead be named xyz.openbmc_project.Error.Callout.Device
following the naming structure of the sdbusplus++ tool
to differentiate it from other Device error exceptions.
With the full name, the namespaces can be determined, so there's no
need to pass the namespace parameter to the template that generates
the elog-errors.hpp. As with the name, follow the namespace
structure of the sdbusplus exception object.
Closes openbmc/phosphor-logging#2
Change-Id: I960d759d90aa18fd43211034ebd6009859113ee7
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Replace nodist_include_HEADERS with nobase_nodist_include_HEADERS
so that the header files retain their directory structure.
Without it, phosphor-logging/elog-errors.hpp for example installs
in usr/include/ instead of usr/include/phosphor-logging/.
Change-Id: Ib2df7d93fd191316f03e4636ee453030d5a318f4
Signed-off-by: Adriana Kobylak <anoo@us.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>
|
|
|
|
|
|
|
|
|
|
|
| |
Change the logic of the commit function from searching
the journal for each metadata variable, to looking
for all metadata variables in each journal entry.
This change reduces the number of times that we search
through the journal from N to 1 time.
Change-Id: I47143e746dafb06bdce25dfd0009933494f4d25d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Some error yaml files in the phosphor-dbus-interfaces repo do not
specify the error log severity. Default this value to INFO.
Change-Id: Ifd335ba7d5e3e8238365036a2bfa7a199e014cfc
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Namespaces should be determined by the directory tree where the
yaml files are located.
Change-Id: I82729728b6aebf4c48a0ec967f2d08c1cbf8b7f3
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Add an additional argument to pass the directory where the unit
test yaml files are located. Default the base directory to None
as this argument will be passed by the recipe during build time.
Change-Id: I1276d74e383e1517595371c3f6e31fa077eac43f
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Add ability for elog-gen.py to find yaml files under subdirectories
so that yaml files found in Error/Callout/ and Error/IIC/ for
example can be found by the caller just passing the Error/ directory.
Change-Id: I91dcd523d2a75deea6266a3ea6885b88cd788206
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Note: The header files have been moved to the
phosphor-logging dir and all other repositories must
include the header files from there.
Resolves openbmc/openbmc#938
Change-Id: I0faf0545a42c571da93fe4f3731ee7c939e3aff8
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Ic75d30d88d74cd8a7ff85a4a526c85aa20b373a9
Signed-off-by: Deepak Kodihalli <dkodihal@in.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>
|
|
|
|
|
|
|
|
| |
Fix the TODO to search for all the metadata variables in
the journal.
Change-Id: I62e01e5923b3d29317ef94b5b340153bbb8967a7
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the code that writes data to a tmp file. The error log
entry will be saved via dbus property caching openbmc/openbmc#1055
Remove the code that gets the MESSAGE field from the journal,
the error log entry doesn't have a use for it as it uses the
exception name.
Change-Id: Ie400acadc4a34f0d558808af47b41795f0ce8e2c
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|