[Linux-HA] Monitor Bacula FD via LSB
tnelson at starpoint.com
Tue Oct 26 07:59:52 MDT 2010
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:
> tnelson at ihdb2:~$ /etc/init.d/bacula-fd status ; echo "result: $?"
> * could not access PID file for bacula-fd
> result: 4
> tnelson at 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:
if [ $result -eq 4 ]; then
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3839 bytes
Desc: not available
Url : http://lists.linux-ha.org/pipermail/linux-ha/attachments/20101026/00da07ef/attachment.bin
More information about the Linux-HA