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>
diff --git a/common/recipes-core/systemd/obmc-targets.bb b/common/recipes-core/systemd/obmc-targets.bb
index 265ea1e..cf8cb02 100644
--- a/common/recipes-core/systemd/obmc-targets.bb
+++ b/common/recipes-core/systemd/obmc-targets.bb
@@ -7,60 +7,44 @@
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"
+# - reset: Services to check if host is running and update host "start" target
+HOST_ACTION_TARGETS = "start stop quiesce reset"
-# 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-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 @@
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/common/recipes-core/systemd/obmc-targets/obmc-chassis-reset@.target b/common/recipes-core/systemd/obmc-targets/obmc-chassis-powerreset@.target
similarity index 100%
rename from common/recipes-core/systemd/obmc-targets/obmc-chassis-reset@.target
rename to common/recipes-core/systemd/obmc-targets/obmc-chassis-powerreset@.target
diff --git a/common/recipes-core/systemd/obmc-targets/obmc-chassis-start@.target b/common/recipes-core/systemd/obmc-targets/obmc-chassis-start@.target
deleted file mode 100644
index c54fea6..0000000
--- a/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/common/recipes-core/systemd/obmc-targets/obmc-chassis-stop@.target b/common/recipes-core/systemd/obmc-targets/obmc-chassis-stop@.target
deleted file mode 100644
index bc887b3..0000000
--- a/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/common/recipes-core/systemd/obmc-targets/obmc-quiesce-host@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-quiesce@.target
similarity index 100%
rename from common/recipes-core/systemd/obmc-targets/obmc-quiesce-host@.target
rename to common/recipes-core/systemd/obmc-targets/obmc-host-quiesce@.target
diff --git a/common/recipes-core/systemd/obmc-targets/obmc-host-start-pre@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-start-pre@.target
index d555d0a..2bc270c 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-host-start-pre@.target
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-host-start@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-start@.target
index 5d309d2..317c6c1 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-host-start@.target
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target
index f5b1f2d..45d898b 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-host-starting@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-starting@.target
new file mode 100644
index 0000000..51bce8d
--- /dev/null
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-host-stop-pre@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-stop-pre@.target
index a979250..208892f 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-host-stop-pre@.target
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-host-stop@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-stop@.target
index c573e9c..96648a4 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-host-stop@.target
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-host-stopped@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-stopped@.target
index 92afdf0..1043578 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-host-stopped@.target
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-host-stopping@.target b/common/recipes-core/systemd/obmc-targets/obmc-host-stopping@.target
new file mode 100644
index 0000000..bc81a57
--- /dev/null
+++ b/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/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target b/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target
index 4347fa4..9e7defe 100644
--- a/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target
+++ b/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