HomeClusterLabs Projects

Low: controller: Populate nodes from peer cache if can't from cluster
b6b803ddcd2fUnpublished

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: controller: Populate nodes from peer cache if can't from cluster

This code has been wrong since it was added in 2012 by 8511b3e.

I'm surprised it doesn't seem to have caused issues, and changing it now
makes me nervous because who knows what code has been built around it...
but it looks CLEARLY wrong. It may have caused little or no impact
because we used controld_node_update_quick in the places where it would
have caused a problem.

pcmk__corosync_add_nodes() returns true if it found any nodes and added
them to node_list, and false otherwise. Until now, there have been two
possibilities:

  1. pcmk__corosync_add_nodes() adds nodes to the cache and the nodes section (node_list), and then the caller (populate_cib_nodes()) does the same thing again from the cache (the "hashtable").
  2. pcmk__corosync_add_nodes() fails to load any nodes. This set from_hashtable to FALSE, and so populate_cib_nodes() wouldn't load any nodes from the peer cache either.

Now, we try to load nodes from Corosync. If that fails, then we load
them from the peer cache.

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

Details

Provenance
nrwahl2Authored on Mar 29 2025, 1:37 AM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.