From c3f1bebfe11365df3c264d63e036484ed7cc3ebe Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Wed, 9 Dec 2020 15:05:02 -0600 Subject: stop instruction 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 op-stop-instructions.service to the quiesce target to ensure the host is actually stopped when quiesce is entered. Tested: - Disabled AutoReboot and turned on QuiesceOnHwError. Verified when an error which triggers QuiesceOnHwError was injected, the host state went to Quiesce and the host was stopped via the stop instructions. (From meta-openpower rev: ff3e548479bdf4c9db4315f45f1599a4f9adc33f) Signed-off-by: Andrew Geissler Change-Id: If5cbdd03fbb3abcad8942e5ebe4e7b347ecfd599 Signed-off-by: Andrew Geissler --- .../recipes-phosphor/host/op-proc-control-systemd-links.bb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'meta-openpower/recipes-phosphor/host') diff --git a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb index 26e42e2f9..f493d3aae 100644 --- a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb +++ b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb @@ -17,11 +17,16 @@ pkg_postinst_${PN}() { mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.requires mkdir -p $D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires + mkdir -p $D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/op-stop-instructions@0.service" TARGET="../op-stop-instructions@.service" ln -s $TARGET $LINK + LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/op-stop-instructions@0.service" + TARGET="../op-stop-instructions@.service" + ln -s $TARGET $LINK + LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/op-cfam-reset.service" TARGET="../op-cfam-reset.service" ln -s $TARGET $LINK -- cgit v1.2.3