diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2017-05-08 15:58:01 -0500 |
---|---|---|
committer | Andrew Geissler <andrewg@us.ibm.com> | 2017-05-09 17:37:14 -0500 |
commit | b1afecc2797d06e1e54094b72c5f2586be73bbdd (patch) | |
tree | 85f0703dbbb53144206deff4bc420f6aa2e89c34 /meta-phosphor | |
parent | 293354516d1a6b508ccd403c94a82ad89adf9b66 (diff) | |
download | talos-openbmc-b1afecc2797d06e1e54094b72c5f2586be73bbdd.tar.gz talos-openbmc-b1afecc2797d06e1e54094b72c5f2586be73bbdd.zip |
Add phosphor-host-check and required host services
This application and services will be used by the host reset service
to determine if the host is running after a BMC has been rebooted
Change-Id: I8299546b0f275ebbb46aa775ab7b0633cc3fd5e0
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-image.bbclass | 3 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host.bb | 21 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb | 6 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/state/files/phosphor-reset-host-check@.service (renamed from meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host/op-reset-host-check@.service) | 7 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/state/files/phosphor-reset-host-running@.service (renamed from meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host/op-reset-host-running@.service) | 0 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb | 28 | ||||
-rw-r--r-- | meta-phosphor/conf/distro/include/phosphor-defaults.inc | 7 |
7 files changed, 46 insertions, 26 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass index e33aa76d7..29689b7b7 100644 --- a/meta-phosphor/classes/obmc-phosphor-image.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass @@ -12,6 +12,7 @@ # - obmc-host-ctl - OpenBMC host control # - obmc-host-ipmi - OpenBMC host IPMI # - obmc-host-state-mgmt - OpenBMC host state management +# - obmc-host-check-mgmt - OpenBMC host state checking # - obmc-inventory - OpenBMC inventory support # - obmc-leds - OpenBMC LED support # - obmc-logging-mgmt - OpenBMC logging management @@ -39,6 +40,7 @@ FEATURE_PACKAGES_obmc-flash-mgmt ?= "${@cf_enabled(d, 'obmc-phosphor-flash-mgmt' FEATURE_PACKAGES_obmc-host-ctl ?= "${@cf_enabled(d, 'obmc-host-ctl', 'virtual-obmc-host-ctl')}" FEATURE_PACKAGES_obmc-host-ipmi ?= "${@cf_enabled(d, 'obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw')}" FEATURE_PACKAGES_obmc-host-state-mgmt ?= "packagegroup-obmc-apps-host-state-mgmt" +FEATURE_PACKAGES_obmc-host-check-mgmt ?= "packagegroup-obmc-apps-host-check-mgmt" FEATURE_PACKAGES_obmc-inventory ?= "packagegroup-obmc-apps-inventory" FEATURE_PACKAGES_obmc-leds ?= "packagegroup-obmc-apps-leds" FEATURE_PACKAGES_obmc-logging-mgmt ?= "${@df_enabled(d, 'obmc-logging-mgmt', 'virtual-obmc-logging-mgmt')}" @@ -61,6 +63,7 @@ IMAGE_FEATURES += " \ obmc-host-ctl \ obmc-host-ipmi \ obmc-host-state-mgmt \ + obmc-host-check-mgmt \ obmc-inventory \ obmc-leds \ obmc-logging-mgmt \ 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 8533c8eab..e4c54bea9 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 @@ -14,8 +14,6 @@ FMT = "org.openbmc.control.Host@{0}.service" DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}" SYSTEMD_SERVICE_${PN} = " \ op-start-host@.service \ - op-reset-host-check@.service \ - op-reset-host-running@.service \ " START_TMPL = "op-start-host@.service" @@ -23,23 +21,4 @@ START_TGTFMT = "obmc-host-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')}" diff --git a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb index 3dcba8a86..f3212cdaf 100644 --- a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb +++ b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb @@ -17,6 +17,7 @@ PACKAGES = " \ ${PN}-leds \ ${PN}-sensors \ ${PN}-software \ + ${PN}-host-check-mgmt \ " SUMMARY_${PN}-bmc-state-mgmt = "BMC state management" @@ -29,6 +30,11 @@ RDEPENDS_${PN}-chassis-state-mgmt = " \ ${VIRTUAL-RUNTIME_obmc-chassis-state-manager} \ " +SUMMARY_${PN}-host-check-mgmt = "Host state check on bmc reset" +RDEPENDS_${PN}-host-check-mgmt = " \ + ${VIRTUAL-RUNTIME_obmc-host-check} \ + " + SUMMARY_${PN}-extras = "Extra features" RDEPENDS_${PN}-extras = " \ phosphor-rest \ diff --git a/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host/op-reset-host-check@.service b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reset-host-check@.service index 7c9a05c8f..ba4f0c098 100644 --- a/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host/op-reset-host-check@.service +++ b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reset-host-check@.service @@ -1,8 +1,7 @@ [Unit] Description=Check Host%i status on BMC reset -# TODO: openbmc/openbmc#1274 -#Wants=mapper-wait@-xyz-openbmc_project-control-host%i.service -#After=mapper-wait@-xyz-openbmc_project-control-host%i.service +Wants=mapper-wait@-xyz-openbmc_project-control-host%i.service +After=mapper-wait@-xyz-openbmc_project-control-host%i.service Wants=obmc-host-reset-running@%i.target Before=obmc-host-reset-running@%i.target Wants=op-reset-chassis-on@%i.service @@ -13,7 +12,7 @@ ConditionPathExists=/run/openbmc/chassis@%i-on [Service] RemainAfterExit=yes Type=oneshot -ExecStart=/bin/sh -c "echo TODO - Check Host Status on BMC Reset" +ExecStart=/usr/sbin/phosphor-host-check [Install] diff --git a/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host/op-reset-host-running@.service b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reset-host-running@.service index 9a6ffe60b..9a6ffe60b 100644 --- a/meta-phosphor/common/recipes-phosphor/host/obmc-op-control-host/op-reset-host-running@.service +++ b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reset-host-running@.service diff --git a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb index ce0fa1ee8..7ba02a0c9 100644 --- a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb +++ b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb @@ -12,6 +12,7 @@ STATE_MGR_PACKAGES = " \ ${PN}-chassis \ ${PN}-bmc \ ${PN}-discover \ + ${PN}-host-check \ " PACKAGES =+ "${STATE_MGR_PACKAGES}" PACKAGES_remove = "${PN}" @@ -35,6 +36,7 @@ RDEPENDS_${PN}-host += "libsystemd phosphor-dbus-interfaces" RDEPENDS_${PN}-chassis += "libsystemd phosphor-dbus-interfaces" RDEPENDS_${PN}-bmc += "libsystemd phosphor-dbus-interfaces" RDEPENDS_${PN}-discover += "libsystemd phosphor-dbus-interfaces" +RDEPENDS_${PN}-host-check += "libsystemd phosphor-dbus-interfaces" FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager" DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service" @@ -48,12 +50,36 @@ DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service" FILES_${PN}-discover = "${sbindir}/phosphor-discover-system-state" SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service" +FILES_${PN}-host-check = "${sbindir}/phosphor-host-check" +SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service" +SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service" + +RESET_CHECK_TMPL = "phosphor-reset-host-check@.service" +RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target" +RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service" +RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}" + +RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service" +RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target" +RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service" +RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}" + +SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK_${PN}-host-check += "${@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}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}" + TMPL = "phosphor-discover-system-state@.service" INSTFMT = "phosphor-discover-system-state@{0}.service" FMT = "../${TMPL}:${SYSTEMD_DEFAULT_TARGET}.wants/${INSTFMT}" SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}" SRC_URI += "git://github.com/openbmc/phosphor-state-manager" -SRCREV = "cc3fb5d9a720a9a5b2102683da716004cd938e39" +SRCREV = "d5ac63507a47010f51ce857bd680c2f655380841" S = "${WORKDIR}/git" diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc index 53298da68..8ce8e4b99 100644 --- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc +++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc @@ -39,6 +39,13 @@ VIRTUAL-RUNTIME_obmc-host-state-manager ?= "phosphor-state-manager-host" # power the host back on. VIRTUAL-RUNTIME_obmc-discover-system-state ?= "phosphor-state-manager-discover" +# obmc-host-check +# +# Provides an implementation of phosphor-host-check, which will determine +# if the host is running after a BMC reboot and create the necessary file +# to indicate to host services that the host is running +VIRTUAL-RUNTIME_obmc-host-check ?= "phosphor-state-manager-host-check" + # obmc-fan-presence # # Provides implementations of fan presence detection |