HomeClusterLabs Projects

Log: attrd: improve logging of CIB write result

Description

Log: attrd: improve logging of CIB write result

When attrd requests a write-out of a changed attribute value, it saves the new
value in attribute_value_t:requested so it can be used in a log when the write
completes (which may occur after the value has already changed again, so we
can't log the current value at that time).

Previously, the log call relied on libqb mapping a NULL pointer to "(null)".
To be safer, do that explicitly.

Also, it previously erased "requested" after the write completed, even if the
write failed and would be reattempted. Leave the value alone in this case so
the result of the reattempt can be logged correctly.

Details

Provenance
kgaillotAuthored on Dec 13 2023, 5:51 PM
Parents
rP9be38897eaa6: Refactor: attrd: convert value booleans to flags
Branches
Unknown
Tags
Unknown