HomeClusterLabs Projects

Fix: controller: pre-load agent metadata asynchronously

Description

Fix: controller: pre-load agent metadata asynchronously

The controller needs resource agent metadata to record digests with pending and
completed resource actions.

Previously, metadata was collected synchronously when needed. This caused
several problems, two of which are fixed here for most actions: synchronous
execution blocks the controller from doing anything else (and if the agent's
metadata action tries to contact the controller, that blocks everything until
the action times out), and the metadata action ate into the real action's
timeout.

Now, if we're likely to need metadata for an action, attempt to get it
asynchronously before executing that action, so the metadata is available in
cache when needed.

This is not a complete solution, as there are other code paths that might
require metadata and still lead to synchronous execution, but it handles the
most important cases.

Fixes T554

Details

Provenance
kgaillotAuthored on Sep 15 2022, 2:33 PM
Parents
rP6a8ad8ae1bc4: Log: controller: improve messages when metadata cache update fails
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task