Am Dienstag, 17. Juni 2008 11:05 schrieb Michael Alger: > I'm trying to set up a simple two-node cluster for a squid reverse > proxy, running on Debian etch (heartbeat 2.0.7).
Use at least version 2.1.3 > 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). What does ocf-test tell you about your script? For writing OCF RA see: http://www.linux-ha.org/OCFResourceAgent Are the exit codes of start, stop and monitor correct if you execute the script manually? Hint: export OCF_ROOT=/usr/lib/ocf > 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 -- Dr. Michael Schwartzkopff MultiNET Services GmbH Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany Tel: +49 - 89 - 45 69 11 0 Fax: +49 - 89 - 45 69 11 21 mob: +49 - 174 - 343 28 75 mail: [EMAIL PROTECTED] web: www.multinet.de Sitz der Gesellschaft: 85630 Grasbrunn Registergericht: Amtsgericht München HRB 114375 Geschäftsführer: Günter Jurgeneit, Hubert Martens --- PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B Skype: misch42 _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
