Andrew Beekhof wrote:
On 6/26/06, James Pan <[EMAIL PROTECTED]> wrote:
I configured two resource groups namely "nfs" and "fs",
group "fs" contains one primitive resource: resource_fs which is a
filesystem,
the filesystem's device is set to an invalid device so that this
resource will always fail to start.
grou "nfs" contains one primitive resource resource_nfs which is a nfs
server.
this is the result of crm_resource -L:
-----------------------------------------------------------------
hadev1:~ # crm_resource -L
Resource Group: nfs
resource_nfs (lsb:nfsserver)
Resource Group: fs
resource_fs (heartbeat::ocf:Filesystem)
------------------------------------------------------------------
As the result, resource_nfs will be running and resource_fs will be
stopped.
Now I want these two resources to be colocated, so i add a colocation
constraint for them.
if I add the following colocation constraint:
<rsc_colocation id="colocation_nfs_fs" from="nfs" to="fs"
score="INFINITY"/>
nothing will change, resource_nfs will be still running and resources_fs
will be still stopped.
but if the constraint is:
<rsc_colocation id="colocation_nfs_fs" from="resource_nfs"
to="resource_fs" score="INFINITY"/>
this time resource_nfs will be stopped.
The only difference between the two constraints is the resource ids. one
uses the group ids and the other uses
the primitive resource ids. But the running result is different.
Is it a bug? It is easy to reproduce.
both work for me.
can you provide a configuration that does not?
_______
cib.xml is as the attachment. i reproduced the problem on a single node
cluster, OS is Fedora 4.
It seems order related. if group "nfs" is before group "fs" in the
cib.xml the problem will happen.
otherwise it works well.
[EMAIL PROTECTED] ~]# crm_resource -W -r resource_fs
resource resource_fs is NOT running
[EMAIL PROTECTED] ~]# crm_resource -W -r resource_nfs
resource resource_nfs is running on: jamesltc
[EMAIL PROTECTED] ~]# cat /var/lib/heartbeat/crm/cib.xml
<cib generated="true" admin_epoch="0" epoch="2" num_updates="107"
have_quorum="true" num_peers="1" cib_feature_revision="1.3"
crm-debug-origin="create_node_entry" cib-last-written="Wed Jun 28
12:46:42 2006" ccm_transition="1"
dc_uuid="cd13842c-3f58-4e7d-8126-685259527532">
<configuration>
<crm_config/>
<nodes>
<node id="cd13842c-3f58-4e7d-8126-685259527532" uname="jamesltc"
type="normal"/>
</nodes>
<resources>
<group id="nfs">
<primitive id="resource_nfs" class="lsb" type="nfs"
provider="heartbeat">
<instance_attributes id="resource_nfs_instance_attrs">
<attributes/>
</instance_attributes>
</primitive>
</group>
<group id="fs">
<primitive id="resource_fs" class="ocf" type="Filesystem"
provider="heartbeat">
<instance_attributes id="resource_fs_instance_attrs">
<attributes>
<nvpair id="24d3d088-4c2e-4051-a91f-fb9054c6903c"
name="device" value="/dev/hdb"/>
<nvpair id="fff00499-d867-4bbe-ad3d-49e023c8ac17"
name="directory" value="/data"/>
<nvpair id="a78a0c35-e67e-46a4-88ff-da44614ce83a"
name="fstype" value="ext2"/>
</attributes>
</instance_attributes>
</primitive>
</group>
</resources>
<constraints>
<rsc_colocation id="colocation_" from="nfs" to="fs"
score="INFINITY"/>
</constraints>
</configuration>
</cib>
[EMAIL PROTECTED] ~]#
________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
<cib generated="true" admin_epoch="0" epoch="2" num_updates="101" have_quorum="true" num_peers="1" cib_feature_revision="1.3" crm-debug-origin="create_node_entry" cib-last-written="Wed Jun 28 12:39:36 2006" ccm_transition="1" dc_uuid="cd13842c-3f58-4e7d-8126-685259527532">
<configuration>
<crm_config/>
<nodes>
<node id="cd13842c-3f58-4e7d-8126-685259527532" uname="jamesltc" type="normal"/>
</nodes>
<resources>
<group id="nfs">
<primitive id="resource_nfs" class="lsb" type="nfs" provider="heartbeat">
<instance_attributes id="resource_nfs_instance_attrs">
<attributes/>
</instance_attributes>
</primitive>
</group>
<group id="fs">
<primitive id="resource_fs" class="ocf" type="Filesystem" provider="heartbeat">
<instance_attributes id="resource_fs_instance_attrs">
<attributes>
<nvpair id="24d3d088-4c2e-4051-a91f-fb9054c6903c" name="device" value="/dev/hdb"/>
<nvpair id="fff00499-d867-4bbe-ad3d-49e023c8ac17" name="directory" value="/data"/>
<nvpair id="a78a0c35-e67e-46a4-88ff-da44614ce83a" name="fstype" value="ext2"/>
</attributes>
</instance_attributes>
</primitive>
</group>
</resources>
<constraints>
<rsc_colocation id="colocation_" from="fs" to="nfs" score="INFINITY"/>
</constraints>
</configuration>
</cib>
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/