generate bmc dump on monitored systemd target fail
To really be sure a target failure can be debugged, a BMC dump is
needed.
There is a chance that whatever caused the target to fail, already
generated a bmc dump but there is no way to be certain. Two dumps is
better then no dump.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I3a7def2a1745bd07ccb42b3e89937f3256acdd2d
diff --git a/systemd_target_signal.cpp b/systemd_target_signal.cpp
index 88b1aad..5bf40af 100644
--- a/systemd_target_signal.cpp
+++ b/systemd_target_signal.cpp
@@ -102,6 +102,9 @@
info(
"Monitored systemd unit has hit an error, unit:{UNIT}, result:{RESULT}",
"UNIT", unit, "RESULT", result);
+
+ // Generate a BMC dump when a monitored target fails
+ createBmcDump();
return (targetEntry->second.errorToLog);
}
}