On Jan 9, 2008, at 4:32 PM, Thomas Lorenzen wrote:

Hi'

--- Andrew Beekhof <[EMAIL PROTECTED]> skrev:

master/slave has a different meanings in v2.

what i think you want is something less complex...

* define two IP resources
* set the priority of the .3 resource to (for example)
1000 and to 500
for the .4 resource (this ensures that if only one node
is left, that .
3 will "push off" the .4 address)
* define a colocation rule between them and set
score=-INFINITY (which
means they cant run on the same node)

if you prefer one node in particular to run the .3
address, use a
rsc_location constraint to indicate this

check out some of the simple examples for something to
get hints from:
   http://linux-ha.org/v2/Examples/Simple

I have been playing around with your ideas and have
converged to a cib.xml file, which I think does, what I
would expect it to do. However, I am really a newcomer to
the format of the cib.xml file. Could I ask you to look
briefly at the attached file and indicate, if it reflects
your ideaas.

Thanks in advance.

Best regards.

Thomas.


Find din nye laptop på kelkoo.dk. Se de gode tilbud her - http://dk.yahoo.com/r/pat/mm <cib admin_epoch="0" have_quorum="true" ignore_dtd="false" num_peers="0" cib_feature_revision="1.3" generated="false" epoch="10" num_updates="1" cib-last-written="Wed Jan 9 15:06:48 2008" ccm_transition="1">
  <configuration>
    <crm_config>
      <cluster_property_set id="d7153259-f1e7-4ca4-93cb-c34275949ac2">
        <attributes>
<nvpair id="default-resource-stickiness" name="default- resource-stickiness" value="INFINITY"/>
        </attributes>
      </cluster_property_set>
    </crm_config>
    <nodes>
<node id="80cb5a3d-8c49-494d-bcca-f3501fb785a3" uname="host_a" type="normal"/> <node id="61d92fd4-cb19-42ef-a617-39b6e79de758" uname="host_b" type="normal"/>
    </nodes>
    <resources>
<primitive class="ocf" type="IPaddr" provider="heartbeat" id="primary"> <instance_attributes score="2000" id="0fbc4d26-4252-486e-9b84-63d0052039e1">

the score doesn't mean what you think it means in this context
to set the priority, add the snippet below (and modify for the other resource too)


          <attributes>
<nvpair name="ip" value="10.0.0.3" id="314e8e00-9d3f-4a72-9693-b46899bd4755"/>
          </attributes>
        </instance_attributes>

        <meta_attributes id="primary-meta-options">
          <attributes>
<nvpair name="priority" value="2000" id="primary-meta- priority"/>
          </attributes>
        </meta_attributes>


or just run (i think):
   crm_resource --meta -p priority -v 2000 -r primary


      </primitive>
<primitive class="ocf" type="IPaddr" provider="heartbeat" id="secondary"> <instance_attributes score="1000" id="72ef8121-2911-4629-8a15-59ac8d0378fa">
          <attributes>
<nvpair name="ip" value="10.0.0.4" id="017561a5-3eba-4aa1-acd7-cde8684e13b8"/>
          </attributes>
        </instance_attributes>
      </primitive>
    </resources>
    <constraints>
<rsc_colocation id="secondary_cannot_live_together_with_primary" from="secondary" to="primary" score="-INFINITY"/>
    </constraints>
  </configuration>
</cib>
_______________________________________________
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