summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-core
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-03-23 12:48:06 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-04-07 17:46:10 +0000
commit238f3a78a059b7307525cbd60e1bc764ef2bb429 (patch)
treefdbbef1ff3eb23b2c79024a586df836d09948df7 /meta-phosphor/common/recipes-core
parent08d3acf7f04a9b51adc58f636170a8fbbf6a3383 (diff)
downloadtalos-openbmc-238f3a78a059b7307525cbd60e1bc764ef2bb429.tar.gz
talos-openbmc-238f3a78a059b7307525cbd60e1bc764ef2bb429.zip
Add in new targets to handle bmc resets while host running
The point of this new target is to support getting the systemd targets which boot the host into the running state (without actually running the associated services) when the BMC is rebooted and the host is up and running. This will ensure that systemd and its targets match with the state of the system without affecting the running host. This commit will run the new target but nothing will happen yet due to the discovery service being a noop. Once the application is in for the service to call, it will be added to the service which will enable this new host running with bmc reset support. Change-Id: Ia29e53de58ea7530941341b0e515e4d8fa49be6c 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.bb11
-rw-r--r--meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset-running@.target5
-rw-r--r--meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset@.target7
3 files changed, 22 insertions, 1 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb
index 6f83a9ed3..1cca3662a 100644
--- a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb
+++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb
@@ -34,19 +34,25 @@ CHASSIS_POWER_TARGETS_2 = "reset"
# - start: Services to run to do the host boot
# - started: Services to run once the host is booted
# - stop-pre,stop,stopped: Same as above but applied to shutting down the host
-HOST_SYNCH_TARGETS = "start-pre start started stop-pre stop stopped"
+# - reset-running: Services to check if host is running after bmc reset
+HOST_SYNCH_TARGETS = "start-pre start started stop-pre stop stopped reset-running"
# Track all host action targets
# - stop: Services to run to shutdown the host
# - quiesce: Target to enter on host boot failure
HOST_ACTION_TARGETS = "stop quiesce"
+# TODO: openbmc/openbmc#1205 - Move this to standard host action targets
+# - reset: Check host state and update host "start" target if host running
+HOST_ACTION_TARGETS_2 = "reset"
+
CHASSIS_FMT = "obmc-chassis-{0}@.target"
SYNCH_POWER_FMT = "obmc-power-{0}@.target"
CHASSIS_POWER_FMT = "obmc-power-chassis-{0}@.target"
CHASSIS_POWER_FMT_2 = "obmc-chassis-{0}@.target"
HOST_SYNCH_FMT = "obmc-host-{0}@.target"
HOST_ACTION_FMT = "obmc-{0}-host@.target"
+HOST_ACTION_FMT_2 = "obmc-host-{0}@.target"
CHASSIS_LINK_FMT = "${CHASSIS_FMT}:obmc-chassis-{0}@{1}.target"
SYNCH_POWER_LINK_FMT = "${SYNCH_POWER_FMT}:obmc-power-{0}@{1}.target"
@@ -54,6 +60,7 @@ CHASSIS_POWER_LINK_FMT = "${CHASSIS_POWER_FMT}:obmc-power-chassis-{0}@{1}.target
CHASSIS_POWER_LINK_FMT_2 = "${CHASSIS_POWER_FMT_2}: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-{0}-host@{1}.target"
+HOST_LINK_ACTION_FMT_2 = "${HOST_ACTION_FMT_2}:obmc-host-{0}@{1}.target"
SYSTEMD_SERVICE_${PN} += " \
obmc-mapper.target \
@@ -69,6 +76,7 @@ SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_POWER_FMT', 'CHASSIS_POWER
SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_POWER_FMT_2', 'CHASSIS_POWER_TARGETS_2')}"
SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}"
SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}"
+SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT_2', 'HOST_ACTION_TARGETS_2')}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_FMT', 'CHASSIS_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'SYNCH_POWER_LINK_FMT', 'SYNCH_POWER_TARGETS', 'OBMC_POWER_INSTANCES')}"
@@ -76,3 +84,4 @@ SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_POWER_LINK_FMT', 'CHASSIS_POW
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_POWER_LINK_FMT_2', 'CHASSIS_POWER_TARGETS_2', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT_2', 'HOST_ACTION_TARGETS_2', 'OBMC_HOST_INSTANCES')}"
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset-running@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset-running@.target
new file mode 100644
index 000000000..9edb84453
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset-running@.target
@@ -0,0 +1,5 @@
+[Unit]
+Description=Host%i running after reset
+Conflicts=obmc-stop-host@%i.target
+RefuseManualStart=yes
+RefuseManualStop=yes
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset@.target
new file mode 100644
index 000000000..36994075e
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-reset@.target
@@ -0,0 +1,7 @@
+[Unit]
+Description=Host%i (Reset Check)
+Conflicts=obmc-stop-host%i.target
+RefuseManualStop=yes
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
OpenPOWER on IntegriCloud