Hello Jayaprakash,
[ RESEND: Forgot to attach the verbose version of the ocf agent ]
> I execute these commands in both the machines in the stop state of
> heartbeat
> One more doubt please, i have to just copy the squid ocf file to
> /usr/lib/ocf/resource.d/heartbeat/squid alone or have to append the
> squid init script file and the ocf script file to
> /usr/lib/ocf/resource.d/heartbeat/squid?
What you did was the right thing to do.
> Jan 4 16:45:25 test1 crmd: [5488]: ERROR: process_lrm_event: LRM operation
> IPaddr_192_168_1_100_start_0 (call=5, rc=1) Error unknown error
we have a look at that later. First lets get that ocf agent of yours
running.
Which Linux Distribution do you use?
I attached a new version of the ocf squid agent which is a lot more
verbose. Please copy the attached agent over to
/usr/lib/ocf/resource.d/heartbeat/squid
, make it executable:
chmod +x /usr/lib/ocf/resource.d/heartbeat/squid
and do the thing from the previous e-mail again:
/usr/lib/ocf/resource.d/heartbeat/squid start && echo Succeeded || echo
Failed
/usr/lib/ocf/resource.d/heartbeat/squid start && echo Succeeded || echo
Failed
/usr/lib/ocf/resource.d/heartbeat/squid monitor && echo Succeeded ||
echo Failed
/usr/lib/ocf/resource.d/heartbeat/squid stop && echo Succeeded || echo
Failed
/usr/lib/ocf/resource.d/heartbeat/squid stop && echo Succeeded || echo
Failed
and send me the output. For some reason the ocf squid resource agent is unable
to perform standard operations on the init script. My best guess is that the
path is wrong, but we checked that. So lets have a closer look.
Thomas
#!/bin/bash
set -x
. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
INIT_SCRIPT=/etc/init.d/squid
case "$1" in
start)
${INIT_SCRIPT} start && exit || exit 1
;;
stop)
${INIT_SCRIPT} stop && exit || exit 1
;;
status)
${INIT_SCRIPT} status && exit || exit 1
;;
monitor)
# Check if Ressource is stopped
${INIT_SCRIPT} status || exit 7
# Otherwise check services (XXX: Maybe loosen retry / timeout)
wget -o /dev/null -O /dev/null -T 1 -t 1 http://localhost:3128/
&& exit || exit 1
;;
meta-data)
cat <<END
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
<resource-agent name="squid">
<version>1.0</version>
<longdesc lang="en">
OCF Ressource Agent on top of squid init script shipped with debian.
</longdesc>
<shortdesc lang="en">OCF Ressource Agent on top of squid init script shipped
with debian.</shortdesc>
<actions>
<action name="start" timeout="90" />
<action name="stop" timeout="100" />
<action name="status" timeout="60" />
<action name="monitor" depth="0" timeout="30s" interval="10s" start-delay="10s"
/>
<action name="meta-data" timeout="5s" />
<action name="validate-all" timeout="20s" />
</actions>
</resource-agent>
END
;;
esac
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems