[Linux-cluster] Re: rgmanager ignoring monitor action for a custom resource script

brem belguebli brem.belguebli at gmail.com
Tue Aug 11 10:23:20 UTC 2009


Problem resolved,

rgmanager seems to rely on the 'status' action rather than on the 'monitor'
one.

Which doesn't seem to conform to the opencf API (
http://www.opencf.org/cgi-bin/viewcvs.cgi/*checkout*/specs/ra/resource-agent-api.txt?rev=1.10)
chapter 3.4.3 (is this doc outdated ?) that states that 'start' 'stop'
'monitor' and 'meta-data' are mandatory.


Regards



2009/8/10, brem belguebli <brem.belguebli at gmail.com>:
>
> Hi,
>
> I have written a custom resource script that starts,  stops and "meta-data"
> 's with the correct return  value (no error).
>
> Everything seems to work fine except the fact that rgmanager never runs the
> custom monitor action defined in my resource metadata.
>
> I have lowered the interval value for monitor action to 10 (  are the
> interval and timeout units in seconds by default ?) but nothing happens.
>
> I have added a trace to the monitor case of my resource script that ocf_log
> debug "monitor started at `date +%H:%M:%S`" but it never gets there:
>
>
> ----------------------------------------------8<--------------------------------------
>
> case $1 in
>
> start)                 ....................
>
>                        ;;
>
> stop)                ..........................
>
>                       ;;
>
> monitor)            ocf_log debug "at `/bin/date +%H:%M:%S`, launching
> monitor"
>                         check_conf
>                         check_status
>                         check_md_state
>                         if [ $? -eq 33 ]; then
>                                 repair
>                         fi
>                         ;;
>
> meta-data)        cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
>                         exit $OCF_SUCCESS
>                         ;;
>
> *) echo "usage: $0 {start|stop|monitor|meta-data}"
>                 ;;
> esac
>
> ---------------------------------------->8------------------------------------------------
>
> Any idea ? Thanks
>
> attached my meta-data
>
>
>
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20090811/5315cb3f/attachment.htm>


More information about the Linux-cluster mailing list