Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hello!
I use drbd-0.7.21. And I have written simple resource monitoring script which
reads Heartbeat resources list (/etc/ha.d/haresources) and for each resource
invokes its init-script with "status" argument. But my script whows that
drbddisk is always running. I have looked at it and found this:
...
case "$CMD" in
...
status)
if [ "$RES" = "all" ]; then
echo "A resource name is required for status inquiries."
exit 10
fi
ST=$( $DRBDADM state $RES 2>&1 )
STATE=${ST%/*}
if [ "$STATE" = "Primary" ]; then
echo "running"
elif [ "$STATE" = "Secondary" ]; then
echo "stopped"
else
echo "$ST"
fi
;;
...
So, the exit status from drbddisk is always 0. I think that it is not good for
resource managers because they didn't know whether resource actually running
or not.
What do you think?
Thanks.