[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
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/20090810/f4c6e440/attachment.htm>
-------------- next part --------------
<?xml version="1.0"?>
<resource-agent name="mdmonitor" version="rgmanager 2.0">
<version>1.0</version>
<longdesc lang="en">
Resource for activating, deactivating and monitoring MD devices
</longdesc>
<shortdesc lang="en">
Resource for activating, deactivating and monitoring MD devices
</shortdesc>
<parameters>
<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"
</longdesc>
<shortdesc lang="en">
raid.conf filename
</shortdesc>
<content type="string"/>
</parameter>
<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
</longdesc>
<shortdesc lang="en">
Assembly Policy
</shortdesc>
<content type="string"/>
</parameter>
</parameters>
<actions>
<action name="start" timeout="5"/>
<action name="stop" timeout="5"/>
<action name="monitor" interval="10" timeout="5" />
<action name="meta-data" timeout="5"/>
</actions>
<special tag="rgmanager">
<attributes maxinstances="1"/>
</special>
</resource-agent>
More information about the Linux-cluster
mailing list