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

Digimer lists at alteeve.ca
Fri Jul 16 11:04:21 EDT 2021

On 2021-07-16 10:48 a.m., kgaillot at redhat.com wrote:
> On Thu, 2021-07-15 at 18:02 -0400, 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;
> There are two better ways to do what you want that don't involve
> changing the configuration every time.
> (1) Priority fencing delay:
> https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Explained/singlehtml/index.html#cluster-options
> This was added in 2.0.4, and does exactly what you want. Just set the
> priority meta-attribute on your resources, and the priority-fencing-
> delay cluster property.
> (1) Attribute-based rules:
> https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Explained/singlehtml/index.html#document-rules
> If you don't have 2.0.4, you can use rules instead. pcs might not
> support it, though, so you might need to configure the XML.
> * Configure an ocf:pacemaker:attribute resource that's colocated with
> your main resource (this just sets a node attribute wherever it's
> active)
> * Configure the stonith delay in a rule-based attribute block, with a 0
> delay if the node attribute is "active" and a higher delay if it's
> "inactive"

Welp, this could have saved me a LOT of time, had I known. Haha!


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