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

brem belguebli brem.belguebli at gmail.com
Mon Aug 10 17:11:28 UTC 2009


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:


case $1 in

start)                 ....................


stop)                ..........................


monitor)            ocf_log debug "at `/bin/date +%H:%M:%S`, launching
                        if [ $? -eq 33 ]; then

meta-data)        cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
                        exit $OCF_SUCCESS

*) echo "usage: $0 {start|stop|monitor|meta-data}"

Any idea ? Thanks

attached my meta-data
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20090810/f4c6e440/attachment.htm>
-------------- next part --------------
<?xml version="1.0"?>
<resource-agent name="mdmonitor" version="rgmanager 2.0">

    <longdesc lang="en">
        Resource for activating, deactivating and monitoring MD devices
    <shortdesc lang="en">
        Resource for activating, deactivating and monitoring MD devices


        <parameter name="raidconf" required="1">
            <longdesc lang="en">
                Name of the file containing the description of the array(s)
                Format is strict, must be "servicename"-raid.conf
                It will be  placed in /etc/cluster/"servicename"
            <shortdesc lang="en">
                raid.conf  filename
            <content type="string"/>

        <parameter name="policy" required="0">
           <longdesc lang="en">
                Policy to adopt at start, strict will prevent
                assembling any array partially thus causing the
                resource to fail.
                Quorum will allow partial start. If not defined,
                defaults to quorum
           <shortdesc lang="en">
                Assembly Policy
            <content type="string"/>


        <action name="start" timeout="5"/>
        <action name="stop" timeout="5"/>

        <action name="monitor" interval="10" timeout="5" />

        <action name="meta-data" timeout="5"/>

    <special tag="rgmanager">
        <attributes maxinstances="1"/>


More information about the Linux-cluster mailing list