HomeClusterLabs Projects

Low: tools: Fix one way to restart a cloned primitive.

Description

Low: tools: Fix one way to restart a cloned primitive.

If crm_resource is given both a node and the name of the cloned
primitive resource, it is meant to only restart the resource on that
node. However, it was previously being restarted on all nodes for two
reasons:

(1) stop_via_ban was not set due to us not inspecting the resource's
parent to see if it was a clone. The only way to stop a cloned resource
on a node is via bans.

(2) With stop_via_ban set, it would attempt to ban something like
"rsc:0", which is invalid. This would fail schema validation. Instead,
we need to simply ban the clone's ID on that node.

Note that this fixes the cases where the cloned primitive is specified
as "rsc" or as "rsc:0" on the command line.

Details

Provenance
clumensAuthored on Mar 17 2022, 1:19 PM
Parents
rP561b3935e8d7: Low: daemons, libs: Fix order of arguments to crm_log_xml_trace.
Branches
Unknown
Tags
Unknown