Hi, On Fri, Sep 12, 2014 at 05:16:57PM -0300, Federico Castro wrote: > Great! Thanks for your tips. I found the problem. > > Bad substitution error in line 1646 > > L1646: sed -i "/${rep_mode_string//\//\\/}/d" $OCF_RESKEY_config > > was when trying to delete string "include > '/var/lib/pgsql/tmp/rep_mode.conf' # added by pgsql RA’” in my config file > "/etc/postgresql/9.1/main/postgresql.conf” > > It was caused because Debian 7 /bin/sh is a symlink to /bin/dash (/bin/sh > -> dash) and substitution is not working there, I changed script > interpreter to bash and it is working.
You should report this at github.com (or open bug with Debian). It looks like a bashism and pgsql is a POSIX shell. Thanks, Dejan > Thanks again. > > > 2014-09-12 3:13 GMT-03:00 Ulrich Windl <ulrich.wi...@rz.uni-regensburg.de>: > > > 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 _______________________________________________ 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