summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host.bb
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-phosphor/host/obmc-op-control-host.bb
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-phosphor/host/obmc-op-control-host.bb')
-rw-r--r--meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host.bb25
1 files changed, 24 insertions, 1 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host.bb b/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host.bb
index fba82d8cc..fa5a00656 100644
--- a/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host.bb
+++ b/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host.bb
@@ -12,11 +12,34 @@ SKELETON_DIR = "op-hostctl"
FMT = "org.openbmc.control.Host@{0}.service"
DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
-SYSTEMD_SERVICE_${PN} = "op-start-host@.service"
+SYSTEMD_SERVICE_${PN} = " \
+ op-start-host@.service \
+ op-reset-host-check@.service \
+ op-reset-host-running@.service \
+ "
START_TMPL = "op-start-host@.service"
START_TGTFMT = "obmc-chassis-start@{1}.target"
START_INSTFMT = "obmc-start-host@{0}.service"
START_FMT = "../${START_TMPL}:${START_TGTFMT}.requires/${START_INSTFMT}"
+RESET_CHECK_TMPL = "op-reset-host-check@.service"
+RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target"
+RESET_CHECK_INSTFMT = "op-reset-host-check@{0}.service"
+RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}"
+
+RESET_RUNNING_TMPL = "op-reset-host-running@.service"
+RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target"
+RESET_RUNNING_INSTFMT = "op-reset-host-running@{0}.service"
+RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}"
+
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+
+# Force the standby target to run the host reset check target
+RESET_TMPL_CTRL = "obmc-host-reset@.target"
+SYSD_TGT = "${SYSTEMD_DEFAULT_TARGET}"
+RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target"
+RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}"
OpenPOWER on IntegriCloud