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 +=