HomeClusterLabs Projects

Refactor: libpe_status: Handle overwrite directly in add_node_attrs()

Description

Refactor: libpe_status: Handle overwrite directly in add_node_attrs()

add_node_attrs() was the only remaining caller of
peunpack_dataset_nvpairs() that passed overwrite=TRUE. Handling the
overwrite directly within add_node_attrs() is less efficient (it
requires the creation of a temporary hash table), but it will allow us
to drop the overwrite argument from pe
unpack_dataset_nvpairs.

In the future we may be able to avoid the temporary table by reordering
some of the unpacking so that the highest-priority node state transient
attributes get unpacked before permanent node attributes. I'm not sure
whether the unpack_status() logic (particularly unpack_node_history(),
with its EAGAIN return value) will allow this.

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

Details

Provenance
nrwahl2Authored on Jul 9 2024, 3:32 PM
Parents
rPaa8f4fcd0dd2: Fix: libpe_status: Use first action meta-attr within nvset if duplicates
Branches
Unknown
Tags
Unknown