Blame SOURCES/README.watchdog.ipmi

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