On Mon, May 26, 2008 at 2:24 PM, Florin <[EMAIL PROTECTED]> wrote:
> Andrew Beekhof schrieb:
>>>
>>> Hi,
>>> I changed the line from:
>>> ----------
>>> <rsc_colocation id="not_same" from="group_ve0" to="group_ve1"
>>> score="-INFINITY"/>
>>> ----------
>>> to:
>>> ----------
>>> <rsc_colocation id="not_same" from="group_ve1" to="group_ve0"
>>> score="-INFINITY"/>
>>> ----------
>>> and now it works, but I dont understand why, I thought the colocation is
>>> default to symetric or did I miss something?
>>
>> no, they've never defaulted to symmetric.
>> symmetric was a cheap hack for a design problem that was fixed quite
>> some time ago and I no longer recall.
>>
>> are you saying that with the first constraint, that the resources ran
>> on the same node?
>
> with the first constraint the migration of drbd1 from node2 to node3 will
> never trigered if node1 is dead. But with the second constraint it works
> perfekt.

The constraints say three things...

1) dont run the two resources on the same machine
2) if there is not enough machines for both resources to run, then
only run the one supplied as 'to='
3) decide where to put the 'to=' resource then put the 'from='
resource somewhere

This third aspect is what's causing you problems.

With:
  <rsc_colocation id="not_same" from="group_ve0" to="group_ve1"
score="-INFINITY"/>

group_ve1 gets to decide where it wants to run first. Naturally it
chooses node2 since that's where it's already running.
However then there are no nodes left for group_ve0.

With:
  <rsc_colocation id="not_same" from="group_ve1" to="group_ve0"
score="-INFINITY"/>

group_ve0 gets to decide where it wants to run first. It chooses node2
since that's the only place for it left and then group_ve1 chooses the
only node left - node3.

So far you're just masking the problem.

What you need to do, is create some more rsc_location constraints so
that under normal conditions, ve0 runs on node1 and ve1 runs on
_node3_.  Only after a node failure would one of them move to node2.
This has the advantage of giving you faster failovers since only one
group needs to be moved to a new node.

After two node failures, nothing will likely be running anyway (no
quorum) so the way you write the colocation rule is mostly irrelevant.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to