HomeClusterLabs Projects

Fix: scheduler: count disabled and blocked resources correctly

Description

Fix: scheduler: count disabled and blocked resources correctly

Previously, disabled and blocked resources were counted in common_print()
via resources' print() method, and the total number of resources was counted by
redundant code in crm_mon and crm_simulate. That resulted in incorrect counts
for a number of reasons.

Now, resources have a new count() method, to generate reasonable counts
appropriate to the resource variant, and the count is done at the end of
cluster_status(). A new scheduler flag pe_flag_no_counts controls whether the
count is done, since only crm_mon and crm_simulate actually need it. Doing the
counts is the default behavior, for backward compatibility.

Change the count description from "resources" to "resource instances", so it's
more obvious how each variant is counted. Each group member is counted
individually, each clone instance is counted individually, and each implicit
resource of each bundle replica is counted individually. This is the only
reasonable way to make the counts comparable, since individual instances may be
blocked.

Details

Provenance
kgaillotAuthored on Nov 6 2019, 5:47 PM
Parents
rP5463dd1eac5e: Refactor: scheduler: add library function for checking whether resource is…
Branches
Unknown
Tags
Unknown

Event Timeline