diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-06-12 12:18:29 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-06-15 07:48:05 +0300 |
commit | 98e2ba3e37499b619cb222aa0b7e335afada8014 (patch) | |
tree | 7ee8f42889c9f3caf07039ecd2889c5262d410f0 /meta-phosphor | |
parent | 15b600cf7c9417a3c4c44b9a47ee3da6c8ba7b17 (diff) | |
download | openbmc-98e2ba3e37499b619cb222aa0b7e335afada8014.tar.xz |
Add host-timeout target
This target gets executed when the host watchdog times out.
Change-Id: Id6711a1b7eab784189daf46bc225398b5cc1790f
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/common/recipes-core/systemd/obmc-targets.bb | 14 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-timeout@.target | 4 |
2 files changed, 13 insertions, 5 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb index 5f2a1c0e2..1763879fa 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb @@ -38,7 +38,8 @@ HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset # - 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" +# - timeout: Target to run when host watchdog times out +HOST_ACTION_TARGETS = "start stop quiesce reset shutdown crash timeout" CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target" CHASSIS_ACTION_FMT = "obmc-chassis-power{0}@.target" @@ -51,10 +52,13 @@ 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_TGTFMT = "obmc-host-crash@{0}.target" -QUIESCE_INSTFMT = "obmc-host-quiesce@{0}.target" -CRASH_QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TGTFMT}.wants/${QUIESCE_INSTFMT}" +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-mapper.target \ @@ -75,4 +79,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')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-timeout@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-timeout@.target new file mode 100644 index 000000000..b87507bf1 --- /dev/null +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-timeout@.target @@ -0,0 +1,4 @@ +[Unit] +Description=Host instance %i timed out refreshing Watchdog +Conflicts=obmc-chassis-poweroff@%i.target +RefuseManualStop=yes |