• 237 Views

RH436 Cluster Query

In lab we have created two resources dlm and clvmd  as clones and then created constrain to start them in order and then colocation constraint. 

My question is why are we adding colocation constraints on clone ? Cloned resources are supposed to be running on all nodes anyway. I have faced similar issue in production where we had colocation contraints on cloned resources which resulted in unexpected results. 

So do we really need to have colocation contraint on cloned resources ? 
[root@nodea ~]# pcs resource create dlm controld op monitor interval=30s on-fail=fence clone interleave=true ordered=true

[root@nodea ~]# pcs resource create clvmd clvm op monitor interval=30s on-fail=fence clone interleave=true ordered=true

[root@nodea ~]# pcs constraint order start dlm-clone then clvmd-clone

[root@nodea ~]# pcs constraint colocation add clvmd-clone with dlm-clone

 

0 Kudos
3 Replies
sosys
Cadet
Cadet
  • 80 Views

Re: RH436 Cluster Query

Hi,

the first constraint is to ensure the order of the application start order (ie to start DLM and the clvm)

 

the 2nd constraint is to ensure that both resource are running on the same node.

Eventually, these resources are only running on 1 active node.

0 Kudos
Reply
Loading...
  • 74 Views

Re: RH436 Cluster Query

Hi, Yes you are correct but they are clones ; they are supposed to run on all nodes by default.

I can't think of the reason to add colocation constraint as running them on same condition will get fulfilled by them being clones. 

0 Kudos
Reply
Loading...
sosys
Cadet
Cadet
  • 68 Views

Re: RH436 Cluster Query

Hi,

The service is running, but only 1 is active as controlled by pacemaker.
The colocation constraint is just ensuring that that the same service runs on the same node, so in the event the active node get rebooted, the LVM will be quiesce and get re-elected to another active node (DLM and clvm)
0 Kudos
Reply
Loading...
Join the discussion
You must log in to join this conversation.