diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-04-04 14:11:02 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-05-26 08:09:10 +0300 |
commit | 1d22c22a2a6dadaf351cb2f9cbdf007f06adb079 (patch) | |
tree | 1434f766231a3250bc1d212b9ef098dea3b4aa7e /meta-phosphor/common | |
parent | 45745f565a4bf2437579c37ac98d502204cdcfff (diff) | |
download | openbmc-1d22c22a2a6dadaf351cb2f9cbdf007f06adb079.tar.xz |
Add target files that gpio monitor can call into
When GPIO monitor sees that a particular line is asserted,
it calls into one of the configured systemd targets and this
is one such. For now, the target just has host-quiesce and
will be enhanced to contain a service that logs an error.
Change-Id: I09afea5fcab3efce7bbfa5124af9b8cb2e0594bf
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'meta-phosphor/common')
-rw-r--r-- | meta-phosphor/common/recipes-core/systemd/obmc-targets.bb | 11 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-crash@.target | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb index ae530accc4..5f2a1c0e23 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb @@ -35,7 +35,10 @@ HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset # - 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 -HOST_ACTION_TARGETS = "start stop quiesce reset shutdown" +# - 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. +HOST_ACTION_TARGETS = "start stop quiesce reset shutdown crash" CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target" @@ -48,6 +51,11 @@ 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" +QUIESCE_TMPL = "obmc-host-quiesce@.target" +CRASH_TGTFMT = "obmc-host-crash@{0}.target" +QUIESCE_INSTFMT = "obmc-host-quiesce@{0}.target" +CRASH_QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TGTFMT}.wants/${QUIESCE_INSTFMT}" + SYSTEMD_SERVICE_${PN} += " \ obmc-mapper.target \ obmc-webserver-pre.target \ @@ -67,3 +75,4 @@ SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_AC 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, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_QUIESCE_FMT', 'OBMC_HOST_INSTANCES')}" diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-crash@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-crash@.target new file mode 100644 index 0000000000..ea3798b522 --- /dev/null +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-crash@.target @@ -0,0 +1,4 @@ +[Unit] +Description=Host instance %i crashed +Conflicts=obmc-chassis-poweroff@%i.target +RefuseManualStop=yes |