Fix: libpacemaker: Respect clone-node-max for cloned groups
Currently, cloned groups may have more than clone-node-max instances
assigned to a given node. This can happen when a location constraint
exists for the clone.
For example, consider the case of the clone-recover-no-shuffle-5 test.
The cloned group prefers node1 with a score of 100. The location score
is applied only to a group's first member.
So in the early assignment attempt (within pcmk__assign_instances()), we
try to assign each instance (group) to its current node. However, the
first member prefers a different node (node1) and gets assigned there
instead. The second member has to follow the first due to the group's
internal colocation.
However, node1 wasn't the preferred node. So assign_instance() tries to
revert the assignment by calling pcmkunassign_resource() on the
instance (the group). But this leaves the group members assigned,
because pcmkunassign_resource() doesn't act recursively.
With this commit, pcmk__unassign_resource() acts recursively. We can now
unassign a resource and all its children recursively.
Fixes T678
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>