On Oct 25, 2010, at 12:42 PM, Tony Nelson wrote:

> Hi All,
> 
> I am running Heartbeat on Ubuntu Server 10.04.1 LTS.  I have a simple LSB 
> Bacula service setup.
> 
> According to the LSB Resource Agent page I found; 
> http://www.linux-ha.org/wiki/LSB_Resource_Agents , The status for stopped 
> scripts should return 3.
> 
> All of my init scripts return a 4 for services that could not access a PID.  
> For example:
> 
> tnel...@ihdb2:~$ /etc/init.d/bacula-fd status ; echo "result: $?"
> * could not access PID file for bacula-fd
> result: 4
> 
> tnel...@ihdb2:~$ /etc/init.d/rsync status ; echo "result: $?"
> * could not access PID file for rsync
> result: 4
> 
> I googled a bit and found several references suggesting that pidofproc should 
> return 3 instead of 4, and places where it seems to suggest it's fixed, but 
> it definitely is not on my systems.
> 
> I have a couple of ideas to work around this problem for now, but before I do 
> to much I thought I'd ask the community if there is already an agreed upon 
> solution that I should use.
> 

My first simple solution that actually worked was to wrap the standard 
bacula-fd init script with my own as follows:

#!/bin/sh

/etc/init.d/bacula-fd $*
result=$?
echo $result
if [ $result -eq 4 ]; then
        result=3
fi

return $result

It's not elegant, and it possibly masks other errors, but heartbeat no longer 
complains that it can't monitor the bacula-fd.

I may  hunt for a sample template to create an OCF Resource if this simple 
solution doesn't work or someone can tell me why my solution is a very bad idea.

Thanks again,
Tony Nelson

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to