LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Heartbeat can't start script

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Heartbeat can't start script
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Fri, 17 Feb 2006 12:05:33 +0100
Hello,

Please ask linux-ha related questions on the linux-ha mailinglist, there are more experts on that list regarding linux-ha setups and problem debugging.

I don't know why heartbeat can't manage pound script (in resource.d)
pound script is:

Just from the looks of your script, this is bound to not work correctly.

#!/bin/bash
case $1 in
start)
                /etc/init.d/pound start   ####When do it manually it starts OK
                ;;
stop)
                /etc/init.d/pound stop  ####When do it manually it stops OK
                ;;
status)
                working= /bin/ps -A | grep pound >> /dev/null

It's impossible that this works, try following:

working=$(ps -A | grep pound)

otherwise you might also get happy using

working=$(pgrep pound)

Both methods are not completely safe with regard to process recognition, since processes in state sleep might get displayed without path but in brackets; pgrep or ps fail. This is especially true after a couple of weeks of having a resource running.

                if [ "$working" != "" ]; then
                        echo "running"
                        exit 0
                fi
                echo "DOWN"
                echo "running"

What exactly do you intend to do here? This cannot work. Read up on the API requirements for custom resource scripts regarding the status probing of linux-ha.

                ;;
*)
                echo "Syntax incorrect. You need one of {start|stop|status}"
                ;;
esac


My haresources is:
*******************************************************************************
prot14 10.2.1.36 10.2.1.82 IPaddr::192.168.2.52/24/eth1/192.168.2.255 IPaddr::192.168.2.53/24/eth1/192.168.2.255 killnfsd nfs-common nfs-kernel-server sleep::3 10.2.1.39 pound checkMPIup.py *******************************************************************************

I'd use IPaddr2 since you're assigning two local scope addresses, one assuming primary and the other secondary. IPaddr has had problems in this area in the past.

Any ideas?
When I start heartbeat, pound doesn't start but if I start it manually it works.

IIRC heartbeat does following to start a resource:

resource status
resource start

But read the documentation because I'm recalling this after not having worked on linux-ha for over 1 year.

Feb 17 11:06:22 localhost heartbeat[2938]: info: standby: acquire [all] resources from prot14 Feb 17 11:06:22 localhost heartbeat[4669]: info: acquire all HA resources (standby). Feb 17 11:06:23 localhost heartbeat: info: Acquiring resource group: prot14 10.2.1.36 10.2.1.82 IPaddr::192.168.2.52/24/eth1/192.168.2.255 IPaddr::192.168.2.53/24/eth1/192.168.2.255 killnfsd n fs-common nfs-kernel-server sleep::3 10.2.1.39 pound checkMPIup.py

pound is here but not started because most probably your script is flawed.

HTH,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

<Prev in Thread] Current Thread [Next in Thread>