HomeClusterLabs Projects

Refactor: libcrmcluster: Drop redundancy in pcmk__node_name_from_uuid()

Description

Refactor: libcrmcluster: Drop redundancy in pcmk__node_name_from_uuid()

The only way a node can enter the crm_peer_cache is via
pcmkget_node(). In that function, if a node is not found in the cache
already, a new node object is allocated and added to the cache. The new
node object's uuid member is set to the return value of
pcmk
cluster_node_uuid() (if the uuid argument is empty, and it always
is empty within corosync.c and cpg.c when looking up a Corosync node).

For a Corosync node, pcmkcluster_node_uuid() calls
pcmk
corosync_uuid(). This returns a string representation of the
node's ID.

The point is that if a Corosync node has been added to the cache, then
we can find it based on ID if and only if we can find it based on UUID.

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

Details

Provenance
nrwahl2Authored on Thu, May 2, 4:16 AM
Parents
rP6cfc9de0c94f: Doc: libcrmcluster: Improve doxygen for pcmk__get_node()
Branches
Unknown
Tags
Unknown