Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Tue, Jul 26, 2011 at 02:10:42PM +0200, Dominik Klein wrote: > Hi > > as discussed on IRC with fghaas, I see an error with a setup of drbd > 8.4, pacemaker 1.1.5 and corosync 1.4 > + drbd_update_master_score > + : == DEBUG == Secondary/UpToDate/UpToDate/ == > + ocf_log err 'dk dk dk Secondary///' Very ugly :( Though it makes a difference whether you put ${X[*]//something} in double quotes or not, so what you are logging there may be something different from what is evaluated by the case statement. Still, this is a bash bug. I hope we can help bash a bit there, by not substituting to an empty string, like this: diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf index 3277caa..b16148a 100644 --- a/scripts/drbd.ocf +++ b/scripts/drbd.ocf @@ -339,7 +339,7 @@ drbd_update_master_score() { # For multi volume, we need to compare who is "better" a bit more sophisticated. # The ${XXX[*]//UpToDate}, without being in double quotes, results in a single space, # if all are UpToDate. - case ${DRBD_ROLE_LOCAL[*]}/${DRBD_DSTATE_LOCAL[*]//UpToDate}/${DRBD_DSTATE_REMOTE[*]//UpToDate}/ in + case ${DRBD_ROLE_LOCAL[*]}/${DRBD_DSTATE_LOCAL[*]//UpToDate/ }/${DRBD_DSTATE_REMOTE[*]//UpToDate/ }/ in *Primary*/\ /*/) # I am Primary, all local disks are UpToDate set_master_score 10000 If that does not help, we would need to completely code around that, and first do some iterations over the various state arrays to gather "global" information, then evaluate that in several if statements. -- : Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. __ please don't Cc me, but send to list -- I'm subscribed