76198a2e | 15-Jul-2021 |
Sumit Kumar <sumit_kumar@in.ibm.com> |
PEL: Set critical association to object paths
Create critical association to inventory d-bus objects. This is being done for the items in callouts that need their service indicators turned on in its
PEL: Set critical association to object paths
Create critical association to inventory d-bus objects. This is being done for the items in callouts that need their service indicators turned on in its code, and that the other association endpoint is the chasis so it can be used for health rollup.
The associations property on the xyz.openbmc_project.Association.Definitions interface will have following entry added to called out object path: ["health_rollup", "critical", "/xyz/openbmc_project/inventory/system/chassis"]
Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com> Change-Id: I50dfe4807ac9c19f54c49dfa2b9ec7119aaffb96
show more ...
|
e0538848 | 11-Jun-2021 |
William A. Kennington III <wak@google.com> |
build: Refactor to separate out library
This makes it more clear what code is intended for use by the phosphor-logging shared library. This is especially nice since it isolates the `phosphor_logging
build: Refactor to separate out library
This makes it more clear what code is intended for use by the phosphor-logging shared library. This is especially nice since it isolates the `phosphor_logging_dep` to only provide the exported headers instead of everything in the project.
Additionally, this adds an option to build only the library components of the project when the services aren't needed.
Change-Id: Ied0858fc70e8054df4c056d91f35a6f0b3acfcb1 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
593a4c66 | 16-Jun-2021 |
Vijay Lobo <vijaylobo@gmail.com> |
PEL: Support resolution property
Support resolution property to add callouts
Tested: Created new PEL using busctl and checked for the property to see if the value is updated. The error log daemon w
PEL: Support resolution property
Support resolution property to add callouts
Tested: Created new PEL using busctl and checked for the property to see if the value is updated. The error log daemon was restarted and the property is checked again to make sure the value is restored.
Verified serialization of new error log by recreating it on a old code version to make sure logs are created w/o the new property and the daemon did not crash.
Result: root@rainier:~# busctl get-property xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging/entry/1 xyz.openbmc_project.Logging.\ Entry Resolution s "1. Priority: High, Procedure: BMCSP02\n2. Priority: Medium, PN: \ SVCDOCS\n"
Test with location Code: root@p10bmc:~# busctl get-property xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging/entry/3 xyz.openbmc_project.Logging.Entry \ Resolution s "1. Location Code: U78DA.ND0.1234567-P0, Priority: Medium, PN: SVCDOCS\n2. \ Priority: Low, Procedure: BMCSP02\n"
Signed-off-by: Vijay Lobo <vijaylobo@gmail.com> Change-Id: I44eebbf794efeb8e752fff98de7c638c927982cd
show more ...
|
530efbfc | 24-Jun-2021 |
Ramesh Iyyar <rameshi1@in.ibm.com> |
PEL: Manager: Implemented the GetBMCLogIdFromPELId dbus method
In OpenPOWER based system, the application may need to get the OpenBMC event log id by using the PEL id (aka Entry ID (EID) which is a
PEL: Manager: Implemented the GetBMCLogIdFromPELId dbus method
In OpenPOWER based system, the application may need to get the OpenBMC event log id by using the PEL id (aka Entry ID (EID) which is a unique id in the PEL) so added the interface for the same.
Tested: - Tested by below unit test cases. - With valid PEL ID - With invalid PEL ID
- Tested by using busctl command - With valid PEL ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetBMCLogIdFromPELId u 1342211909 >>> u 4534 ``` - With invalid PEL ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetBMCLogIdFromPELId u 0xFFFFFFFF >>> Call failed: Invalid argument was given. ```
DBus interface: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/44421
Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com> Change-Id: Ibc67c0d1ad83457800847853e30254e2d9be53e6
show more ...
|
f4203c47 | 24-Jun-2021 |
Ramesh Iyyar <rameshi1@in.ibm.com> |
PEL: Manager: Implemented the GetPELIdFromBMCLogId dbus method
In OpenPOWER based system, the application may need to get the PEL id (aka Entry ID (EID) which is a unique id in the PEL) by using Ope
PEL: Manager: Implemented the GetPELIdFromBMCLogId dbus method
In OpenPOWER based system, the application may need to get the PEL id (aka Entry ID (EID) which is a unique id in the PEL) by using OpenBMC event log id so added the interface for the same.
Tested: - Tested by below unit test cases. - With valid OpenBMC Event Log ID - With invalid OpenBMC Event Log ID
- Tested by using busctl command - With valid OpenBMC Event Log ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetPELIdFromBMCLogId u 4534 >>> u 1342211909 ``` - With invalid OpenBMC Event Log ID ``` busctl call xyz.openbmc_project.Logging \ /xyz/openbmc_project/logging org.open_power.Logging.PEL \ GetPELIdFromBMCLogId u 0xFFFFFFFF >>> Call failed: Invalid argument was given. ```
DBus interface: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/44420
Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com> Change-Id: I60ff5b86bb82cef2c2d3ceab74c49de5b6f6f99d
show more ...
|
99f3717c | 24-Jun-2021 |
Ramesh Iyyar <rameshi1@in.ibm.com> |
PEL: Repository: Added getLogID() as public method
Currently, don't have any public method to get LogID from the Repository class so added an api "getLogID()" which can be used to get the LogID by u
PEL: Repository: Added getLogID() as public method
Currently, don't have any public method to get LogID from the Repository class so added an api "getLogID()" which can be used to get the LogID by using either OpenBMC event log id or PEL id (aka Entry ID (EID)).
Tested: - Tested by below unit test cases. - GetLogIDFoundTC - With valid PEL ID - With valid OpenBMC Event Log ID - GetLogIDNotFoundTC - With invalid PEL ID - With invalid OpenBMC Event Log ID
Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com> Change-Id: Ia621c46f67198fccd88ec5b00c32d4f65be05743
show more ...
|
1d8835bb | 07-Jun-2021 |
Sumit Kumar <sumit_kumar@in.ibm.com> |
PEL: Deleted PELs moved to new folder under logs
- PELs whose corresponding event logs have been deleted will be available in the archive folder. - Archive folder size is tracked under sizeWarn
PEL: Deleted PELs moved to new folder under logs
- PELs whose corresponding event logs have been deleted will be available in the archive folder. - Archive folder size is tracked under sizeWarning() function. - Archived PELs log can be viewed using peltool with flag --archive. - PELs deleted using peltool is not archived. - Updated README.md
Change-Id: Ie2c1b4c2ca30fb79904bc9d582a01ef8102aed0e Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
show more ...
|
0d92b528 | 16-Jun-2021 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Handle location codes for connectors
There are cases where PELs need to callout physical system connectors, such as a USB or other cable connector. This would be done by specifying the connect
PEL: Handle location codes for connectors
There are cases where PELs need to callout physical system connectors, such as a USB or other cable connector. This would be done by specifying the connector's location code in either the message registry JSON or device callout JSON. The problem is that the connector may not be modeled by the inventory, and even if it was, there would need to be a way to get the serial number, etc for the FRU that connector is on to use in the callout
Instead of forcing all connectors to be modeled in the inventory along with a copy of the SN/FN/CC from the parent FRU just to do a callout, this commit will just pop off the connector segment of the location code, a '-Tx', before trying to expand it or getting its related inventory item. That way, it will be operating on the parent FRU which would be in the inventory with its SN/FN/CC. In the case of the location code expansion, the connector segment will then just be re-appended afterwards.
This commit also makes a change to the device path callouts code to expand the location code of the callout from the device path JSON instead of trying to look it up later, which would have lost the connector portion.
Note that when a cable itself wants to be called out, there usually would need be a symbolic FRU specified saying which cable it is, along with the connector location codes. In that case, the SN/FN/CC of the parent FRU would not show up in the PEL.
Change-Id: I8e0eb58dfe630858f75e64b11ac13432bff4d2d1
show more ...
|
d354a398 | 01-Jun-2021 |
Vijay Lobo <vijaylobo@gmail.com> |
PEL: Support eventId property
Support eventId property to add SRC and the hex words to the property
Tested by creating the PEL log and to make sure that the eventId property was updated properly wi
PEL: Support eventId property
Support eventId property to add SRC and the hex words to the property
Tested by creating the PEL log and to make sure that the eventId property was updated properly with 9 words and then its present in the right format when the logging daemon is restarted
Test result: root@rainier# busctl get-property xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1 xyz.openbmc_project.Logging.Entry EventId s "BD8D1001 00000055 2E2D0010 00000000 00000000 00000000 00000000 00000000 00000000"
Also tested with old version of error log and new version with the eventId property to make sure we don't have issues in serialization
Change-Id: I8e39804cd3d47f0e321c1cf533b97bf165c07518 Signed-off-by: Vijay Lobo <vijaylobo@gmail.com>
show more ...
|
bf54cbb1 | 03-Jun-2021 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
PEL: Create TemporaryFile class
Added support for creating temporary file - Constructor creates the temporary file with data - Destructor doesn't deletes file due to PEL function related requir
PEL: Create TemporaryFile class
Added support for creating temporary file - Constructor creates the temporary file with data - Destructor doesn't deletes file due to PEL function related requirements. - Provided remove function to delete the file.
Tested: Added test cases for TemporaryFile class and verified test_openpower_pels_temporary_file OK 0.03s
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Change-Id: I5295998d746ef1228512545f0a19faa1f94260d8
show more ...
|
b6b25575 | 19-May-2021 |
William A. Kennington III <wak@google.com> |
build: Use global variables instead of macros for test features
We don't want the build to depend on recompiling objects for test separately from other executables. We can tweak settings via global
build: Use global variables instead of macros for test features
We don't want the build to depend on recompiling objects for test separately from other executables. We can tweak settings via global variables instead.
Change-Id: Ifdd078c2e381848ca1789934a36731eb8ceaf8b1 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
aeccabc4 | 19-May-2021 |
William A. Kennington III <wak@google.com> |
extensions: Deterministic global construction ordering
Right now, we have an issue where the global variables owned by extensions.cpp are not necessarily constructed before other objects try and use
extensions: Deterministic global construction ordering
Right now, we have an issue where the global variables owned by extensions.cpp are not necessarily constructed before other objects try and use them in their own global constructors. We need to gate access on functions that guarantee the object is constructed before it is used.
Change-Id: I71f88a901c21b9121a25e3ccd365d2a74a9be709 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
b41fa54b | 29-May-2021 |
William A. Kennington III <wak@google.com> |
test: openpower-pels: Fix unscoped use of DoAll
This is in the global scope on old releases of googletest but is fixed and inaccessible when tested against newer ones.
Change-Id: I139f2455bb804e1c7
test: openpower-pels: Fix unscoped use of DoAll
This is in the global scope on old releases of googletest but is fixed and inaccessible when tested against newer ones.
Change-Id: I139f2455bb804e1c711c5eec3159164d9ac138fa Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
3b8ed7f2 | 18-May-2021 |
Sumit Kumar <sumit_kumar@in.ibm.com> |
PEL: Support MfgSeverity & MfgAction flags PEL reg fields
This is specifically for manufacturing mode. Look for mfgSeverity and mfgAction flags being set in incoming PELs and if it is then check for
PEL: Support MfgSeverity & MfgAction flags PEL reg fields
This is specifically for manufacturing mode. Look for mfgSeverity and mfgAction flags being set in incoming PELs and if it is then check for dbus property for QuiesceOnHwError and if it is found then override the severity value with mfg value.
Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com> Change-Id: Icd590b0e2732df8aa9c2935078528dda8fd4f996
show more ...
|
e32b7e76 | 18-May-2021 |
Ben Tyner <ben.tyner@ibm.com> |
Add system IM keyword to PEL userdata0 section
Read the system IM keyword via dbus and add it to the PEL userdata0 section.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com> Change-Id: I6a45e0450928e49c
Add system IM keyword to PEL userdata0 section
Read the system IM keyword via dbus and add it to the PEL userdata0 section.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com> Change-Id: I6a45e0450928e49c8789cc2f93baad03cccf90c7
show more ...
|
c2b8a517 | 21-May-2021 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Change the BMC version UD label to FW version
Change the label of the version ID field in the automatically added UserData section to be 'FW Version ID' instead of 'BMC Version ID'.
While it d
PEL: Change the BMC version UD label to FW version
Change the label of the version ID field in the automatically added UserData section to be 'FW Version ID' instead of 'BMC Version ID'.
While it does describe the BMC image version, the hostboot code is also contained in the image so it also describes that version. Since this section data also goes into an ED section that hostboot makes for us to fill in within their PELs, 'BMC Version' was called out as being misleading.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6d5a3551ca2aa3ce385fdf1b374eacf3fd1e62e3
show more ...
|
ef9cc07e | 30-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: remove autotools support
We use meson everywhere now. Clean up the autotools support.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iac94c9c6e92141d8d1928c5283c8757ab2fd3257 |
d9f0d646 | 21-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: meson support for openpower-pel extensions
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4b45f71a3de4966fe3649480d4333806f201f405 |
a517197d | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: meson support for unit tests
Add support for building and running existing unit tests under meson.
Fix a few test case failures that might surface from running as non-root or without a full
build: meson support for unit tests
Add support for building and running existing unit tests under meson.
Fix a few test case failures that might surface from running as non-root or without a full OpenBMC set of applications.
Fixes: openbmc/phosphor-logging#11
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I588c0b7d8dcdc60b9a03fee0b5d373d0023b0530
show more ...
|
a1c4338e | 15-Apr-2021 |
Lei YU <yulei.sh@bytedance.com> |
rsyslog-config: Support IPv6 address
The IPv6 address requires `[]` in the config file. Add support for this format so that user could set IPv6 address on DBus, and this service will add `[]` in the
rsyslog-config: Support IPv6 address
The IPv6 address requires `[]` in the config file. Add support for this format so that user could set IPv6 address on DBus, and this service will add `[]` in the config file to make it work correctly.
Split the logic in restore() into a separate function parseConfig() so that it is easier to test.
Tested: Verify both IPv4 and IPv6 address could be set to rsyslog-config and verify it works correctly. Added several IPv6 related test cases.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I2135e3b0e916947449ab5d0cfa9669a98349226e
show more ...
|
23867bc3 | 22-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: json_utils: fix crash on invalid format string
The `getNumberString` function previously crashed if an invalid format string was passed, because it would attempt to construct a std::
openpower-pels: json_utils: fix crash on invalid format string
The `getNumberString` function previously crashed if an invalid format string was passed, because it would attempt to construct a std::string from a nullptr. There was even a test case that confirmed that the code crashed via a SIGSEGV!
AddressSanitizer, which is ran on all of our meson-based CIs, does not allow this kind of behavior. Change `getNumberString` so it throws a `std::invalid_argument` instead of crashing, which itself might result in a `std::terminate` if the exception is uncaught, but is at least acceptable behavior in the eyes of the AddressSanitizer (and mine as well).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I06d25edc2ddf552169383e03595426bb065425be
show more ...
|
7ba6544e | 22-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
test: serialization_test_properties: fix stale stack use
Fix use of stale stack variable. The previous code saved the result of `path.filename().c_str()`, but since the results of filename are a te
test: serialization_test_properties: fix stale stack use
Fix use of stale stack variable. The previous code saved the result of `path.filename().c_str()`, but since the results of filename are a temporary it and its `c_str` only exist for the lifetime of the statement and thus cannot be saved.
Make minor modification to the function to save the `filename()` portion of the path rather than the filename's `c_str`, thus extending the lifetime of the `filename()` return.
==2872441==ERROR: AddressSanitizer: stack-use-after-scope READ of size 3 at 0x7ffcb507c3d0 thread T0 ... #3 0x556b63ed4a35 in phosphor::logging::test::TestSerialization_testProperties_Test::TestBody() ../test/serialization_test_properties.cpp:27
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I17d22741686ac964beef6cc4cb131250c5e79e9b
show more ...
|
d26fa3e7 | 21-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: clean up various compile warnings
Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags of Meson.
Issue
openpower-pels: clean up various compile warnings
Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags of Meson.
Issues fixed: - many unused parameters - invalid case fall-through - excess semi-colons - incorrect 'const' on return-by-value type - removal of variable length array in test case - uncaught return from 'system' call in test case
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8af69184042cf8661d1307a02ecf3afcab4724a1
show more ...
|
6b3f345b | 15-Apr-2021 |
Vijay Lobo <vijaylobo@gmail.com> |
PEL: Support user supplied flag to indicate a fatal/terminating
User can supply SEVERITY_DETAIL=SYSTEM_TERM as part of AdditionalData entry in the event log to set the severity level in User Header
PEL: Support user supplied flag to indicate a fatal/terminating
User can supply SEVERITY_DETAIL=SYSTEM_TERM as part of AdditionalData entry in the event log to set the severity level in User Header of PEL
Tested: I ran unit test using docker. Also tested manually by setting D-bus event log
Change-Id: I9205c084c32576734c2b5b4c79c273f8defde9d4 Signed-off-by: Vijay Lobo <vijaylobo@gmail.com>
show more ...
|
ce0bdf1d | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
test: fix compile warnings under -Werror
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iae11cb541f238c8e6122afaef2186c9ea5aad0c6 |