pseq: Create dump on runtime pgood failure
Currently no dump is created when a power good failure occurs at
runtime. Add the call to create a dump.
Signed-off-by: Jim Wright <jlwright@us.ibm.com>
Change-Id: I1effbf13f0b2fd234deea96171efa289f9fa2380
diff --git a/phosphor-power-sequencer/src/power_control.cpp b/phosphor-power-sequencer/src/power_control.cpp
index 78a1d74..eac5ba4 100644
--- a/phosphor-power-sequencer/src/power_control.cpp
+++ b/phosphor-power-sequencer/src/power_control.cpp
@@ -155,7 +155,9 @@
const auto now = std::chrono::steady_clock::now();
if (now > pgoodTimeoutTime)
{
- log<level::ERR>("ERROR PowerControl: Pgood poll timeout");
+ log<level::ERR>(
+ fmt::format("Power state transition timeout, state: {}", state)
+ .c_str());
inStateTransition = false;
if (state)
@@ -203,11 +205,11 @@
else if (!inStateTransition && (pgoodState == 0) && !failureFound)
{
// Not in power off state, not changing state, and power good is off
+ log<level::ERR>("Chassis pgood failure");
device->onFailure(false, powerSupplyError);
failureFound = true;
- // Power good has failed, call for chassis hard power off
- log<level::ERR>("Chassis pgood failure");
+ // Power good has failed, call for chassis hard power off
auto method =
bus.new_method_call(util::SYSTEMD_SERVICE, util::SYSTEMD_ROOT,
util::SYSTEMD_INTERFACE, "StartUnit");