HomeClusterLabs Projects

Fix: controller: add node name to meta-data call environment

Description

Fix: controller: add node name to meta-data call environment

Resource agent invocations get all the environment variables defined for them
by the scheduler -- with the exception of meta-data calls, which do not go
through the scheduler but are executed directly by the controller.

This means that if a resource agent's meta-data action calls "crm_node -n"
(e.g. via the ocf_local_nodename function), it would (since b4606fb) try to
contact the controller to get the name -- but the controller would be blocking
on the synchronous meta-data call, and thus the meta-data call would eventually
time out.

Now, the controller adds the node name to the meta-data call's environment, so
"crm_node -n" does not need to contact the controller to get it.

This is a quick fix for the immediate issue; a full solution will be part of a
larger project to make the controller execute meta-data calls asynchronously
via the executor.

Fixes CLBZ#5357

Details

Provenance
kgaillotAuthored on Jul 4 2018, 6:27 PM
Parents
rP4a495656f543: Refactor: executor: add API function for meta-data call with parameters
Branches
Unknown
Tags
Unknown

Event Timeline