HomeClusterLabs Projects

Low: daemons: Add host attr to the children of multi-update IPC messages.
3ab3c8e5d83eUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Low: daemons: Add host attr to the children of multi-update IPC messages.

attrd_client_update does a variety of transformations to the IPC message
it receives before it sends it off to all the peer attrd servers for
processing.

One of the things it does is handle a discrepancy between what a missing
host attribute means to the command line tools and what it means to the
attrd server. The server will apply the update on all nodes if the
attribute is missing, while command line tools want it to only be
applied on the local node.

For single-update IPC messages (or multi-update IPC messages on clusters
that do not support multi-update IPC messages), this is handled in the
"Inferring host" block. However, multi-update IPC messages never reach
this point. The multi message is simply fired off to the peers as-is,
without any host attribute.

The fix is to check each child message and add a host if missing. The
easiest way to do this is to just duplicate the "Inferring host" block.

Note that this also means that any other transformation in this function
that is not duplicated in this for loop will also not work for
multi-update messages. As of this commit, that includes:

  • Regexes
  • Value expansion with ++ and +=

Details

Provenance
clumensAuthored on Nov 16 2022, 4:49 PM

Commit No Longer Exists

This commit no longer exists in the repository.