HomeClusterLabs Projects

Refactor: libpacemaker: New stop_if_fail argument for assign() method

Description

Refactor: libpacemaker: New stop_if_fail argument for assign() method

...of resource_alloc_functions_t. This will allow us to do a fully
reversible assignment.

Currently pcmk__unassign_resource() undoes everything assignment-related
but can't undo changes to roles and actions.

Now, if stop_if_fail is true, the assign() method and
pcmk__assign_resource() behave as before.

If stop_if_fail is false and assignment succeeds, we can safely either
consider the assignment final or revert it via
pcmkunassign_resource(). If assignment fails, the effect is as if we
had called pcmk
unassign_resource(); there are no side effects on next
role or actions.

Ref T489

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Jun 24 2023, 12:30 AM
Parents
rP7b643c8a86ba: Refactor: libpacemaker: Return chosen node from assign_instance()
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task