On Tue, Jun 30, 2009 at 7:28 AM, MAHESH, SIDDACHETTY M (SIDDACHETTY
M)<[email protected]> wrote:
> Hi,
>
>  I have a setup with two nodes in the HA cluster. Both nodes share a virtual 
> IP (bound to the currently active node).

If the cluster software is running, then the node is active.

>There are two resources 'A' and 'B' - with 'B' depending on 'A'. By default, 
>resource 'A' runs on both nodes. I want resource 'B' to run on currently 
>active node (the one bound to the virtual IP). It should only run on the 
>passive node if the virtual IP migrates to the second node.
>
>  My question is - how to add the constraint rule for this scenario?

Look up rsc_colocation in one of the
http://clusterlabs.org/wiki/Documentation pdfs

> Can I access the 'ip' instance attribute of the 'IPAddr' resource agent in 
> the constraint rules?

No.

> I am looking for something similar to this.
>
> <primitive id="virt_ip" class="ocf" type="IPaddr" provider="heartbeat">
>        <instance_attributes id="virt_ip_attr">
>                <attributes>
>                        <nvpair id="virt_ip_ip" name="ip" value="10.10.10.10"/>
>                        <nvpair id="virt_ip_mask" name="cidr_netmask" 
> value="255.255.255.0"/>
>                        <nvpair id="virt_ip_nic" name="nic" value="eth0"/>
>                </attributes>
>        </instance_attributes>
> </primitive>
>
> <rsc_location id="run_B_on_node2" rsc="B_node2">
>        <rule id="run_B_node2_rule" score="200" boolean_op="and">
>                <expression id="run_B_node2_rule_expr" attribute="#uname" 
> operation="eq" value="NODE2"/>
>                <expression id="B_node2_virtualIP_rule_expr" attribute="#ip" 
> operation="eq" value="10.10.10.10"/>
>        </rule>
> </rsc_location>
>
>
> I am not sure if "#ip" can be used in attribute.
>
> Is there a better way to enforce this rule?
>
>
> Thanks,
> Mahesh
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
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