[Pacemaker] Clone Resources Individual Configuration per Node
Felix Zachlod
fz.lists at sis-gmbh.info
Tue Apr 9 17:28:43 UTC 2013
Hello Jake,
> Might not be quite what your looking for but...
>
> http://crmsh.nongnu.org/crm.8.html#cmdhelp_configure
>
> Under that section find location and it talks about rule parameters
Yes I read that. But it does not work this way for the params section. I now
edited the XML and added the rules. CRM accepts this config but afterwards
states that it can only be shown in XML syntax. It seems to me that the
shell does not support a <rule> tag within an <instance_attributes>. But
anyway it simply does not seem to work as I expected. I have the following
in my config:
xml <primitive class="ocf" id="p_npiv_target_test" provider="onesty"
type="fctarget"> \
<instance_attributes
id="p_npiv_target_test-instance_attributes-storage-test-a" score="3"> \
<rule id="p_npiv_target_test-storage-a-hwtarget"
score="INFINITY"> \
<expression attribute="#uname"
id="p_npiv_target_test-storage-test-a-expr" operation="eq"
value="storage-test-a"/> \
</rule> \
<nvpair
id="p_npiv_target_test-instance_attributes-storage-test-a-parentwwpn"
name="parentwwpn" value="21:00:00:e0:8b:86:0e:cf"/> \
</instance_attributes> \
<instance_attributes
id="p_npiv_target_test-instance_attributes-storage-test-b" score="2"> \
<rule id="p_npiv_target_test-storage-b-hwtarget"
score="INFINITY"> \
<expression attribute="#uname"
id="p_npiv_target_test-storage-test-b-expr" operation="eq"
value="storage-test-b"/> \
</rule> \
<nvpair
id="p_npiv_target_test-instance_attributes-storage-test-b-parentwwpn"
name="parentwwpn" value="21:00:00:1b:32:88:66:c5"/> \
</instance_attributes> \
<instance_attributes id="p_npiv_target_test-instance_attributes"
score="1"> \
<nvpair id="p_npiv_target_test-instance_attributes-wwpn"
name="wwpn" value="77:00:00:00:00:00:01:01"/> \
<nvpair id="p_npiv_target_test-instance_attributes-wwnn"
name="wwnn" value="77:00:00:00:00:00:00:01"/> \
<nvpair
id="p_npiv_target_test-instance_attributes-parentwwpn" name="parentwwpn"
value="00:00:00:00:00:00:00:00"/> \
</instance_attributes> \
<operations> \
<op id="p_npiv_target_test-stop-0" interval="0" name="stop"
timeout="40s"/> \
</operations> \
<meta_attributes id="p_npiv_target_test-meta_attributes"> \
<nvpair id="p_npiv_target_test-meta_attributes-target-role"
name="target-role" value="Started"/> \
</meta_attributes> \
</primitive>
But it seems that it does not select the correct rule. I get the following
messages in my log (these come from my RA and indicate that it is being
invoked with different parameters):
Apr 9 19:09:23 storage-test-a fctarget[13730]: [13742]: ERROR: Parent WWPN
21:00:00:1b:32:88:66:c5 does not appear to exist in system
(of course, this is a wwpn belonging to storage-test-b but this is
storage-test-a)
[...]
Apr 9 19:15:14 storage-test-a fctarget[14626]: [14638]: ERROR: Parent WWPN
00:00:00:00:00:00:00:00 does not appear to exist in system
It seems no rule has been selected here and it has fallen back to the
default. It looks similar on the other node- but some times it seems that
the script is being called with the correct params (without changing the
cib, of course). I have no idea, why the crm seems to randomly select one of
the configurations.
Regards, Felix
More information about the Pacemaker
mailing list