Page MenuHomeClusterLabs Projects

Always execute metadata commands asynchronously in controller
Open, NormalPublic

Assigned To
Authored By
Jan 31 2024, 4:31 PM
  • Restricted Project
  • Restricted Project
Referenced Files


Currently, the controller initiates metadata actions on its own (not being told by the scheduler, and not executed via the executor, as all other resource actions are). Also, it executes metadata actions asynchronously when possible, but there are situations where it has to execute them synchronously. This has significant drawbacks:

  • Metadata actions are the only actions executed as the hacluster user instead of root.
  • Metadata actions are executed with a hardcoded 30s timeout, and ignore any timeout ignored in the CIB.
  • If any asynchronous action is pending when a synchronous metadata call is made, the asynchronous action could complete while waiting for the synchronous call, causing its SIGCHLD to be ignored and leaving it as a zombie process.

The scheduler should schedule a metadata action, as a normal resource action, when any other resource action requires metadata (crm_op_needs_metadata()), and order the metadata action before the other one. For this task, metadata actions needed for actions on a Pacemaker Remote node should be scheduled on the connection host's node, not the remote node. (Remote metadata poses enough problems to merit its own project.) Start and probe actions always require fresh metadata (not cached), so metadata actions needed for those should be marked in some way (such as a new meta-attribute). Metadata actions should not require quorum.

The action would be added to the graph normally, and the DC would farm it out to controllers normally.

When a controller processes a metadata action, and it isn't marked as above, the controller should consider the action successful immediately (like a pseudo-op) if the metadata is already cached. Otherwise, it would send the metadata action to its local executor as usual, and cache the metadata on success.

Once done, we can update Pacemaker Explained re: meta-data "is not performed as root".

Related Objects


Event Timeline

kgaillot triaged this task as Normal priority.Jan 31 2024, 4:31 PM
kgaillot created this task.
kgaillot created this object with edit policy "Restricted Project (Project)".
kgaillot added a parent task: Restricted Maniphest Task.
kgaillot added a subtask: Restricted Maniphest Task.

Why is this a subtask of a task that's already complete (T469)?

The "support or drop" part -- if we had decided to support it, this would have been a subtask. But we decided to drop it.