summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-core
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-07-20 10:28:34 -0500
committerAndrew Geissler <andrewg@us.ibm.com>2017-07-21 10:48:26 -0500
commit191e1ff92ac841b674bd294c312dc93dd22391f8 (patch)
treed319f2100474008f1b0ef9f14080de5f373336d6 /meta-phosphor/common/recipes-core
parenta1fea2f119009663c3c3a1d34e21242520ef1e21 (diff)
downloadtalos-openbmc-191e1ff92ac841b674bd294c312dc93dd22391f8.tar.gz
talos-openbmc-191e1ff92ac841b674bd294c312dc93dd22391f8.zip
Implement new hard power off target
This target will allow the user to do an immediate power off of the system without waiting for the host. It can also be used to cause an immedate power off if the host is hung during the normal power off process. The chassis poweroff target will now require the host off target to ensure everything is properly stopped when the chassis is powered off. Change-Id: I8430d895ae5498d2e451aaf07480b0cf9550e8f2 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-core')
-rw-r--r--meta-phosphor/common/recipes-core/systemd/obmc-targets.bb7
-rw-r--r--meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-hard-poweroff@.target11
2 files changed, 15 insertions, 3 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb
index 3e217bc41..07c2d6762 100644
--- a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb
+++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb
@@ -19,7 +19,8 @@ CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on"
# - on: Services to run to power on the chassis
# - off: Services to run to power off the chassis
# - reset: Services to check chassis power state and update chassis "on" target
-CHASSIS_ACTION_TARGETS = "on off reset"
+# - hard-off: Services to force an immediate power off of the chassis
+CHASSIS_ACTION_TARGETS = "poweron poweroff powerreset hard-poweroff"
# Track all host synchronization point targets
# - start-pre: Services to run before we start host boot
@@ -42,12 +43,12 @@ HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset
HOST_ACTION_TARGETS = "start stop quiesce reset shutdown crash timeout"
CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target"
-CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target"
+CHASSIS_ACTION_FMT = "obmc-chassis-{0}@.target"
HOST_SYNCH_FMT = "obmc-host-{0}@.target"
HOST_ACTION_FMT = "obmc-host-{0}@.target"
CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target"
-CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-power{0}@{1}.target"
+CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-{0}@{1}.target"
HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target"
HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target"
FAN_LINK_FMT = "obmc-fan-control-ready@.target:obmc-fan-control-ready@{0}.target"
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-hard-poweroff@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-hard-poweroff@.target
new file mode 100644
index 000000000..6d72d8772
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-hard-poweroff@.target
@@ -0,0 +1,11 @@
+[Unit]
+Description=Chassis%i (Hard Power Off)
+Wants={SYSTEMD_DEFAULT_TARGET}
+After={SYSTEMD_DEFAULT_TARGET}
+Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+Conflicts=obmc-chassis-poweron@%i.target
+Conflicts=obmc-chassis-reset@%i.target
+Conflicts=obmc-host-shutdown@%i.target
+Conflicts=xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
+RefuseManualStop=yes
OpenPOWER on IntegriCloud