diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2020-01-14 23:21:24 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2020-02-10 22:45:17 +0300 |
commit | 024c25d6aa71758f94291cd03ac2fc0c77bd1aff (patch) | |
tree | 2797c0b3dcd93a0d45d7568f1b863892b44b0286 /meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb | |
parent | 559224c963de5f66075afa3e76c9e947af904267 (diff) | |
download | openbmc-024c25d6aa71758f94291cd03ac2fc0c77bd1aff.tar.xz |
move state systemd files to phosphor-state-manager
The OpenBMC target and service systemd files have been moved to
phosphor-state-manager. This commit will move to those changes and
delete the files from meta-phosphor.
Bump Details:
phosphor-state-manager: srcrev bump 4640d48e99..c101157e5b
Andrew Geissler (3):
move state manager service files into its repo
ensure reboot service runs after host stopped
move openbmc targets into this repo
Tested:
- Verified data files and services were all in expected location within
witherspoon QEMU run
- Verified openbmc systemd target were all in expected location within
witherspoon QEMU run
- HW CI will verify targets are still working as expected
(From meta-phosphor rev: 77cfb0f54a23c3efeba26100110e54055accd16d)
Change-Id: If5048f63d07ce45b4bc1f2303d1e87275324a818
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb')
-rw-r--r-- | meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb | 89 |
1 files changed, 87 insertions, 2 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb index 674add7b1..caa0352a6 100644 --- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb @@ -16,6 +16,7 @@ STATE_MGR_PACKAGES = " \ ${PN}-host-check \ ${PN}-reset-sensor-states \ ${PN}-systemd-target-monitor \ + ${PN}-obmc-targets \ " PACKAGE_BEFORE_PN += "${STATE_MGR_PACKAGES}" ALLOW_EMPTY_${PN} = "1" @@ -35,6 +36,9 @@ SYSTEMD_PACKAGES = "${PN}-discover \ # recommended to deal properly with these reset scenarios. RRECOMMENDS_${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states" +# The obmc-targets are the base targets required to boot a computer system +RRECOMMENDS_${PN}-host += "${PN}-obmc-targets" + inherit meson pkgconfig inherit obmc-phosphor-dbus-service @@ -49,7 +53,6 @@ DEPENDS += "cli11" FILES_${PN}-host = "${bindir}/phosphor-host-state-manager" DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service" DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service" -SYSTEMD_ENVIRONMENT_FILE_${PN}-host += "obmc/phosphor-reboot-host/reboot.conf" SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service" FILES_${PN}-chassis = "${bindir}/phosphor-chassis-state-manager" @@ -140,7 +143,89 @@ HOST_RST_RBT_ATTEMPTS_SVC_INST = "phosphor-reset-host-reboot-attempts@{0}.servic HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TGTFMT}.requires/${HOST_RST_RBT_ATTEMPTS_SVC_INST}" SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" + +# 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 +CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on" + +# Chassis action power targets +# - on: Services to run to power on the chassis +# - off: Services to run to power off the chassis +# - powered-off: Services to run once chassis power is off +# - reset: Services to check chassis power state and update chassis "on" target +# - hard-off: Services to force an immediate power off of the chassis +CHASSIS_ACTION_TARGETS = "poweron poweroff powered-off powerreset hard-poweroff" + +# Track all host synchronization point targets +# - 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: Will run startmin target, this target used for any additional +# services that user needs for an initial power on of host. +# For example, resetting the host reboot count could be put in +# this target so on any fresh power on, this count is reset. +# - startmin: Minimum services required to start the host. This target will +# be called by reboot and start target. +# - stop: Services to run to shutdown the host +# - quiesce: Target to enter on host boot failure +# - shutdown: Tell host to shutdown, then stop system +# - reset: Services to check if host is running and update host "start" target +# - crash: Target to run when host crashes. it is very much similar to +# quiesce target but the only delta is that this target contains +# multiple services and one of them is the quiesce target. +# - timeout: Target to run when host watchdog times out +# - reboot: Reboot the host +HOST_ACTION_TARGETS = "start startmin stop quiesce reset shutdown crash timeout reboot" + +CHASSIS_SYNCH_FMT = "obmc-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-{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" + +# Targets to be executed on checkstop and watchdog timeout +HOST_ERROR_TARGETS = "crash timeout" + +QUIESCE_TMPL = "obmc-host-quiesce@.target" +CRASH_TIMEOUT_TGTFMT = "obmc-host-{0}@{1}.target" +QUIESCE_INSTFMT = "obmc-host-quiesce@{1}.target" +QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TIMEOUT_TGTFMT}.wants/${QUIESCE_INSTFMT}" + +SYSTEMD_SERVICE_${PN}-obmc-targets += " \ + obmc-mapper.target \ + obmc-fans-ready.target \ + obmc-fan-control.target \ + obmc-fan-control-ready@.target \ + obmc-fan-watchdog-takeover.target \ + " + +SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" +SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}" +SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}" +SYSTEMD_SERVICE_${PN}-obmc-targets += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}" + +SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN}-obmc-targets += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" + SRC_URI += "git://github.com/openbmc/phosphor-state-manager" -SRCREV = "4640d48e998709f1b64b97347db0f1b355b7f423" +SRCREV = "c101157e5b138f36044a2a3aaf15ad8ac16501fc" S = "${WORKDIR}/git" |