From bc84eb38d57e24649e799cd66f801c16d92c485e Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Feb 05 2021 06:23:14 +0000 Subject: Refactor: scheduler: use new resource parameter function when getting fence action timeout This means that the fence device's active node is used to evaluate the parameters, which will be of use if we ever support rules in fence device configuration. --- diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c index b07afbe..831f890 100644 --- a/lib/pengine/utils.c +++ b/lib/pengine/utils.c @@ -1099,12 +1099,12 @@ unpack_operation(pe_action_t * action, xmlNode * xml_obj, pe_resource_t * contai */ if (pcmk_is_set(pcmk_get_ra_caps(rsc_rule_data.standard), pcmk_ra_cap_fence_params) - && (pcmk__str_eq(action->task, RSC_START, pcmk__str_casei) - || is_probe) - && action->rsc->parameters) { + && (pcmk__str_eq(action->task, RSC_START, pcmk__str_casei) + || is_probe)) { - value = g_hash_table_lookup(action->rsc->parameters, - "pcmk_monitor_timeout"); + GHashTable *params = pe_rsc_params(action->rsc, action->node, data_set); + + value = g_hash_table_lookup(params, "pcmk_monitor_timeout"); if (value) { crm_trace("\t%s: Setting timeout to pcmk_monitor_timeout '%s', "