commit | 796f28dee1cdf233baedd48d6be0cb1bb85fabde | [log] [tgz] |
---|---|---|
author | Matt Spinler <spinler@us.ibm.com> | Tue Jun 13 15:57:04 2017 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Fri Jul 07 16:12:24 2017 +0000 |
tree | 1f87c9344096423b4910f9d65f8086b209097693 | |
parent | 9bce4f8bebd11d5bf9d419789508f5795eda1b4f [diff] |
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>
diff --git a/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf b/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/fan-watchdog.conf new file mode 100644 index 0000000..b54faae --- /dev/null +++ b/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-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf b/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf similarity index 100% rename from meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf rename to meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/reset-fan-watchdog.conf
diff --git a/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service b/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service new file mode 100644 index 0000000..902ab6d --- /dev/null +++ b/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-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service b/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service index 8ac3dd1..23c1fca 100644 --- a/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service +++ b/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
@@ -7,5 +7,5 @@ [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}}