HomeClusterLabs Projects

Fix: tools: properly detect local node name

Description

Fix: tools: properly detect local node name

cibsecret had two serious problems when generating a list of other nodes to
sync secrets to:

  • It used uname -n to remove the local node from the list. If the local node name is different from its uname, this could cause local secrets to be removed from the local node rather than synced to other nodes.
  • It removed not just the local node name, but any node name that contained the local node name as a substring (e.g. "node1" and "node10"). This could cause secrets to not be synced to such nodes.

Now, use crm_node -n to determine the local node name, check crm_node for
errors to get better error messages, and remove only the node name that matches
the local node name in its entirety.

Details

Provenance
kgaillotAuthored on Aug 20 2020, 11:03 AM
Parents
rP3a88b2b6ce7a: Refactor: tools: rename function in cibsecret to be more clear
Branches
Unknown
Tags
Unknown

Event Timeline