[ClusterLabs] pcs stonith update <id> <args> problems

Digimer lists at alteeve.ca
Thu Jul 15 18:02:21 EDT 2021


Hi all,

  I've got a predicament... I want to update a stonith resource to
remove an argument. Specifically, when resource move nodes, I want to
change the stonith delay to favour the new host. This involves adding
the 'delay="x"' argument to one stonith resource, and removing it from
the other;

Example;

====
# pcs cluster cib | grep -B7 -A7 '"delay"'
      <primitive class="stonith" id="ipmilan_node1" type="fence_ipmilan">
        <instance_attributes id="ipmilan_node1-instance_attributes">
          <nvpair id="ipmilan_node1-instance_attributes-ipaddr"
name="ipaddr" value="10.201.17.1"/>
          <nvpair id="ipmilan_node1-instance_attributes-password"
name="password" value="xxx"/>
          <nvpair id="ipmilan_node1-instance_attributes-pcmk_host_list"
name="pcmk_host_list" value="an-a02n01"/>
          <nvpair id="ipmilan_node1-instance_attributes-username"
name="username" value="admin"/>
          <nvpair id="ipmilan_node1-instance_attributes-delay"
name="delay" value="15"/>
        </instance_attributes>
        <operations>
          <op id="ipmilan_node1-monitor-interval-60" interval="60"
name="monitor"/>
        </operations>
      </primitive>
====

Here, the stonith resource 'ipmilan_node1' has the delay="15".

If I run:

====
# pcs stonith update ipmilan_node1 fence_ipmilan ipaddr="10.201.17.1"
password="xxx" username="admin"; echo $?
0
====

I see nothing happen in journald, and the delay argument remains in the
'pcs cluster cib' output. If, however, I do;

====
# /usr/sbin/pcs stonith update ipmilan_node1 fence_ipmilan
ipaddr="10.201.17.1" password="xxx" username="admin" delay="0"; echo $?
0
====

I can see in journald that the CIB was updated and can confirm in 'pcs
cluster cib' that the 'delay' value becomes '0'. So it seems that, if an
argument previously existed and is NOT specified in an update, it is not
removed.

Is this intentional for some reason? If so, how would I remove the delay
attribute? I've got a fairly complex stonith config, with stonith
levels. Deleting and recreating the config would be non-trivial.

Pacemaker v2.1.0, pcs v0.10.8.181-47e9, CentOS Stream 8.

digimer

-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould


More information about the Users mailing list