Hi!

my hints were for debugging your own RA, but you can also debug other people's 
RAs. Consider this script I wrote for one of my own RAs:
(blocktune-test.sh)
#RA=/usr/lib/ocf/resource.d/xola/blocktune
RA=./blocktune
if [ "$1" = "manual" ]; then
    shift
    OCF_ROOT=/usr/lib/ocf OCF_RESOURCE_INSTANCE=blocktune \
        OCF_RESKEY_blockdev="loop0" \
        OCF_RESKEY_parameter="queue/scheduler" \
        OCF_RESKEY_onvalue="noop" \
        OCF_RESKEY_offvalue="cfq" \
        sh -x $RA "$@"
    echo "Exit status is $?"
else
    /usr/sbin/ocf-tester -n multipath \
        -o blockdev="loop0" \
        -o parameter="queue/scheduler" \
        -o onvalue="noop" \
        -o offvalue="cfq" \
        $RA
fi
---
Note the "sh -x"! You'd use "./blocktune-test.sh manual 
start/stop/status/whatever" to test a single operation, and without parameters 
the usual ocf-tester would be used.
I guess you get the idea of how to adjust my sample script for your needs.
Hint: If you have installed the RA you should use the official path; other wise 
use the RA in the current directory

Regards,
Ulrich


_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to