[Pacemaker] Bug in "ping" pacemaker resource agent
Moritz Krinke
mkrinke at fotocommunity.net
Thu Jan 28 10:11:09 UTC 2010
Hello,
i was struggling with the ping resource agent since it stopped working and i had some log entries about syntax errors for "expr".
Around line 244 in the ping script, the score is getting calculated like this:
score=`expr $active * $OCF_RESKEY_multiplier`
This doesnt work since the asterisk "*" must be escaped.
I have no idea why it did work for some time, but this fixes it:
score=`expr $active \* $OCF_RESKEY_multiplier`
or one could use let instead of expr
let score=$active*$OCF_RESKEY_multiplier
but maybe the bash builtin is faster?
score=$((active * OCF_RESKEY_multiplier))
Regards,
Moritz
More information about the Pacemaker
mailing list