[ClusterLabs] Inconsistent clone $OCF_RESOURCE_INSTANCE value depending on symmetric-cluster property.
Andrei Borzenkov
arvidjaar at gmail.com
Sat Apr 27 03:27:38 EDT 2019
Documentation says for clone resources OCF_RESOURCE_INSTANCE contains
primitive qualified by instance number, like primitive:1.
I was rather surprised that pacemaker may actually omit qualification at
least in the following case:
1. *start* pacemaker with symmetric-cluster=false
2. do not add constraints allowing primitive in clone definition run
anywhere
3. try to start clone
Resource agents get simple "primitive" for OCF_RESOURCE_INSTANCE instead
of "primitive:1".
Moreover, if now I set symmetric-cluster=true, pacemaker *continues* to
provide OCF_RESOURCE_INSTANCE without qualification!
If I *start* pacemaker with symmetric-cluster=true (default) pacemaker
provides qualified OCF_RESOURCE_INSTANCE and *continues* to do so even
after I set symmetric-cluster=false. Until next pacemaker restart.
node 1: ha1 \
attributes master-m_Stateful=10
node 2: ha2
primitive A Dummy \
op start interval=0 \
op_params interval=0
primitive B Dummy \
op start interval=0 \
op_params interval=0 \
meta target-role=Stopped
primitive fence_disk stonith:fence_scsi \
params devices="/dev/sdb"
primitive p_Stateful ocf:_local:Stateful_Test_1 \
op start interval=0
ms m_Stateful p_Stateful \
meta target-role=Stopped
location A-ha1 A 50: ha1
location A-ha2 A 30: ha2
location B-ha2 B 3: ha2
colocation B-with-A -inf: B A
property cib-bootstrap-options: \
dc-version="2.0.1+20190304.9e909a5bd-1.1-2.0.1+20190304.9e909a5bd" \
cluster-infrastructure=corosync \
stonith-enabled=true \
last-lrm-refresh=1551115646 \
have-watchdog=false \
symmetric-cluster=false
And after trying to start m_Stateful
OCF_RESOURCE_INSTANCE=Stateful_Test_1
OCF_RESOURCE_INSTANCE=p_Stateful
Now delete symmetric-cluster
node 1: ha1 \
attributes master-m_Stateful=10
node 2: ha2
primitive A Dummy \
op start interval=0 \
op_params interval=0
primitive B Dummy \
op start interval=0 \
op_params interval=0 \
meta target-role=Stopped
primitive fence_disk stonith:fence_scsi \
params devices="/dev/sdb"
primitive p_Stateful ocf:_local:Stateful_Test_1 \
op start interval=0
ms m_Stateful p_Stateful \
meta target-role=Started
location A-ha1 A 50: ha1
location A-ha2 A 30: ha2
location B-ha2 B 3: ha2
colocation B-with-A -inf: B A
property cib-bootstrap-options: \
dc-version="2.0.1+20190304.9e909a5bd-1.1-2.0.1+20190304.9e909a5bd" \
cluster-infrastructure=corosync \
stonith-enabled=true \
last-lrm-refresh=1551115646 \
have-watchdog=false
And try to start m_Stateful again
==== meta-data
OCF_RESOURCE_INSTANCE=Stateful_Test_1
==== start
OCF_RESOURCE_INSTANCE=p_Stateful
==== promote
OCF_RESOURCE_INSTANCE=p_Stateful
In case I miss something obvious - is it intentional? If no, should I
open bug report?
More information about the Users
mailing list