I have a corosync cluster involving several machines that have different roles within the cluster. I have some clone resources grouped together and I set up everything to behave as an opt-in cluster:
node dir01
node dir02
node ms01
node ms02
node ms03
primitive pri_clvmd lsb:clvm \
op monitor interval="120" timeout="20" \
op start interval="0" timeout="30" \
op stop interval="0" timeout="30"
primitive pri_dlm ocf:pacemaker:controld \
op monitor interval="120" timeout="30" \
op start interval="0" timeout="90" \
op stop interval="0" timeout="100"
group grp_cluster_storage pri_dlm pri_clvmd
clone cln_cluster_storage grp_cluster_storage \
meta ordered="true" interleave="true" target-role="Started"
location LOC_CLUSTER-STORAGE1 cln_cluster_storage inf: ms01
location LOC_CLUSTER-STORAGE2 cln_cluster_storage inf: ms02
location LOC_CLUSTER-STORAGE3 cln_cluster_storage inf: ms03
property $id="cib-bootstrap-options" \
dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
cluster-infrastructure="openais" \
expected-quorum-votes="3" \
stonith-enabled="false" \
last-lrm-refresh="1390076650" \
no-quorum-policy="ignore" \
symmetric-cluster="false"
So far, so good, everything seems to work just fine at that stage however one of the thing I want to acheive is to be able to add hosts in the cluster without having to modify the cib configuration. With the above config, whenver I need a new host (let's say ms04), I would have to add a new location constraint.
Is there any way around that?
kind of an answer to my own question:
what I am trying to do is probably not painless at the moment. however, forthcoming pacemaker should show that by implementing support for region x in location constraints:
Quoted from http://blog.clusterlabs.org/blog/2013/announcing-1-dot-1-11-beta-testing/
"PE: Allow location constraints to take a regex pattern to match against resource IDs"