[ClusterLabs] pcs stonith update <id> <args> problems
Andrei Borzenkov
arvidjaar at gmail.com
Fri Jul 16 00:35:27 EDT 2021
On 16.07.2021 01:02, Digimer wrote:
> 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?
According to similar discussion a couple of days ago, you set attribute
to empty value: delay=""
More information about the Users
mailing list