diff options
author | Josh D. King <jdking@us.ibm.com> | 2017-04-06 15:56:37 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-04-20 15:43:45 +0000 |
commit | efb04a1963ee03f7db756cb33ae52f024ffda086 (patch) | |
tree | d7dc1bf3dddc378580651944e965b256240fe15b /meta-phosphor/common/recipes-core/systemd | |
parent | b9ee536d0aae31718054ddad187a93d761d9dea2 (diff) | |
download | talos-openbmc-efb04a1963ee03f7db756cb33ae52f024ffda086.tar.gz talos-openbmc-efb04a1963ee03f7db756cb33ae52f024ffda086.zip |
Refactor action target names Host-start-stop
The target change is:
obmc-chassis-stop -> obmc-host-stop
obmc-chassis-start -> obmc-host-start
Removed CHASSIS_FMT and CHASSIS_LINK_FMT
because they are no longer needed.
CHASSIS_POWER_FMT_2 did not change because
its used for obmc-chassis-reset.
Deleted files obmc-chassis-start@.target and
obmc-chassis-stop@.target because they are
no longer needed. I moved over their contents
to obmc-host-start and obmc-host-stop.
Updated phosphor-state-manager.bb and
skeleton-rev.bbclass to have correct commit
id.
Change-Id: I26cba4153038f39d60e8d450a05969a216848abe
Signed-off-by: Josh D. King <jdking@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-core/systemd')
14 files changed, 57 insertions, 77 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb index 265ea1e30..cf8cb02b8 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb @@ -7,60 +7,44 @@ inherit obmc-phosphor-systemd inherit obmc-phosphor-license inherit allarch -# Overall chassis and host control -# - start: Services to run to start the host -# - stop: Services to run to stop the host -CHASSIS_TARGETS = "start stop" - -# Synchronization targets +# Chassis power synchronization targets # - start-pre: Services to run before we start power on process # - start: Services to run to do the chassis power on # - on: Services to run once power is on # - stop-pre,stop,off: Same as above but applied to powering off # - reset-on: Services to check if chassis power is on after bmc reset -SYNCH_POWER_TARGETS = "start-pre start on stop-pre stop off reset-on" +CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on" -# Control chassis power +# Chassis action power targets # - on: Services to run to power on the chassis # - off: Services to run to power off the chassis -CHASSIS_POWER_TARGETS = "on off" - -#TODO - After target renames #1205, combine this with CHASSIS_POWER_TARGETS # - reset: Services to check chassis power state and update chassis "on" target -CHASSIS_POWER_TARGETS_2 = "reset" +CHASSIS_ACTION_TARGETS = "on off reset" # Track all host synchronization point targets -# - start-pre: Services to run before we start host boot -# - 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 -# - 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" +# - start-pre: Services to run before we start host boot +# - starting: Services to run to do the host boot +# - started: Services to run once the host is booted +# - stop-pre,stopping,stopped: Same as above but applied to shutting down the host +# - reset-running: Services to check if host is running after bmc reset +HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset-running" # Track all host action targets +# - start: Service to run to start the host # - 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" +# - reset: Services to check if host is running and update host "start" target +HOST_ACTION_TARGETS = "start stop quiesce reset" -CHASSIS_FMT = "obmc-chassis-{0}@.target" -SYNCH_POWER_FMT = "obmc-power-{0}@.target" -CHASSIS_POWER_FMT = "obmc-chassis-power{0}@.target" -CHASSIS_POWER_FMT_2 = "obmc-chassis-{0}@.target" +CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" +CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target" HOST_SYNCH_FMT = "obmc-host-{0}@.target" -HOST_ACTION_FMT = "obmc-{0}-host@.target" -HOST_ACTION_FMT_2 = "obmc-host-{0}@.target" +HOST_ACTION_FMT = "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" -CHASSIS_POWER_LINK_FMT = "${CHASSIS_POWER_FMT}:obmc-chassis-power{0}@{1}.target" -CHASSIS_POWER_LINK_FMT_2 = "${CHASSIS_POWER_FMT_2}:obmc-chassis-{0}@{1}.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" 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" +HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target" SYSTEMD_SERVICE_${PN} += " \ obmc-mapper.target \ @@ -70,18 +54,12 @@ SYSTEMD_SERVICE_${PN} += " \ obmc-standby.target \ " -SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_FMT', 'CHASSIS_TARGETS')}" -SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'SYNCH_POWER_FMT', 'SYNCH_POWER_TARGETS')}" -SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_POWER_FMT', 'CHASSIS_POWER_TARGETS')}" -SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_POWER_FMT_2', 'CHASSIS_POWER_TARGETS_2')}" +SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" +SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}" 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')}" -SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_POWER_LINK_FMT', 'CHASSIS_POWER_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_POWER_LINK_FMT_2', 'CHASSIS_POWER_TARGETS_2', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', '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-chassis-reset@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-powerreset@.target index 2ef6c7053..2ef6c7053 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-reset@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-powerreset@.target diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-start@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-start@.target deleted file mode 100644 index c54fea6ff..000000000 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-start@.target +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Chassis%i (Start) -Wants={SYSTEMD_DEFAULT_TARGET} -After={SYSTEMD_DEFAULT_TARGET} -Wants=mapper-wait@-org-openbmc-control-chassis%i.service -After=mapper-wait@-org-openbmc-control-chassis%i.service -Conflicts=obmc-chassis-stop@%i.target -RefuseManualStop=yes -OnFailure=obmc-quiesce-host@%i.target -OnFailureJobMode=flush diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-stop@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-stop@.target deleted file mode 100644 index bc887b311..000000000 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-stop@.target +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Chassis%i (Stop) -Wants={SYSTEMD_DEFAULT_TARGET} -After={SYSTEMD_DEFAULT_TARGET} -Wants=mapper-wait@-org-openbmc-control-chassis%i.service -After=mapper-wait@-org-openbmc-control-chassis%i.service -Conflicts=obmc-chassis-start@%i.target -RefuseManualStop=yes -OnFailure=obmc-chassis-poweroff@%i.target -OnFailureJobMode=flush diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-quiesce-host@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-quiesce@.target index 4f10419ab..4f10419ab 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-quiesce-host@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-quiesce@.target diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start-pre@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start-pre@.target index d555d0a88..2bc270c14 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start-pre@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start-pre@.target @@ -2,6 +2,6 @@ Description=Start Host%i (Pre) Wants={SYSTEMD_DEFAULT_TARGET} After={SYSTEMD_DEFAULT_TARGET} -Conflicts=obmc-chassis-stop@%i.target +Conflicts=obmc-host-stop@%i.target RefuseManualStart=yes RefuseManualStop=yes diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start@.target index 5d309d2d3..317c6c14f 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-start@.target @@ -1,7 +1,10 @@ [Unit] Description=Start Host%i Wants={SYSTEMD_DEFAULT_TARGET} -After=obmc-host-start-pre@%i.target -Conflicts=obmc-chassis-stop@%i.target -RefuseManualStart=yes +After={SYSTEMD_DEFAULT_TARGET} +Wants=mapper-wait@-org-openbmc-control-chassis%i.service +After=mapper-wait@-org-openbmc-control-chassis%i.service +Conflicts=obmc-host-stop@%i.target RefuseManualStop=yes +OnFailure=obmc-quiesce-host@%i.target +OnFailureJobMode=flush diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target index f5b1f2da1..45d898bef 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target @@ -1,8 +1,8 @@ [Unit] Description=Host%i (Started) Wants={SYSTEMD_DEFAULT_TARGET} -After=obmc-host-start@%i.target -Conflicts=obmc-chassis-stop@%i.target +After=obmc-host-starting@%i.target +Conflicts=obmc-host-stop@%i.target Conflicts=obmc-stop-host@%i.target RefuseManualStart=yes RefuseManualStop=yes diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-starting@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-starting@.target new file mode 100644 index 000000000..51bce8db5 --- /dev/null +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-starting@.target @@ -0,0 +1,8 @@ +[Unit] +Description=Host%i (Starting) +Wants={SYSTEMD_DEFAULT_TARGET} +After=obmc-host-start-pre@%i.target +Conflicts=obmc-host-stop@%i.target +Conflicts=obmc-stop-host@%i.target +RefuseManualStart=yes +RefuseManualStop=yes diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop-pre@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop-pre@.target index a97925087..208892fb6 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop-pre@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop-pre@.target @@ -2,6 +2,6 @@ Description=Stop Host%i (Pre) Wants={SYSTEMD_DEFAULT_TARGET} After={SYSTEMD_DEFAULT_TARGET} -Conflicts=obmc-chassis-start@%i.target +Conflicts=obmc-host-start@%i.target RefuseManualStart=yes RefuseManualStop=yes diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop@.target index c573e9c5b..96648a40a 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stop@.target @@ -1,7 +1,10 @@ [Unit] Description=Stop Host%i Wants={SYSTEMD_DEFAULT_TARGET} -After=obmc-host-stop-pre@%i.target -Conflicts=obmc-chassis-start@%i.target -RefuseManualStart=yes +After={SYSTEMD_DEFAULT_TARGET} +Wants=mapper-wait@-org-openbmc-control-chassis%i.service +After=mapper-wait@-org-openbmc-control-chassis%i.service +Conflicts=obmc-host-start@%i.target RefuseManualStop=yes +OnFailure=obmc-chassis-poweroff@%i.target +OnFailureJobMode=flush diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stopped@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stopped@.target index 92afdf00f..1043578a6 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stopped@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stopped@.target @@ -2,6 +2,6 @@ Description=Host%i (Stopped) Wants={SYSTEMD_DEFAULT_TARGET} After=obmc-host-stop@%i.target -Conflicts=obmc-chassis-start@%i.target +Conflicts=obmc-host-start@%i.target RefuseManualStart=yes RefuseManualStop=yes diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stopping@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stopping@.target new file mode 100644 index 000000000..bc81a577f --- /dev/null +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-stopping@.target @@ -0,0 +1,8 @@ +[Unit] +Description=Host%i (Stopping) +Wants={SYSTEMD_DEFAULT_TARGET} +After=obmc-host-stop-pre@%i.target +Conflicts=obmc-host-start@%i.target +Conflicts=obmc-host-starting@%i.target +RefuseManualStart=yes +RefuseManualStop=yes diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target index 4347fa426..9e7defe69 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target @@ -2,5 +2,5 @@ Description=Power%i Host Off Wants={SYSTEMD_DEFAULT_TARGET} RefuseManualStop=yes -OnFailure=obmc-chassis-stop@%i.target +OnFailure=obmc-host-stop@%i.target OnFailureJobMode=flush |