HomeClusterLabs Projects

Refactor: pacemaker-attrd: make broadcast_local_value() more flexible

Description

Refactor: pacemaker-attrd: make broadcast_local_value() more flexible

... for future reuse.

Previously, broadcast_local_value() used PCMKATTRD_CMD_SYNC_RESPONSE to
override an update for a local value. The only difference between the handling
of that and PCMK
ATTRD_CMD_UPDATE is that a sync response causes recipients to
broadcast any values they have that aren't in the request, if the request came
from the writer.

Since in this case we're broadcasting a single value to (not from) the writer,
that's unnecessary, so send an update instead of a sync response.

Also, refactor the function to take the value rather than always use the local
node's, and expose the function internally to pacemaker-attrd.

Details

Provenance
kgaillotAuthored on Jan 23 2024, 1:23 PM
Parents
rPbefe43106388: Log: pacemaker-attrd: trace-log local-only attributes
Branches
Unknown
Tags
Unknown