Hi group,

  I am using heartbeat v2.1.3. For various reasons, I am unable to upgrade this 
to pacemaker in the short term. I am having a annoying problem with my 
collocated resources. I think my cib.xml collocation rules may be a problem. I 
am attaching the cib.xml to this mail.

  The summary:
1. I have two nodes NODE_A and NODE_B. They have their own IP addresses and a 
virtual IP address (VIP == 192.168.1.100)

2. I have the following resources:
        a. 'ip_pair_group' for the virtual ip address.
        b. 'database' for the cloned database.
        c. 'app-grp' for the various application components.
        d. 'mon-agent' for monitoring the machine resources.

3. I have ordering and collocation rules that specify that the 'app-grp' and 
'mon-agent' should be collocated with 'ip_pair_group'.

The resources are started correctly. The 'ip_pair_group' resource is running on 
NODE_A. But, after a couple of minutes, both 'app-grp' and 'mon-agent' are 
stopped on NODE_A. 'Crm_verify' reports that these two resources cannot run 
anywhere. 'ptest' reports the same error.

debug: native_color: mon-agent: Pre-Processing colocation_mon-agent_ip_pair 
(ip_pair_group)
debug: native_print: Allocating: mon -rep-agent      (heartbeat::ocf:MONagent): 
     Stopped
debug: native_assign_node: Could not allocate a node for mon-agent
WARN: native_color: Resource mon-agent cannot run anywhere


Can someone take a look and let me know if there is something obviously wrong 
with the cib.xml? I have checked the syntax and it does not appear to be 
incorrect. Is it possible to figure out why the resources were brought down 
even when the collocation rules were applicable? 

I would like to keep the "virtual ip, app-grp, mon-agent" tuple co-located. 
When the virtual ip migrates to the other node, "app-grp and mon-agent" should 
also migrate. 

Thanks,
Mahesh


<cib admin_epoch="0" epoch="0" num_updates="0">   
	<configuration>
		<crm_config>
			<cluster_property_set id="bootstrap">
				<attributes>
					<nvpair id="default-resource-stickiness" name="default-resource-stickiness" value="300"/>
					<nvpair id="default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="-100"/>
					<nvpair id="symmetric-cluster" name="symmetric-cluster" value="false"/>
				</attributes>
			</cluster_property_set>
		</crm_config>
		<nodes/>
		<resources>

			<group id="ip_pair_group">
				<primitive id="ipaddress" class="ocf" type="IPaddr" provider="heartbeat">
					<instance_attributes id="ipaddress_attr">
						<attributes>
							<nvpair id="ipaddress_ip" name="ip" value="192.168.1.100"/>
							<nvpair id="ipaddress_netmask" name="cidr_netmask" value="255.255.255.0"/>
							<nvpair id="ipaddress_nic" name="nic" value="eth0"/>
						</attributes>
					</instance_attributes>
					<operations>
						<op id="ipaddress_monitor" name="monitor" interval="15s" timeout="30s" start_delay="10s"/>
					</operations>
				</primitive>
			
				<primitive id="ip_pair" class="ocf" type="VIPpair" provider="heartbeat">
					<operations>
						<op id="ip_pair_monitor" name="monitor" interval="15s" timeout="30s" start_delay="10s"/>
					</operations>
				</primitive>
			</group>

			<clone id="database">
				<instance_attributes id="database_attributes">
					<attributes>
						<nvpair id="database_clone_max" name="clone_max" value="2"/>
						<nvpair id="database_clone_node_max" name="clone_node_max" value="1"/>
						<nvpair id="database_globally_unique" name="globally_unique" value="false"/>
					</attributes>
				</instance_attributes>
				<group id="database-grp">
					<primitive id="database_server" class="lsb" type="database">
						<operations>
							<op id="database_server_monitor" name="monitor" interval="120s" timeout="60s" start_delay="90s"/>
						</operations>
					</primitive>
					<primitive id="database-bs_server" class="lsb" type="database-bs">
						<operations>
							<op id="database-bs_server_monitor" name="monitor" interval="120s" timeout="60s" start_delay="90s"/>
						</operations>
					</primitive>
				</group>
			</clone>

			<group id="app-grp">
				<primitive id="app1" class="lsb" type="app1">
					<operations>
						<op id="app1_monitor" name="monitor" interval="60s" timeout="30s" start_delay="30s"/>
					</operations>
				</primitive>
				<primitive id="app2" class="lsb" type="app2">
					<operations>
						<op id="app2_monitor" name="monitor" interval="60s" timeout="30s" start_delay="30s"/>
					</operations>
				</primitive>
			</group>

			<primitive id="mon-agent" class="ocf" provider="heartbeat" type="MONagent">
				<operations>
					<op id="mon-agent_monitor" name="monitor" interval="120s" timeout="60s" start_delay="90s"/>
					<op id="mon-agent_start" name="start" interval="0" timeout="720s"/>
				</operations>
			</primitive>
		</resources>
		<constraints>

			<rsc_location id="run_ip_pair_group" rsc="ip_pair_group">
				<rule id="run_ip_pair_group_node1_rule" score="100">
					<expression id="run_ip_pair_group_node1_rule_expr" attribute="#uname" operation="eq"
							value="NODE_A"/>
				</rule>
				<rule id="run_ip_pair_group_node2_rule" score="50">
					<expression id="run_ip_pair_group_node2_rule_expr" attribute="#uname" operation="eq"
			               value="NODE_B"/>
				</rule>
			</rsc_location>

			<rsc_location id="ipaddress_connected" rsc="ip_pair_group">
				<rule id="ipaddress_connected_rule" score="-INFINITY" boolean_op="or">
					<expression id="ipaddress_connected_rule_expr_undefined" attribute="pingd" operation="not_defined"/>
					<expression id="ipaddress_connected_rule_expr_zero" attribute="pingd" operation="lte" value="0"/>
				</rule>
			</rsc_location>

			<rsc_colocation id="colocation_mon-agent_ip_pair" from="mon-agent" to="ip_pair_group" score="INFINITY"/>

			<rsc_order id="order_start_mon-agent_after_ip_pair" from="mon-agent" to="ip_pair_group"/>

			<rsc_colocation id="colocation_app-grp_mon-agent" from="app-grp" to="mon-agent" score="INFINITY"/>

			<rsc_order id="order_start_app-grp_after_mon-agent" from="app-grp" to="mon-agent"/>
 
		</constraints>
	</configuration>
	<status/>
</cib>

_______________________________________________
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