Add power fault check to checkstop handler
If a power fault is being reported during a
checkstop condition we will not call the
analyzer.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: I9813a55b80eb1b94c6ad2d5cddb2e56b1daa67f4
diff --git a/attn/attn_handler.cpp b/attn/attn_handler.cpp
index 3252078..a0e428e 100644
--- a/attn/attn_handler.cpp
+++ b/attn/attn_handler.cpp
@@ -33,7 +33,6 @@
namespace attn
{
-
/**
* @brief Handle checkstop attention
*
@@ -247,23 +246,25 @@
}
else
{
- // wait for power fault handling before starting analyses
+ // check for power fault before starting analyses
sleepSeconds(POWER_FAULT_WAIT);
-
- // Look for any attentions found in hardware. This will generate and
- // commit a PEL if any errors are found.
- DumpParameters dumpParameters;
- auto logid = analyzer::analyzeHardware(
- analyzer::AnalysisType::SYSTEM_CHECKSTOP, dumpParameters);
- if (0 == logid)
+ if (!util::dbus::powerFault())
{
- // A PEL should exist for a checkstop attention.
- rc = RC_ANALYZER_ERROR;
- }
- else
- {
- requestDump(logid, dumpParameters);
- util::dbus::transitionHost(util::dbus::HostState::Quiesce);
+ // Look for any attentions found in hardware. This will generate and
+ // commit a PEL if any errors are found.
+ DumpParameters dumpParameters;
+ auto logid = analyzer::analyzeHardware(
+ analyzer::AnalysisType::SYSTEM_CHECKSTOP, dumpParameters);
+ if (0 == logid)
+ {
+ // A PEL should exist for a checkstop attention.
+ rc = RC_ANALYZER_ERROR;
+ }
+ else
+ {
+ requestDump(logid, dumpParameters);
+ util::dbus::transitionHost(util::dbus::HostState::Quiesce);
+ }
}
}