[Pacemaker] Master Slave resource

Andrew Beekhof andrew at beekhof.net
Wed Jan 19 12:06:00 UTC 2011


On Wed, Jan 19, 2011 at 9:47 AM, Andrew Beekhof <andrew at beekhof.net> wrote:
> On Sat, Dec 25, 2010 at 12:44 AM, ruslan usifov <ruslan.usifov at gmail.com> wrote:
>>
>>
>> 2010/12/20 Andrew Beekhof <andrew at beekhof.net>
>>>
>>> Actually the libxml2 guy and I figured out that problem just now.
>>> I can't find any memory corruption, but on the plus side, I does seem
>>> that 1.1 is unaffected - perhaps you could try that until I manage to
>>> track down the problem.
>>>
>> Sorry I badly have understood you. The problem exists?
>
> The problem exists in 1.0.x but not in 1.1.x
> There does not appear to be anything wrong with your configuration.

I believe this is the correct fix:


diff -r 3a1cab4892a4 pengine/master.c
--- a/pengine/master.c	Fri Jan 14 11:23:56 2011 +0100
+++ b/pengine/master.c	Wed Jan 19 13:04:31 2011 +0100
@@ -299,9 +299,12 @@ static void master_promotion_order(resou
 	 * master instance should/must be colocated with
 	 */
 	if(constraint->role_lh == RSC_ROLE_MASTER) {
+	    GListPtr work = rsc->allowed_nodes;
+	    rsc->allowed_nodes = NULL;
+
 	    crm_debug_2("RHS: %s with %s: %d", constraint->rsc_lh->id,
constraint->rsc_rh->id, constraint->score);
 	    rsc->allowed_nodes = constraint->rsc_rh->cmds->merge_weights(
-		constraint->rsc_rh, rsc->id, rsc->allowed_nodes,
+		constraint->rsc_rh, rsc->id, work,
 		constraint->node_attribute, constraint->score/INFINITY,
constraint->score==INFINITY?FALSE:TRUE);
 	}
 	);
@@ -312,9 +315,12 @@ static void master_promotion_order(resou
 	 * colocated with the master instance
 	 */
 	if(constraint->role_rh == RSC_ROLE_MASTER) {
+	    GListPtr work = rsc->allowed_nodes;
+	    rsc->allowed_nodes = NULL;
+
 	    crm_debug_2("LHS: %s with %s: %d", constraint->rsc_lh->id,
constraint->rsc_rh->id, constraint->score);
 	    rsc->allowed_nodes = rsc_merge_weights(
-		constraint->rsc_lh, rsc->id, rsc->allowed_nodes,
+		constraint->rsc_lh, rsc->id, work,
 		constraint->node_attribute, constraint->score/INFINITY, TRUE, TRUE);
 	}
 	);



More information about the Pacemaker mailing list