My comments are relative to the openais 0.80.5-15.1 RPM as obtained from the
pacemaker repo for RHEL5, and running on CentOS 5.3 with current patches.

On 24 Jun 09, Florian Haas submitted a patch against the openais init
script when running under RHEL distros regarding the chkconfig values.
The short version of that patch is:

8c8
< # chkconfig: - 20 20
---
> # chkconfig: - 75 05


However it turns out that this is not quite sufficient.  The init script
also fails to create a lock file.  Without that lockfile in place, the 
openais init script is not invoked when a graceful shutdown/reboot is 
performed on a node.  This (in my configuration) ultimately results in
the node getting stonith'd before it has completely shut down, which is 
impolite for DRBD et al.

Below is a patch which fixes this problem and has been tested (at least
on my cluster) to Do The Right Thing.  It must be applied in *addition*
to Florian's patch, not instead of it:

*** openais.chkconfig   Fri Oct  9 14:45:59 2009
--- openais.lockfile    Sat Oct 10 10:07:13 2009
***************
*** 24,30 ****
  
  do_force=0
  prog="aisexec"
! lockfile="/var/lock/subsys/$prog"
  
  SBD_CONFIG=/etc/sysconfig/sbd
  SBD_BIN="/usr/sbin/sbd"
--- 24,33 ----
  
  do_force=0
  prog="aisexec"
! 
! # lockfile base name must match name of this script, not $prog
! lockdir="/var/lock/subsys"
! lockfile="$lockdir/openais"
  
  SBD_CONFIG=/etc/sysconfig/sbd
  SBD_BIN="/usr/sbin/sbd"
***************
*** 87,92 ****
--- 90,102 ----
      if 
        internal_status
      then
+       # On Redhat systems, if the lockfile doesn't exist then when the
+       # system is shutting down it won't call this shutdown script.
+       # This can result in the node getting stonith'd when one
+       # attempts to do a graceful "shutdown -r now".  Don't create the
+       # file unless the directory exists in case we're on a distro that
+       # doesn't use this mechanism.
+       [ -d $lockdir ] && touch $lockfile
        echo "OK"
        return 0
      fi



BTW, this is my first migration from heartbeat 2 to pacemaker/openais.
Kudos to all who worked on the new stack.  Thanks.

Devin
-- 
        Everyone has a photographic memory.  Some don't have film.
                                                        - Steven Wright

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to