Commit f31f0a16 authored by Valentin Vidic's avatar Valentin Vidic Committed by Greg Kroah-Hartman

ipmi/watchdog: fix watchdog timeout set on reboot

commit 860f01e9 upstream.

systemd by default starts watchdog on reboot and sets the timer to
ShutdownWatchdogSec=10min.  Reboot handler in ipmi_watchdog than reduces
the timer to 120s which is not enough time to boot a Xen machine with
a lot of RAM.  As a result the machine is rebooted the second time
during the long run of (XEN) Scrubbing Free RAM.....

Fix this by setting the timer to 120s only if it was previously
set to a low value.
Signed-off-by: default avatarValentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 83eeedc1
...@@ -1156,9 +1156,10 @@ static int wdog_reboot_handler(struct notifier_block *this, ...@@ -1156,9 +1156,10 @@ static int wdog_reboot_handler(struct notifier_block *this,
ipmi_watchdog_state = WDOG_TIMEOUT_NONE; ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB); ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
} else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) { } else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
/* Set a long timer to let the reboot happens, but /* Set a long timer to let the reboot happen or
reboot if it hangs, but only if the watchdog reset if it hangs, but only if the watchdog
timer was already running. */ timer was already running. */
if (timeout < 120)
timeout = 120; timeout = 120;
pretimeout = 0; pretimeout = 0;
ipmi_watchdog_state = WDOG_TIMEOUT_RESET; ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment