On Jan 24, 2008, at 10:44 PM, Howard Pogoda wrote:

I am requesting suggestions to implement the following configuration:

N1 and N2 are nodes in a cluster running heartbeat.

N1 and N2 are identically configured, both running mysqld and a virtual IP as resources.

mysqld needs to simultaneously run on both nodes so that mysqld master-slave database sync can be maintained.

sounds like a good use for a master-slave resource type to me

   http://linux-ha.org/v2/Concepts/MultiState

you'll need to make some modifications to you resource agent though

mysqld is monitored by a OCF agent, and if there is a failure, fails the virtual IP to the other node.

this would then be achieved as colocation with the mysql instance running in master mode

Question: I have a cib.xml configured that achieves all goals, except mysqld only runs on one node at a time, thus mysql synchronization fails. I need to have mysqld run simultaneously on both nodes and only fail the virtual IP over if the OCF agent monitor function detects a problem. What is the recommended "best- practice" to achieve this goal? I have included my cib.xml, and would be grateful for any suggestions. Thanks in advance.

<cib admin_epoch="0" have_quorum="false" ignore_dtd="false" num_peers="2" cib_feature_revision="1.3" generated="false" num_updates="1" epoch="55" cib-last-written="Thu Jan 24 14:07:01 2008">
 <configuration>
   <crm_config>
     <cluster_property_set id="cib-bootstrap-options">
       <attributes>
<nvpair name="last-lrm-refresh" id="cib-bootstrap-options- last-lrm-refresh" value="1201204018"/>
       </attributes>
     </cluster_property_set>
   </crm_config>
   <nodes>
<node uname="N2" type="normal" id="216a5f87-c472-4ce6- a3f1-7ce4f6dc1bae"> <instance_attributes id="nodes-216a5f87-c472-4ce6- a3f1-7ce4f6dc1bae">
         <attributes>
<nvpair name="standby" id="standby-216a5f87-c472-4ce6- a3f1-7ce4f6dc1bae" value="off"/>
         </attributes>
       </instance_attributes>
     </node>
<node uname="N1" type="normal" id="d2c440e4-9668-4a70-b7e2- de7f52834325"> <instance_attributes id="nodes-d2c440e4-9668-4a70-b7e2- de7f52834325">
         <attributes>
<nvpair name="standby" id="standby-d2c440e4-9668-4a70- b7e2-de7f52834325" value="off"/>
         </attributes>
       </instance_attributes>
     </node>
   </nodes>
   <resources>
     <group ordered="true" collocated="true" id="group_mysql_IPaddr">
<primitive class="ocf" type="mysql" provider="heartbeat" id="resource_mysql">
         <instance_attributes id="resource_mysql_instance_attrs">
           <attributes>
<nvpair id="1b522913-ab4e-4196-94d0-2009722a449a" name="test_table" value="test.test"/> <nvpair id="177178ed-36d9-4c3d-bec0-46c0334dadc0" name="test_user" value="test"/> <nvpair id="92327250-85a9-4209-9364-a3d68417a320" name="test_passwd" value="test"/>
           </attributes>
         </instance_attributes>
         <operations>
<op name="monitor" description="Monitor_mysql" interval="10" timeout="10" start_delay="10" disabled="false" prereq="nothing" on_fail="fence" id="de1212d3-3032-4fc5-be98- c502aad3b4db" role="Started"/>
         </operations>
       </primitive>
<primitive id="resource_IPaddr" class="ocf" type="IPaddr2" provider="heartbeat">
         <instance_attributes id="resource_IPaddr_instance_attrs">
           <attributes>
<nvpair id="19d1c547-4ce9-4146-9eea-0a54377a05b1" name="ip" value="192.168.2.250"/>
           </attributes>
         </instance_attributes>
       </primitive>
       <instance_attributes id="group_mysql_IPaddr_instance_attrs">
         <attributes/>
       </instance_attributes>
     </group>
   </resources>
   <constraints>
<rsc_colocation id="colocation_" from="group_mysql_IPaddr" to="group_mysql_IPaddr" 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