| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Upon startup, if a remote logging config exists, relay that information
into appropriate D-Bus properties.
Change-Id: Ib873667a50f0c8a6af6a3b571f68d6075808ed10
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
Validate server IP address. Handle exceptions.
Change-Id: I6da9949dbf90dd12853afca8050b68b3aaad144e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Remote logging via rsyslog can be disabled by writing 0 to the port, or
an empty string to the address.
Change-Id: I50bce3ff008af1b9c488a09a2b36c01abbe5497d
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.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>
|
|
|
|
|
| |
Change-Id: I5d82f9d784e79fb52026e06bf7c0c771ddac96d6
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, elog-gen only support inherits from errors that have meta,
and if we inherit from an error without meta, e.g.
Common.InternalFailure, we get build error like:
KeyError: 'xyz.openbmc_project.Common.InternalFailure'
This commit makes elog-gen to allow such case, so it is possible to
allow a base error without meta, and inheriting error with additional
error, e.g.
# In Common:
- name: NotAllowed ## No meta
# In Time:
- name: NotAllowed
inherits:
- xyz.openbmc_project.Common.NotAllowed
meta:
- str: "OWNER=%s"
type: string
- str: "SYNC_METHOD=%s"
type: string
Note: the "inherit" here does not mean the the error inherits from
base errors in c++ class, it just makes error "logically" inherits base
errors. And in future commits we could make it "really" inherits base
errors in c++ level.
Tested: Verify phosphor-logging builds correctly with above example
error interfaces, and service is able to use such errors with
elog.
Change-Id: I8dccd7112881e3eb77a8f6ec62a532062348d2ef
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Please wait to commit this review until all of the code that
causes static_assert failures is committed.
Resolves openbmc/openbmc#2905
Tested: static_assert only
phosphor-logging now static_asserts that each item to be converted
by the printf-like function has integral, enum, floating_point, or
pointer type and each format argument has a type that decays to
a char * type.
Specifically, std::string fails the assertion because
its address would be logged and not the string buffer. You
probably want your strings to use s.c_str().
Note that we considered automatically applying c_str() to string
objects, but the underlying entry function is constexpr which
makes that impossible.
Change-Id: I88f6c626d58254eaad9b1a44e6a9c693d2fc6cd9
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The previous logic only called close if the file had been opened AND
there was a valid inotify watch handle. Even if there is not a watch
handle, the file should be closed.
Change-Id: Id1f6d441129e13c6a48d6156161425082aeba8e8
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I8044c620a2175626c60795c9cdadfafe0cbd0da8
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Synchronize D-Bus method was a systemd patch that calls "journalctl --sync"
and will not be upstreamed to systemd. Instead duplicate the function locally
in the log_manager so that the patch can be dropped, since the systemd journal
service would not start on time if it was idle, leading to missing metadata.
Closes openbmc/openbmc#2257
Tested: While printing continously into the journal, verify that a commit
request is blocked until the journal is flushed.
Change-Id: I8248c4c2e2eaeb041f7876832b395b053409acdd
Signed-off-by: Adriana Kobylak <anoo@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Errors reported by the phosphor-logging app have a default error level,
and this level is specified in the error's YAML definition.
Enable users of the error's report() API to specify an error level. A
user may perceive a different error level for an error scenario, for eg
there may be certain host errors (for which we set the level as 'Error')
that may just be 'Warnings'.
Change-Id: I666a0ddcb099e530c423358a3b1c65f33b0ad01e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Push down the str member to avoid linker errors about the lack of
storage for str when using -fsanitize=undefined.
Change-Id: I1a6b1ba9632aa6e4294573a6be3252d5230992b9
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
| |
Captured steps for installing application local error yamls
and generating elog-errors.hpp for local repository build
Logging REST API is captured in a README document of dbus repo.
Change-Id: I47d556372c0696f47988df769356abf71af71199
Signed-off-by: Marri Devender Rao <devenrao@in.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes openbmc/openbmc#2687
-cap on error exists to deal with small flashes, right now the cap
is 100 for high severity errors and it is 10 for info(and below)
severity) errors.
-previous policy was to stop logging new errors once cap is reached
for high severity errors.
-based on feedback from field engineers, it's better to log new
errors, external tools will typically periodically read and store
errors, so we won't lose them.so the new policy now is to roll errors.
Change-Id: I18b509d81c076fcb80667300cbfda050027bb422
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Check if the data in the persisted files is valid before
restoring the error entries
Resolves openbmc/openbmc#2646
Change-Id: Iff0846a3366a27e59484113b7020f540087aa994
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I21e0cd5a03ee06db17b8d3ed7b712b3d350b6a5f
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
| |
Change-Id: Ibda92d85a2ff789f896587ff00fb659ad8e96d54
Signed-off-by: Nagaraju Goruganti <ngorugan@in.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: Idea8f76487125a7c7334b415a369c73d9fac40c4
Signed-off-by: Gunnar Mills <gmills@us.ibm.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>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit provides a fix for an issue in which the cereal
deserialize() would crash the phosphor-log-manager incase
persistence file is empty in restore path.
Resolves openbmc/openbmc#2337
Change-Id: Id9d8c066d0dc50cba62a67060c1ee8d43d046ff1
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1561.
Change-Id: Iac5aaee1bdf9b87ccce9bf8801468ac5a8f9be6c
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
| |
dreport need PID information to collect process specific journal
for InternalFailure type error triggered dump.
Change-Id: I313caa4795f7c0d47c1f42dae0653008cdbd5967
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1617
Change-Id: I5850e5addb723e6f5102eb4677bb365285c1a633
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Call the Synchronize method at the beginning of the Commit
function to request that all pending messages are written into
the journal.
Fixes: openbmc/openbmc#1297
Change-Id: Id0ab04ff0cb9b7eeac3b7c2aaeb8730a3b4ed524
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I217403a4a94f12b692a877418b34ed6a1cf8e142
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/phosphor-logging#4
Change-Id: I15ccdef0dd63216991bbd113e47beb057df14df8
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I7d717d8ea5ccb3186bc18a4d1fea848eb7b0fdff
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
At present org.open_power.Error.Host.Event.Event is handcoded
and is not part of the error map used by log manager to identify
the type of the error.
Resolves openbmc/openbmc#1953
Change-Id: I2f390c29c9b47adcf20efc32bbb02cf026d55758
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Captured steps for generating application specific elog-errors.hpp
file.
Change-Id: I8fb7815f2fa86c52843b7eec6d562111d8179b7d
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Move serialization template functions from elog_serialize.hpp to
elog.serialize.cpp, since they are called only within the cpp.
Change-Id: I8df216e1d4a745d1386fc310fc5d4d9535a8b7c3
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1684.
Change-Id: Ia554147001e51b05fe8692ae0b39e3efaf481130
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: If2418ad9350d7f3bdbfe28a00728f431f08baf9f
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
When an error is marked resolved, serialize and persist the changed
'Resolved' property.
Change-Id: I922af84cbb826e1e43a0f0c99740868222ccb1fe
Signed-off-by: Deepak Kodihalli <dkodihal@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>
|
|
|
|
|
|
|
|
|
|
| |
Fix lookup mako template to use sdbus++ error name in error level
and error meta map.
Resolves openbmc/openbmc#1800
Change-Id: Id3bd7d8113ad0305f25a8fc321f6b79ab5033bb0
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
| |
In python3 print requires () wrapping around parameters.
Change-Id: I830ef0d0e8c9e42c1157b708153bf96599346977
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I7f19ab8a2218e826e0c7c89eee0f70de55e8a6eb
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I2e5e1add72ee4fa29ecb8e858b101bbd648aeeec
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
For logging/reporting exceptions, applications need to use exceptions
generated by using sdbus++.
For metadata, use header file generated by elog-gen script.
Change-Id: Id8f61f8692bfd694d8875359d883465c1124bedf
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
At present parser throws error if metadata yaml file is not found,
modified to not to return error.
Restruture the code to loop through the entries in the error
yaml file rather than through the meta yaml file.
Change-Id: Iaae61690201aeffd8d9caa41515b29b7cc0b59a2
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I34555ba7c4a61f8bd7fa423719429e8d990e2488
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|