summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-06-13 15:57:04 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-07-07 16:12:24 +0000
commita62a65597a62c0e0d533503ac1dc042eb377fb86 (patch)
treea74c7adbf36a743acb50a5b06d72d3cead6d49a1 /meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon
parenta49ed3db6a46350ccb348d79caa7d4903b2ab3a8 (diff)
downloadtalos-openbmc-a62a65597a62c0e0d533503ac1dc042eb377fb86.tar.gz
talos-openbmc-a62a65597a62c0e0d533503ac1dc042eb377fb86.zip
Install witherspoon fan watchdog service
This service will start on a power on and uses the busybox watchdog app to continuously ping the watchdog device. If other logic that is in place detects that phosphor-fan has lost control of the fans, it will start the obmc-fan-watchdog-takeover target, which will stop this service and expire the watchdog, pushing the fans to high speed. A power cycle or BMC reboot is required to recover fan control. An environment file is used to give the watchdog app the device and timeout parameters. Change-Id: I7088d3ea97beaa4922b9ad357f0ce9738e10cb22 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon')
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb11
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf3
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf (renamed from meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf)0
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service13
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service2
5 files changed, 25 insertions, 4 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
index a74293ff8..1fdca1787 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
@@ -5,6 +5,7 @@ inherit obmc-phosphor-license
inherit obmc-phosphor-systemd
RDEPENDS_${PN} += "phosphor-gpio-monitor"
+RDEPENDS_${PN} += "busybox"
RESET_SERVICE = "witherspoon-reset-fan-watchdog.service"
TGTFMT = "obmc-chassis-poweron@0.target"
@@ -12,6 +13,10 @@ RESET_FMT = "../${RESET_SERVICE}:${TGTFMT}.requires/${RESET_SERVICE}"
MONITOR_SERVICE = "witherspoon-fan-watchdog-monitor@.service"
-SYSTEMD_SERVICE_${PN} += "${RESET_SERVICE} ${MONITOR_SERVICE}"
-SYSTEMD_LINK_${PN} += "${RESET_FMT}"
-SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf"
+WATCHDOG_SERVICE = "witherspoon-fan-watchdog.service"
+WATCHDOG_FMT = "../${WATCHDOG_SERVICE}:${TGTFMT}.requires/${WATCHDOG_SERVICE}"
+
+SYSTEMD_SERVICE_${PN} += "${RESET_SERVICE} ${MONITOR_SERVICE} ${WATCHDOG_SERVICE}"
+SYSTEMD_LINK_${PN} += "${RESET_FMT} ${WATCHDOG_FMT}"
+SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/fan-watchdog.conf"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf
new file mode 100644
index 000000000..b54faae3b
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf
@@ -0,0 +1,3 @@
+TIMEOUT=3
+INTERVAL=1
+DEVICE=/dev/watchdog0
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf
index b4e5ce74e..b4e5ce74e 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service
new file mode 100644
index 000000000..902ab6d7a
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Witherspoon Fan Watchdog Daemon
+Wants=phosphor-fan-control-init@%i.service
+Before=phosphor-fan-control-init@%i.service
+Conflicts=obmc-fan-watchdog-takeover.target
+
+[Service]
+EnvironmentFile={envfiledir}/obmc/witherspoon-fan-watchdog/fan-watchdog.conf
+ExecStart=/sbin/watchdog -T ${{TIMEOUT}} -t ${{INTERVAL}} -F ${{DEVICE}}
+KillSignal=SIGKILL
+
+[Install]
+RequiredBy=obmc-chassis-poweron@%i.target
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
index 8ac3dd115..23c1fca49 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
@@ -7,5 +7,5 @@ Conflicts=obmc-chassis-poweroff@0.target
[Service]
Type=oneshot
RemainAfterExit=yes
-EnvironmentFile={envfiledir}/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf
+EnvironmentFile={envfiledir}/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf
ExecStart={sbindir}/phosphor-gpio-util -p ${{GPIO_PATH}} -g ${{GPIO}} -a ${{ACTION}} -d ${{DELAY}}
OpenPOWER on IntegriCloud