I'm trying to set up a simple two-node cluster for a squid reverse
proxy, running on Debian etch (heartbeat 2.0.7). I'm using IPaddr
to manage an IP address resource and that works fine. Where I'm
having problems is in trying to add some local monitoring of squid,
with the end goal being to constrain the failover IP to only be
on a host which has a working squid.
My current problem appears to be getting the resource monitoring
script to actually be called.
I've imported the following resource:
<configuration>
<resources>
<primitive id="squid" class="ocf" type="squid" provider="heartbeat">
<operations>
<op id="monitor-squid" name="monitor" interval="10s" timeout="3s"/>
</operations>
</primitive>
</resources>
</configuration>
using "cibadmin -U -x squid.xml" without it complaining, and I've
placed a modified initscript that (I hope) conforms to OCF at
/usr/lib/ocf/resource.d/heartbeat/squid (mode 0755).
The HA log indicates it's trying to run the monitoring script but it
fails:
pengine[5220]: 2008/06/17_15:49:37 WARN: unpack_rsc_op:unpack.c Processing
failed op (squid_monitor_0) for squid on proxy-01
pengine[5220]: 2008/06/17_15:49:37 WARN: unpack_rsc_op:unpack.c Processing
failed op (squid_stop_0) for squid on proxy-01
pengine[5220]: 2008/06/17_15:49:37 WARN: unpack_rsc_op:unpack.c Handling failed
stop for squid on proxy-01
pengine[5220]: 2008/06/17_15:49:37 info: squid (heartbeat::ocf:squid): Started
proxy-01 (unmanaged) FAILED
Additionally, here's the output of crm_mon -1 -r
============
Last updated: Tue Jun 17 16:14:45 2008
Current DC: proxy-01 (fba966e8-2f7c-46bc-a8ce-4f225eb290ec)
2 Nodes configured.
2 Resources configured.
============
Node: proxy-01 (fba966e8-2f7c-46bc-a8ce-4f225eb290ec): online
Node: proxy-02 (e9bd1ab2-0957-4437-ab21-f0f6c772d26b): OFFLINE
Full list of resources:
IPaddr_10_22_151_40 (heartbeat::ocf:IPaddr): Started proxy-01
squid (heartbeat::ocf:squid): Started proxy-01 (unmanaged) FAILED
Running the script directly seems to work okay, so I added this line
to the start of the script:
echo "I AM BEING RUN as $0 $1 / $(date)" >> /tmp/superlog;
and restarted heartbeat. The /tmp/superlog file never appears, so it
appears the script is not being invoked at all. I also tried copying
it to a few other locations but with the same result.
This seems like a very simple problem and I must be something very
obvious, but I have no idea why the script doesn't seem to be being
run at all.
I've also tried changing the resource class to lsb and modifying
every script I think it might possibly want to run to append to
/tmp/superlog, but the file never gets created so it really seems
like it's never running any script.
Any help would be greatly appreciated. The full log is available
at: http://glum.quex.org/ha-log and the CIB can be viewed
at: http://glum.quex.org/cib.xml
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems