summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/manager.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-12-18 14:02:09 -0600
committerMatt Spinler <spinler@us.ibm.com>2020-02-14 19:15:42 +0000
commit05c2c6c4f7b8904f27ae10af39b63b53dc2c3136 (patch)
treed771c9f1819b0986a77e8b3ff44590391525cca9 /extensions/openpower-pels/manager.cpp
parentf682b40dcde8badb7029a063e299e1bdf1501444 (diff)
downloadphosphor-logging-05c2c6c4f7b8904f27ae10af39b63b53dc2c3136.tar.gz
phosphor-logging-05c2c6c4f7b8904f27ae10af39b63b53dc2c3136.zip
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 <spinler@us.ibm.com> Change-Id: Ibd52921b5d6020f98b457b9ee0b3bb4f0b95e707
Diffstat (limited to 'extensions/openpower-pels/manager.cpp')
-rw-r--r--extensions/openpower-pels/manager.cpp17
1 files changed, 11 insertions, 6 deletions
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 <unistd.h>
@@ -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);
}
}
OpenPOWER on IntegriCloud