[Linux-HA] clone constraints

David.Livingstone at cn.ca David.Livingstone at cn.ca
Fri Jan 29 15:28:05 MST 2010


I have a new 2-node cluster I am attmpting to setup and I have run into
syntax issues with the constraints setion of the xml config. This setup
is a copy of a current cluster I have.

Both run rhel5 on proliant servers.

old setup:
libheartbeat2-2.99.2-8.1
heartbeat-resources-2.99.2-8.1
heartbeat-common-2.99.2-8.1
heartbeat-2.99.2-8.1
pacemaker-1.0.3-2.2
libpacemaker3-1.0.3-2.2

new setup(epel pkgs):
heartbeat           3.0.1-1.el5
heartbeat-libs      3.0.1-1.el5
pacemaker           1.0.7-2.el5
pacemaker-libs      1.0.7-2.el5
cluster-glue        1.0.1-1.el5
cluster-glue-libs   1.0.1-1.el5
corosync            1.2.0-1.el5
corosynclib         1.2.0-1.el5
resource-agents     1.0.1-1.el5


I attmpted to load the modified xml config from old to new and received 
errors :
root at wispoller2 configs]# cibadmin -V --replace --xml-file wispoller.xml
Call cib_replace failed (-47): Update does not conform to the configured 
schema/DTD

I then ran crm_verify -V --xml-file wispoller.xml and attempted to work 
through
resultant conflicts mostly by trial and error however when I got to the 
constraints
section I must admit I'm hooped.

Here are the last errors i recieved :

[root at wispoller2 configs]# crm_verify -V --xml-file wispoller.xml
wispollerv4.xml:98: element rsc_order: Relax-NG validity error : Expecting 
an element resource_set, got nothing
wispollerv4.xml:98: element rsc_order: Relax-NG validity error : Element 
rsc_order failed to validate content
wispollerv4.xml:88: element rsc_location: Relax-NG validity error : 
Element constraints has extra content: rsc_location
wispollerv4.xml:2: element configuration: Relax-NG validity error : 
Invalid sequence in interleave
wispollerv4.xml:2: element configuration: Relax-NG validity error : 
Element configuration failed to validate content
wispollerv4.xml:1: element cib: Relax-NG validity error : Element cib 
failed to validate content
crm_verify[26599]: 2010/01/29_11:15:59 ERROR: main: CIB did not pass 
DTD/schema validation
Errors found during check: config not valid
[root at wispoller2 configs]#


Below is the complete config. The question is how can the clone 
constraints be rewritten to conform ?

In addition I had to change :
<rule id="stonith_rule01" score="-INFINITY" boolean_op="and">
to :
<rule id="stonith_rule01" score="-INFINITY">

to allow it to pass ...

Thanks


wispoller.xml


