[Linux-HA] heartbeat process conundrum

Nate Reed nreed at awarix.com
Fri Feb 24 13:44:35 MST 2006


In our cluster, Heartbeat is running mon.  I have a mon alert script that 
attempts to restart the cluster using /etc/init.d/heartbeat restart.

Since mon's parent is Heartbeat, the current process gets killed before it can 
start a new Heartbeat process.

Here is the command I'm using in Perl:

system("(/etc/init.d/heartbeat stop &)");

I was told opening it in a subshell (the part in ()'s) would create the 
process without the current process as the owner, and therefore the init 
script would run to completion.

But it never gets to the "StartHA" command in the init script.

Any ideas?  Is there a way to pass off control to an independent process that 
won't get killed when Heartbeat shuts down?

Here's the restart portion of /etc/init.d/heartbeat:

 restart)
        sleeptime=`ha_parameter deadtime`
        StopHA <-- Seems to die here
        Echo
        EchoNoNl Waiting to allow resource takeover to complete:
        sleep $sleeptime
        sleep 10 # allow resource takeover to complete (hopefully).
        echo_success
        Echo
        StartHA
        Echo
        ;;

Nate



More information about the Linux-HA mailing list