File pacemaker-crm_resource-OCF_RESKEY_crm_feature_set.patch of Package pacemaker.14737
commit aa584a7cf34a0e740f6d8249a7adabf358d66e41
Author: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Date: Fri Mar 10 14:31:33 2017 +0100
Low: tools: crm_resource should set OCF_RESKEY_crm_feature_set
Some resource agent relies on this environment variable during their
validate-all action to check the CRM feature set compatibility.
Without this environment variable, most of the --force-ACTION are
failing.
At least the Linbit/drbd and PAF (pgsqlms) agents are using it.
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
index ee7523fe2..e6a186a31 100644
--- a/tools/crm_resource_runtime.c
+++ b/tools/crm_resource_runtime.c
@@ -1508,6 +1508,10 @@ cli_resource_execute(const char *rsc_id, const char *rsc_action, GHashTable *ove
}
params = generate_resource_params(rsc, data_set);
+
+ /* add crm_feature_set env needed by some resource agents */
+ g_hash_table_insert(params, strdup(XML_ATTR_CRM_VERSION), strdup(CRM_FEATURE_SET));
+
op = resources_action_create(rsc->id, rclass, rprov, rtype, action, 0, -1, params, 0);
if(do_trace) {