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
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.
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.