On Wednesday 29 October 2008 15:56:13 Andrew Beekhof wrote: ..... >> --- cib_group-res-constr.orig.xml 2008-10-29 11:09:47.000000000 +0100 >> +++ cib_group-res-constr.xml 2008-10-29 11:26:13.000000000 +0100 >> @@ -265,7 +265,7 @@ >> <rsc_colocation id="bgp-upc-colocate-with-ip_upc" >> from="service_bgp-upc" to="service_ip_upc" score="INFINITY"/> >> <rsc_order id="bgp-telekom-after-ip_telekom" >> from="service_bgp-telekom" type="after" to="service_ip_telekom" >> score="0"/> >> <rsc_colocation id="bgp-telekom-colocated-with-ip_telekom" >> from="service_bgp-telekom" to="service_ip_telekom" score="INFINITY"/> >> - <rsc_colocation id="bgp-upc-colocated-with-bgp_telekom" >> from="service_bgp-upc" to="service_bgp-telekom" score="1" >> symmetrical="true"/> > ^^^^^^^^^^^ > > My intention for this (^) was to loosely couple them together so > > they run > > together on the same host. If I decide to stop one of them and > > restart it > > after a while it should be colocated again with its "partner" ... if > > i decide > > to migrate only one of the two resources to another node the other > > resource > > should stay where it is running. > > This is not at all related what symmetrical does. > Symmetrical was a work-around for a problem a long time ago and no-one > should be setting it to true.
Aaah ... good to know ;-) ... so explicitely creating an extra advisory colocation constraint in the opposite direction is the way to go? ... > > Please correct me if I'am wrong but for me it looks like the score > > of the > > colocation is ignored and always INFINITY. > > not quite > > > I expected the advisory colocation > > constraint to not stop an already runing resource to fullfill the > > constraint ... is this a misinterpretion? > > no > > the problem was how non-matches were handled. > matches gained constraint.score (correct), but non-matches always got > set to -INFINITY (wrong). > > The following patch makes your scenario behave, I just need to run it > through the regression tests. Great, thanks Andrew! ... will this patch be available in Heartbeat 2.1.4? Regards, Andreas > > diff -r 61b457707d67 pengine/native.c > --- a/pengine/native.c Thu Oct 23 17:05:06 2008 +0200 > +++ b/pengine/native.c Wed Oct 29 15:53:02 2008 +0100 > @@ -762,9 +762,9 @@ colocation_match( > } > > } else if(do_check == FALSE || constraint->score >= INFINITY) { > - crm_debug_2("%s: %s.%s = -INFINITY (%s)", > constraint->id, rsc_lh- > > >id, > > - node->details->uname, > do_check?"failed":"unallocated"); > - node->weight = -INFINITY; > + crm_debug_2("%s: %s.%s -= %d (%s)", constraint->id, > rsc_lh->id, > + node->details->uname, constraint->score, > do_check?"failed":"unallocated"); > + node->weight = merge_weights(-constraint->score, > node->weight); > } > > ); ..... _______________________________________________ Pacemaker mailing list Pacemaker@clusterlabs.org http://list.clusterlabs.org/mailman/listinfo/pacemaker