Blame SOURCES/README.watchdog.ipmi

0864ef
0864ef
Instructions for how to set up the watchdog daemon to work with IPMI's hardware watchdog
0864ef
----------------------------------------------------------------------------------------
0864ef
0864ef
First, verify that the ipmitool utility is present on the system to allow
0864ef
the watchdog timer to be turned off via the command line (which ipmitool).
0864ef
This will allow the hardware watchdog timer to be turned off gracefully
0864ef
should it ever become necessary.   If ipmitool is not present, install
0864ef
it or download the latest version from http://ipmitool.sourceforge.net and
0864ef
build and install it on your system.
0864ef
0864ef
Next, prior to starting up the watchdog daemon, the BMC BIOS should be set 
0864ef
to enable the IPMI/BMC hardware watchdog timer, the OpenIPMI watchdog driver 
0864ef
module should be inserted with the desired configuration/startup settings, 
0864ef
and the watchdog daemon's configuration file should be modified to use /dev/watchdog:
0864ef
0864ef
     1. To setup the IPMI/BMC BIOS to enable the hardware watchdog
0864ef
     timer, see BMC documentation. The main settings in the BMC BIOS 
0864ef
     requiring modification to turn on the IPMI watchdog timer are: 
0864ef
0864ef
      - Set the BMC POST Watchdog to "ENABLED".
0864ef
      - Set the BMC POST Watchdog Timeout to "5 Minutes".
0864ef
0864ef
     2. To insert the OpenIPMI watchdog driver module with the
0864ef
     desired configuration settings, two steps are necessary: 
0864ef
0864ef
        i.) Configure the OpenIPMI watchdog driver by editing the 
0864ef
            /etc/sysconfig/ipmi configuration file:
0864ef
0864ef
          - Set "IPMI_WATCHDOG=yes".
0864ef
          - Set desired options via the IPMI_WATCHDOG_OPTIONS
0864ef
            config entry.
0864ef
0864ef
           EXAMPLE: 'IPMI_WATCHDOG_OPTIONS="timeout=60 start_now=1 \
0864ef
                   preop=preop_give_data action=power_cycle pretimeout=1" '
0864ef
0864ef
            Execute "modinfo ipmi_watchdog" for more detailed information
0864ef
            on the available ipmi watchdog timer options.
0864ef
0864ef
          - Execute "service ipmi start" (the watchdog driver starts 
0864ef
            automatically along with the other ipmi drivers).
0864ef
0864ef
          IMPORTANT: If "start_now=1" has been set as one of the 
0864ef
               configuration options, be sure to start up the watchdog 
0864ef
               daemon before the BMC timer expires!
0864ef
0864ef
       ii.) Set the OpenIPMI daemon and watchdog to start during bootup:
0864ef
0864ef
          - chkconfig ipmi on
0864ef
          - chkconfig watchdog on
0864ef
0864ef
0864ef
     3. Configure the watchdog daemon by editing the 
0864ef
     /etc/watchdog.conf configuration file: 
0864ef
0864ef
      - Uncomment the "watchdog-device = /dev/watchdog" line.
0864ef
      - Ensure that "realtime = yes" and "priority = 1" are set and not
0864ef
        commented-out.
0864ef
      - Uncomment the "interval" line, and set the interval to be less 
0864ef
        than what you set the timeout option to be in the /etc/sysconfig/ipmi
0864ef
        file (ex "timeout=60" so you might set interval to 50).
0864ef
0864ef
     So in the example described herein, the BMC BIOS setting is in 
0864ef
     minutes (5), and the "interval" and ipmi_watchdog "timeout" settings 
0864ef
     are both in seconds (50 and 60 respectively).  Therefore, the BMC 
0864ef
     hardware watchdog timer is set to expire and trigger a system power 
0864ef
     cycle unless reset by the watchdog daemon within 5 minutes, and the 
0864ef
     watchdog daemon will reset the timer every 60 seconds.
0864ef
0864ef
0864ef
     4. Start the Watchdog daemon:
0864ef
0864ef
      - execute "service watchdog start" 
0864ef
0864ef
0864ef
IMPORTANT:  To gracefully stop/kill the watchdog daemon, be sure
0864ef
to use "service watchdog stop" (which executes "kill -s SIGTERM <pid>")
0864ef
and do *not* use "kill -9 <pid>".  Using "kill -9 <pid>" will cause the 
0864ef
daemon to be shut off without stopping the BMC's watchdog timer, thus 
0864ef
a system reboot will be triggered when the BMC's watchdog timer expires.
0864ef
0864ef
Alternately, or in case the watchdog daemon is killed "ungracefully", 
0864ef
you can stop the BMC timer by executing the following ipmitool utility 
0864ef
command before the watchdog timer expires:
0864ef
0864ef
 # ipmitool -v raw 0x06 0x24 0x04 0x01 0x00 0x10 0x00 0x0a
0864ef
0864ef
----------------------------------------------------------------------
0864ef
0864ef
To test the watchdog after system configuration and setup:
0864ef
0864ef
.  Use kill -9 on the watchdog daemon so it doesn't shut down the watchdog daemon 
0864ef
   gracefully.  Verify that the system gets reset after the BMC timer expires.
0864ef
 
0864ef
.  Use "service watchdog stop" and verify that the watchdog daemon shuts off
0864ef
   the BMC watchdog timer gracefully (the system doesn't get reset).
0864ef
0864ef
.  Set the timer on the watchdog daemon to be greater than the time set in
0864ef
   the BMC BIOS for system reset and verify that the system is reset.
0864ef
0864ef
.  Set the timer on the daemon to be less than the time set in the
0864ef
   BMC timer and verify that the BMC watchdog is poked regularly and the 
0864ef
   system is not reset.
0864ef
0864ef
.  Test some of the other actions the BMC can take when the watchdog timer 
0864ef
   goes off (see modinfo ipmi_watchdog for some other settings to try).
0864ef