From c358bce9b48a07b86133b443ad07f17d72ddfd6e Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Tue, 12 May 2020 14:08:30 -0500 Subject: witherspoon: Remove `witherspoon` naming from fan watchdog Remove the use of `witherspoon` in the names of the recipe, config files, and services of the fan watchdog. This is in prep to use this same fan watchdog on other machines within meta-ibm that have different configurations. Tested: Witherspoon image matches image prior to change Flash image to Witherspoon and force watchdog to trip (From meta-ibm rev: 80f819efec08f7cc7de6988f64c0c77e20990f05) Change-Id: I77295974397cd4903cd1a723b9ef97ee744d2557 Signed-off-by: Matthew Barth Signed-off-by: Andrew Geissler --- .../fans/fan-watchdog/fan-watchdog-monitor@.service | 10 ++++++++++ .../recipes-phosphor/fans/fan-watchdog/fan-watchdog.service | 13 +++++++++++++ .../fans/fan-watchdog/obmc/fan-watchdog/fan-watchdog.conf | 3 +++ .../fan-watchdog/obmc/fan-watchdog/reset-fan-watchdog.conf | 4 ++++ .../fans/fan-watchdog/reset-fan-watchdog.service | 12 ++++++++++++ 5 files changed, 42 insertions(+) create mode 100644 meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog-monitor@.service create mode 100644 meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog.service create mode 100644 meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/fan-watchdog.conf create mode 100644 meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/reset-fan-watchdog.conf create mode 100644 meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service (limited to 'meta-ibm/recipes-phosphor/fans/fan-watchdog') diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog-monitor@.service b/meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog-monitor@.service new file mode 100644 index 000000000..945561b50 --- /dev/null +++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog-monitor@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Fan Watchdog Failure Monitor + +#This can get called every time a process dies, so ensure it's never limited +StartLimitIntervalSec=0 + +[Service] +Type=oneshot +ExecStart=/usr/bin/env phosphor-unit-failure-monitor --source %i --target obmc-fan-watchdog-takeover.target --action start +SyslogIdentifier=phosphor-unit-failure-monitor diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog.service b/meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog.service new file mode 100644 index 000000000..3f941836d --- /dev/null +++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/fan-watchdog.service @@ -0,0 +1,13 @@ +[Unit] +Description=Fan Watchdog Daemon +Wants=phosphor-fan-monitor-init@0.service +Before=phosphor-fan-monitor-init@0.service +Conflicts=obmc-fan-watchdog-takeover.target + +[Service] +EnvironmentFile={envfiledir}/obmc/fan-watchdog/fan-watchdog.conf +ExecStart=/sbin/watchdog -T ${{TIMEOUT}} -t ${{INTERVAL}} -F ${{DEVICE}} +KillSignal=SIGKILL + +[Install] +RequiredBy=obmc-chassis-poweron@0.target diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/fan-watchdog.conf b/meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/fan-watchdog.conf new file mode 100644 index 000000000..ce7824ccb --- /dev/null +++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/fan-watchdog.conf @@ -0,0 +1,3 @@ +TIMEOUT=5 +INTERVAL=1 +DEVICE=/dev/watchdog0 diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/reset-fan-watchdog.conf b/meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/reset-fan-watchdog.conf new file mode 100644 index 000000000..b4e5ce74e --- /dev/null +++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/obmc/fan-watchdog/reset-fan-watchdog.conf @@ -0,0 +1,4 @@ +GPIO_PATH=/dev/gpiochip0 +GPIO=109 +DELAY=1 +ACTION=low_high diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service b/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service new file mode 100644 index 000000000..f6248f0ee --- /dev/null +++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service @@ -0,0 +1,12 @@ +[Unit] +Description=Fan Watchdog Reset +Wants=phosphor-fan-monitor-init@0.service +Before=phosphor-fan-monitor-init@0.service +Conflicts=obmc-chassis-poweroff@0.target + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile={envfiledir}/obmc/fan-watchdog/reset-fan-watchdog.conf +ExecStart=/usr/bin/env phosphor-gpio-util -p ${{GPIO_PATH}} -g ${{GPIO}} -a ${{ACTION}} -d ${{DELAY}} +SyslogIdentifier=phosphor-gpio-util -- cgit v1.2.3