From 05c2c6c4f7b8904f27ae10af39b63b53dc2c3136 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Wed, 18 Dec 2019 14:02:09 -0600 Subject: PEL: Create error log for 'bad PEL' Create an event log (and a PEL) for the case when the host rejects a PEL because it is malformed. This requires a new message registry entry for the error. Signed-off-by: Matt Spinler Change-Id: Ibd52921b5d6020f98b457b9ee0b3bb4f0b95e707 --- extensions/openpower-pels/manager.cpp | 17 ++++++++----- .../openpower-pels/registry/message_registry.json | 28 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) (limited to 'extensions') diff --git a/extensions/openpower-pels/manager.cpp b/extensions/openpower-pels/manager.cpp index a00da37..40501a5 100644 --- a/extensions/openpower-pels/manager.cpp +++ b/extensions/openpower-pels/manager.cpp @@ -16,6 +16,7 @@ #include "manager.hpp" #include "additional_data.hpp" +#include "json_utils.hpp" #include "pel.hpp" #include @@ -250,16 +251,20 @@ void Manager::hostReject(uint32_t pelID, RejectionReason reason) throw common_error::InvalidArgument(); } - if (_hostNotifier) + if (reason == RejectionReason::BadPEL) { - if (reason == RejectionReason::BadPEL) + AdditionalData data; + data.add("BAD_ID", getNumberString("0x%08X", pelID)); + _eventLogger.log("org.open_power.Logging.Error.SentBadPELToHost", + Entry::Level::Informational, data); + if (_hostNotifier) { _hostNotifier->setBadPEL(pelID); } - else if (reason == RejectionReason::HostFull) - { - _hostNotifier->setHostFull(pelID); - } + } + else if ((reason == RejectionReason::HostFull) && _hostNotifier) + { + _hostNotifier->setHostFull(pelID); } } diff --git a/extensions/openpower-pels/registry/message_registry.json b/extensions/openpower-pels/registry/message_registry.json index 7e278e3..6b4ab45 100644 --- a/extensions/openpower-pels/registry/message_registry.json +++ b/extensions/openpower-pels/registry/message_registry.json @@ -132,6 +132,34 @@ "Description": "The server's CA certificate has not been provided", "Message": "The server's CA certificate has not been provided" } + }, + + { + "Name": "org.open_power.Logging.Error.SentBadPELToHost", + "Subsystem": "bmc_firmware", + "Severity": "non_error", + + "SRC": + { + "ReasonCode": "0x2001", + "Words6To9": + { + "6": + { + "Description": "The bad PEL ID", + "AdditionalDataPropSource": "BAD_ID" + } + } + }, + + "Documentation": + { + "Description": "The BMC sent the host a malformed PEL", + "Message": "The BMC sent the host a malformed PEL", + "Notes": [ + "The host firmware rejected that PEL." + ] + } } ] } -- cgit v1.2.1