Serge Dubrouski escribió:
On Mon, Oct 27, 2008 at 12:07 PM, Adrian Chapela
<[EMAIL PROTECTED]> wrote:
Hello!
I am working on a cluster with a two Master/Slave instances.
I have: 2 drbd Master/Slave instance, 1 pingd clone instance, 1 group with
Filesystem resource.
ms-drbd0 is the first Master/Slave
ms-drbd1 is the second Master/Slave
mail_Group is the first group, it depends on ms-drbd0
samba_Group is the second group, it depends on ms-drbd1
I have the next rules:
<rsc_order id="mail-drbd0_before_fs0" from="Montaxe_mail" action="start"
to="ms-drbd0" to_action="promote"/>
<rsc_order id="samba-drbd1_before_fs0" from="Montaxe_samba" action="start"
to="ms-drbd1" to_action="promote"/>
(starts Montaxe_mail when ms-drbd0 has been promoted, start Montaxe_samba
when ms-drbd1 has been promoted. These rules are ok, I think)
<rsc_colocation id="mail_Group_on_ms-drbd0" to="ms-drbd0" to_role="master"
from="mail_Group" score="INFINITY"/>
<rsc_colocation id="samba_Group_on_ms-drbd1" to="ms-drbd1"
to_role="master" from="samba_Group" score="INFINITY"/>
(Run mail_Group only on the master node, run samba_Group on the master
node)
<rsc_location id="mail:drbd" rsc="ms-drbd0">
<rule id="rule:ms-drbd0" role="master" score="100">
<expression attribute="#uname" operation="eq" value="debianquagga2"/>
</rule>
<rule id="mail_Group:pingd:rule" score="-INFINITY" boolean_op="or">
<expression id="mail_Group:pingd:expr:undefined" attribute="pingd"
operation="not_defined"/>
<expression id="mail_Group:pingd:expr:zero" attribute="pingd"
operation="lte" value="0"/>
</rule>
</rsc_location>
<rsc_location id="samba:drbd" rsc="ms-drbd1">
<rule id="rule:ms-drbd1" role="master" score="100">
<expression attribute="#uname" operation="eq" value="debianquagga2"/>
</rule>
<rule id="samba_Group:pingd:rule" score="-INFINITY" boolean_op="or">
<expression id="samba_Group:pingd:expr:undefined" attribute="pingd"
operation="not_defined"/>
<expression id="samba_Group:pingd:expr:zero" attribute="pingd"
operation="lte" value="0"/>
</rule>
</rsc_location>
(Select debianquagga2 as Master and if the node lost its connection take
the score -INFINITY to do failover, it applies to ms-drbd0 and ms-drbd1)
With this rules all is working very well but the node selected as master
isn't "debianquagga2", Why could be the reason ?
I using Heartbeat 2.1.4
I have attached the cib xml file. If I delete two groups, Master is
debianQuagga2, If not, Master is debianQuagga1.
That probably has something to do with how scores are counted for
groups. In your rsc_location rule for masters you have a really low
score for assigning master role to debianquagga2. It's possible that
groups outscore them with default values. I'm not sure in that, that's
just mu guess. You probably can check this with show score scripts.
I will check that, thank you!
I'd try to assign rsc_location rules to groups, not to master role.
Your collocation rule will control that groups are on the same nodes
with the masters. Or you can try to increase your scores from 100 to
something higher.
Ok, but I need that node be a master before than start group because it
depends on the master / slave resource, is that possible changing
collocation ? Could you open my eyes with a simple example ?
_______________________________________________
Pacemaker mailing list
Pacemaker@clusterlabs.org
http://list.clusterlabs.org/mailman/listinfo/pacemaker
_______________________________________________
Pacemaker mailing list
Pacemaker@clusterlabs.org
http://list.clusterlabs.org/mailman/listinfo/pacemaker