[prev in list] [next in list] [prev in thread] [next in thread] 

List:       drbd-dev
Subject:    [Drbd-dev] drbd-8.4.0-rc2 Pacemaker ocf resource agent script bugfix
From:       Eric Price <en () lightwerk ! com>
Date:       2011-06-01 12:02:30
Message-ID: 20110601140230.5cdf7c56 () ibiza ! lightwerk ! loc
[Download RAW message or body]

I dunno if you guys already spotted and/or fixed that in git.


The drbd resource agent makes a check in "dual primary configuration"
whether

> drbdadm <resource> -d -v dump

includes a line called

> allow-two-primaries;

however with 8.4.x drbdadmin reports that line as

> allow-two-primaries yes;

(even though drbd still accepts the old syntax in the config file)

Thus the regex grep in the resource agent doesn't find it, and the
resource startup fails.

My fix just checks for an optional [ yes] in front of the ; and the
resource management works again.


Hope that helps.


Cheers

-- 
Eric Price
Linux Solutions / Development

Lightwerk GmbH - www.lightwerk.com
Schulze-Delitzsch-Str. 38, 70565 Stuttgart
E-Mail: en@lightwerk.com

Geschäftsführender Gesellschafter: Veikko Wünsche
Amtsgericht Stuttgart, HRB 22214
Ust.-ID: DE 813315708


["drbd_resource.patch" (text/x-patch)]

--- drbd.ocf.orig	2011-06-01 13:08:05.331245528 +0200
+++ drbd.ocf		2011-06-01 13:08:04.597124211 +0200
@@ -867,7 +867,7 @@
 	case $__OCF_ACTION:$OCF_RESKEY_CRM_meta_master_max in
 	start:2|promote:2)
 		if ! $DRBDADM -d -v dump $DRBD_RESOURCE 2>/dev/null |
-			grep '^[[:space:]]*allow-two-primaries;$'
+			grep '^[[:space:]]*allow-two-primaries\( yes\)\?;$'
 		then
 			ocf_log err "master-max = 2, but DRBD resource $DRBD_RESOURCE does not allow-two-primaries."
 			return $OCF_ERR_CONFIGURED


_______________________________________________
drbd-dev mailing list
drbd-dev@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic