summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2020-12-10 01:03:36 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-12-17 06:07:56 +0300
commit284d56bb877be545f59cf10883d28a37f306fc5b (patch)
tree3005f8f0529ebe87c29ec3e22ef5c475d7334f82
parentf441dba2f686a182af7014983c3d066fa2115a00 (diff)
downloadopenbmc-284d56bb877be545f59cf10883d28a37f306fc5b.tar.xz
run soft off in quiesce
When the obmc-host-quiesce@.target was initially created the idea was to leave the system in the state it was in. In most cases the host had crashed. As OpenBMC has grown, the use cases for the quiesce target have grown. For example the Quiesce On Hardware Error design: https://github.com/openbmc/docs/blob/master/designs/fail-boot-on-hw-error.md When the QuiesceOnHwError setting is enabled, the host will be put in a Quiesce state to indicate that an error has occurred. In a lot of cases though the host actually can (and does) continue to boot. This causes a lot of confusion for the user (host state shows Quiesce but host is still booting). This commit adds the pldmSoftPowerOff.service to the quiesce target to ensure the host is given a chance (if it's running) to gracefully shut itself down. If the host does not respond then the soft off service will follow it's timeout flow and exit without error. Tested: - Verified when quiesce error is injected that the PLDM soft off service was called (From meta-phosphor rev: dfa2d6beb496b2265402950caf524c7f79850c46) Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ie6d07011a5ac5f6964435364ff6e332a77e5a3d4 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
-rw-r--r--meta-phosphor/recipes-phosphor/pldm/pldm_git.bb8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/pldm/pldm_git.bb b/meta-phosphor/recipes-phosphor/pldm/pldm_git.bb
index 1c07ad59d..e6ac942bd 100644
--- a/meta-phosphor/recipes-phosphor/pldm/pldm_git.bb
+++ b/meta-phosphor/recipes-phosphor/pldm/pldm_git.bb
@@ -32,6 +32,11 @@ pkg_postinst_${PN} () {
TARGET="../pldmSoftPowerOff.service"
ln -s $TARGET $LINK
+ mkdir -p $D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants
+ LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/pldmSoftPowerOff.service"
+ TARGET="../pldmSoftPowerOff.service"
+ ln -s $TARGET $LINK
+
mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires
LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/pldmSoftPowerOff.service"
TARGET="../pldmSoftPowerOff.service"
@@ -43,6 +48,9 @@ pkg_prerm_${PN} () {
LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/pldmSoftPowerOff.service"
rm $LINK
+ LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/pldmSoftPowerOff.service"
+ rm $LINK
+
LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/pldmSoftPowerOff.service"
rm $LINK
}