HomeClusterLabs Projects

Fix: libpe_status: Support integer as rule type attribute

Description

Fix: libpe_status: Support integer as rule type attribute

The Pacemaker Explained doc has long described "integer" as a valid
value for the "type" attribute of a rule. However, libpe_status does not
support "integer" as the type attribute for a rule. Yet it parses
all "number"-type values as integers.

This commit updates libpe_status to accept "integer" as a rule's type
attribute and to parse integers as long longs instead of as ints.
"number"-type values will now be parsed as doubles. If the rule
evaluation defaults to a numeric comparison, then the type will be
set to "number" if either value contains a decimal point or to "integer"
otherwise. If a numeric parse fails, then the values will be compared as
strings.

Bump CRM_FEATURE_SET to 3.5.0.

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

Details

Provenance
nrwahl2Authored on Aug 14 2020, 4:12 AM
Parents
rP1130aac68579: Feature: libpe_status: Error-check and expand range of type="number"
Branches
Unknown
Tags
Unknown

Event Timeline