HomeClusterLabs Projects

Refactor: libpacemaker: Dead code in assign_instance()

Description

Refactor: libpacemaker: Dead code in assign_instance()

The instance has not yet been assigned when we call assign_instance(),
so pe_rsc_provisional is set. At early assignment time, there is no way
the instance could have been assigned. At final assignment time, the
instance may have been assigned early, so the caller
(pcmk__assign_instances()) checks the pe_rsc_provisional flag
explicitly. Checking in the caller allows us to avoid other unnecessary
work, so keep the check there.

Keep a CRM_CHECK() for sanity.

Ref T489

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

Details

Provenance
nrwahl2Authored on Jun 21 2023, 8:19 PM
Parents
rP2a977c1b5e92: Test: scheduler: Clone instances should not shuffle unnecessarily
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task