<cib epoch="9" num_updates="2" admin_epoch="0" 
validate-with="pacemaker-1.0" crm_feature_set="3.0.1" have-quorum="1" 
dc-uuid="967c404e-2d58-49a7-977a-76e5a1d5f214">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<nvpair id="cib-bootstrap-options-dc-version" name="dc-version" 
value="1.0.7-d3fa20fc76c7947d6de66db7e52526dc6bd7d782"/>
<nvpair id="cib-bootstrap-options-cluster-infrastructure" 
name="cluster-infrastructure" value="Heartbeat"/>
</cluster_property_set>
</crm_config>
<nodes>
<node id="4a7332d6-e352-4315-ac88-ac080ed45e60" uname="wispoller1" 
type="normal"/>
<node id="967c404e-2d58-49a7-977a-76e5a1d5f214" uname="wispoller2" 
type="normal"/>
</nodes>
<resources>
<group id="grp_1">
<primitive id="IPaddr_165_115_204_218" class="ocf" provider="heartbeat" 
type="IPaddr">
<operations>
<op id="IPaddr_165_115_204_218_mon" name="monitor" interval="5s" 
timeout="5s"/>
</operations>
<instance_attributes id="params-IPaddr_165_115_204_218">
<nvpair id="IPaddr_165_115_204_218-addr" name="ip" 
value="165.115.204.218"/>
</instance_attributes>
</primitive>
<primitive id="drbddisk_2" class="heartbeat" type="drbddisk">
<operations>
<op id="drbddisk_2_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
<instance_attributes id="drbddisk_2_inst_attr">
<nvpair id="drbddisk_2_attr_1" name="1" value="r0"/>
</instance_attributes>
</primitive>
<primitive id="Filesystem_3" class="ocf" provider="heartbeat" 
type="Filesystem">
<operations>
<op id="Filesystem_3_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
<instance_attributes id="Filesystem_3_inst_attr">
<nvpair id="Filesystem_3_attr_0" name="device" value="/dev/drbd0"/>
<nvpair id="Filesystem_3_attr_1" name="directory" value="/drbd"/>
<nvpair id="Filesystem_3_attr_2" name="fstype" value="ext3"/>
<nvpair id="Filesystem_3_attr_3" name="options" value="defaults"/>
</instance_attributes>
</primitive>
<primitive id="rc.primary_5" class="lsb" type="rc.primary">
<operations>
<op id="rc.primary_5_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
</primitive>
</group>
<clone id="CL_stonithset_node01">
<meta_attributes id="CL_stonithset_node01-attr">
<nvpair id="CL_stonithset_node01_clone_node_max" name="clone_node_max" 
value="1"/>
</meta_attributes>
<primitive id="CL_stonith_node01" class="stonith" 
type="external/riloe-iders">
<operations>
<op id="CL_stonith_node01_monitor" name="monitor" interval="30s" 
timeout="20s"/>
</operations>
<instance_attributes id="CL_stonith_node01-attr">
<nvpair id="CL_stonith_node01_hostlist" name="hostlist" 
value="wispoller1"/>
<nvpair id="CL_stonith_node01_ilo_hostname" name="ilo_hostname" 
value="wispoller1-ilo"/>
<nvpair id="CL_stonith_node01_ilo_user" name="ilo_user" 
value="Heartbeat"/>
<nvpair id="CL_stonith_node01_ilo_password" name="ilo_password" 
value="xxxxxxxxxx"/>
<nvpair id="CL_stonith_node01_ilo_can_reset" name="ilo_can_reset" 
value="0"/>
<nvpair id="CL_stonith_node01_ilo_protocol" name="ilo_protocol" 
value="2.0"/>
<nvpair id="CL_stonith_node01_ilo_powerdown_method" 
name="ilo_powerdown_method" value="button"/>
</instance_attributes>
</primitive>
</clone>
<clone id="CL_stonithset_node02">
<meta_attributes id="CL_stonithset_node02-attr">
<nvpair id="CL_stonithset_node02_clone_node_max" name="clone_node_max" 
value="1"/>
</meta_attributes>
<primitive id="CL_stonith_node02" class="stonith" 
type="external/riloe-iders">
<operations>
<op id="CL_stonith_node02_monitor" name="monitor" interval="30s" 
timeout="20s"/>
</operations>
<instance_attributes id="CL_stonith_node02-attr">
<nvpair id="CL_stonith_node02_hostlist" name="hostlist" 
value="wispoller2"/>
<nvpair id="CL_stonith_node02_ilo_hostname" name="ilo_hostname" 
value="wispoller2-ilo"/>
<nvpair id="CL_stonith_node02_ilo_user" name="ilo_user" 
value="Heartbeat"/>
<nvpair id="CL_stonith_node02_ilo_password" name="ilo_password" 
value="xxxxxxxxxx"/>
<nvpair id="CL_stonith_node02_ilo_can_reset" name="ilo_can_reset" 
value="0"/>
<nvpair id="CL_stonith_node02_ilo_protocol" name="ilo_protocol" 
value="2.0"/>
<nvpair id="CL_stonith_node02_ilo_powerdown_method" 
name="ilo_powerdown_method" value="button"/>
</instance_attributes>
</primitive>
</clone>
</resources>
<constraints>
<rsc_location id="stonith_node01" rsc="CL_stonithset_node01">
<rule id="stonith_rule01" score="-INFINITY">
<expression id="stonith_expression01" attribute="#uname" operation="eq" 
value="wispoller1"/>
</rule>
</rsc_location>
<rsc_location id="stonith_node02" rsc="CL_stonithset_node02">
<rule id="stonith_rule02" score="-INFINITY">
<expression id="stonith_expression02" attribute="#uname" operation="eq" 
value="wispoller2"/>
</rule>
</rsc_location>
<rsc_colocation id="stonith_not_same" from="CL_stonithset_node02" 
to="CL_stonithset_node01" score="-INFINITY"/>
<rsc_location id="rsc_location_group_1" rsc="grp_1">
<rule id="prefered_location_group_1" score="100">
<expression attribute="#uname" id="prefered_location_group_1_expr" 
operation="eq" value="wispoller1"/>
</rule>
</rsc_location>
</constraints>
</configuration>
</cib>


More information about the Linux-HA mailing list