HomeClusterLabs Projects

Fix: libpacemaker: Prevent CIB growth during crm_simulate --profile

Description

Fix: libpacemaker: Prevent CIB growth during crm_simulate --profile

This fixes a regression introduced by commit 8b9caad. It has not made it
into a release yet but may make it into 3.0.1.

That commit assumed that cluster_status() and pcmk__schedule_actions()
did not modify scheduler->input. However, if scheduler->input contains
guest nodes, then cluster_status() modifies it by creating a primitive
element for each guest node:

cluster_status
-> unpack_remote_nodes()

-> expand_remote_rsc_meta()
   -> pe_create_remote_xml()

As a result, if we run crm_simulate --profile --repeat=N, the
scheduler->input CIB grows with each repeat. At each iteration, any
guest nodes are unpacked into primitive elements, creating an increasing
number of duplicates.

The increasing input CIB size causes superlinear slowdowns in
crm_simulate --profile as the number of repeats increases.

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

Details

Provenance
nrwahl2Authored on Wed, Jun 18, 8:35 PM
Parents
rP0e50cea7d690: Doc: libpe_status: cluster_status() may modify scheduler->input
Branches
Unknown
Tags
Unknown