Page MenuHomeClusterLabs Projects

Try to make pcmk__search_node_caches() consistent
Open, WishlistPublic

Assigned To
None
Authored By
nrwahl2
Tue, Jan 14, 1:58 PM
Tags
  • Restricted Project
  • Restricted Project
Referenced Files
None
Subscribers

Description

The precedence of arguments is not obvious.

  • If both uname and xml_id are specified, we look up a remote node by uname only (both should be the same of course). Otherwise, if xml_id is specified, we use that.
  • If both id and xml_id are specified, we look up a cluster node by (cluster-layer) ID only. Otherwise, if xml_id is specified, we use that (and check whether the by-id result matches the by-name result).
  • If xml_id is specified, we look up a CIB-cached node by the XML ID only. Otherwise, if id is specified, we use a stringified version of id.

See https://github.com/ClusterLabs/pacemaker/pull/3796#discussion_r1914293732.

As Ken mentioned, documenting this current behavior might make it more confusing. However, it might be possible to at least make the precedence consistent. We'd have to ensure no existing callers' behavior is affected.

Event Timeline

nrwahl2 triaged this task as Wishlist priority.Tue, Jan 14, 1:58 PM
nrwahl2 created this task.
nrwahl2 created this object with edit policy "Restricted Project (Project)".