File jsc#ECO-1611-0005-Feature-controller-request-fencing-with-any-enforced-1.1.patch of Package pacemaker.19778
From b42f6e38379b88d89b80dfc97746ebc2283ac359 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Wed, 18 Mar 2020 15:40:37 +0100
Subject: [PATCH 05/15] Feature: controller: request fencing with any enforced
priority fencing delay
---
crmd/te_actions.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/crmd/te_actions.c b/crmd/te_actions.c
index 19bb19990..8fcfcd925 100644
--- a/crmd/te_actions.c
+++ b/crmd/te_actions.c
@@ -164,6 +164,7 @@ te_fence_node(crm_graph_t * graph, crm_action_t * action)
const char *uuid = NULL;
const char *target = NULL;
const char *type = NULL;
+ const char *priority_delay = NULL;
gboolean invalid_action = FALSE;
enum stonith_call_options options = st_opt_none;
@@ -182,9 +183,11 @@ te_fence_node(crm_graph_t * graph, crm_action_t * action)
return FALSE;
}
+ priority_delay = crm_meta_value(action->params, XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY);
+
crm_notice("Requesting fencing (%s) of node %s "
- CRM_XS " action=%s timeout=%d",
- type, target, id, transition_graph->stonith_timeout);
+ CRM_XS " action=%s timeout=%u priority_delay=%s",
+ type, target, id, transition_graph->stonith_timeout, priority_delay);
/* Passing NULL means block until we can connect... */
te_connect_stonith(NULL);
@@ -193,8 +196,9 @@ te_fence_node(crm_graph_t * graph, crm_action_t * action)
options |= st_opt_allow_suicide;
}
- rc = stonith_api->cmds->fence(stonith_api, options, target, type,
- transition_graph->stonith_timeout / 1000, 0);
+ rc = stonith_api->cmds->fence_with_delay(stonith_api, options, target, type,
+ (int) (transition_graph->stonith_timeout / 1000),
+ 0, crm_atoi(priority_delay, "-1"));
stonith_api->cmds->register_callback(stonith_api, rc, transition_graph->stonith_timeout / 1000,
st_opt_timeout_updates,
--
2.26.1