HomeClusterLabs Projects

Low: scheduler: treat NULL and empty string the same in literal attributeā€¦

Description

Low: scheduler: treat NULL and empty string the same in literal attribute comparisons

Previously, expand_value_source() returned NULL if the value was the empty
string ("") only when value-source was "param" or "meta". If value-source was
literal, it would return the empty string.

This behavior shouldn't depend on value-source, so it now returns NULL when a
literal value is the empty string.

This could change the behavior for "defined"/"not_defined" checks, and
comparisons against another NULL or empty string value (NULL compares less than
empty strings). But the consistency seems worth it.

(Another question not addressed here is whether NULL and empty string should
compare as equal.)

Details

Provenance
kgaillotAuthored on Jan 7 2021, 1:08 PM
Parents
rPbf20b166b6e7: Low: scheduler: don't include timeout in secure digests
Branches
Unknown
Tags
Unknown

Event Timeline