HomeClusterLabs Projects

Low: libcrmcommon: Check correct env vars in pcmk__node_attr_target()

Description

Low: libcrmcommon: Check correct env vars in pcmk__node_attr_target()

All CRM_meta environment variables begin with OCF_RESKEY_. Here we add
the prefix.

Previously, we were checking variables that never existed.

It's likely that pcmk__node_attr_target() has never worked correctly
with container-attribute-target=host. Resource agents have worked around
this by calling ocf_attribute_target() from the resource-agents repo.

Note that this fix only applies to container images built using a
version of Pacemaker that includes the fix. Resource agents should
continue using ocf_attribute_target() for a while, in case they're run
by an older container. (The resource agents inside the Pacemaker source
tree are obviously exempt.)

Ref T733

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>