File jsc#ECO-1611-0005-Feature-controller-request-fencing-with-any-enforced.patch of Package pacemaker.26927

From a9eeb92248d03b06423c8a35ad611110c488c7c9 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Wed, 18 Mar 2020 15:40:37 +0100
Subject: [PATCH 5/9] Feature: controller: request fencing with any enforced
 priority fencing delay

---
 crmd/te_actions.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Index: pacemaker-1.1.18+20180430.b12c320f5/crmd/te_actions.c
===================================================================
--- pacemaker-1.1.18+20180430.b12c320f5.orig/crmd/te_actions.c
+++ pacemaker-1.1.18+20180430.b12c320f5/crmd/te_actions.c
@@ -153,6 +153,7 @@ te_fence_node(crm_graph_t * graph, crm_a
     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;
 
@@ -171,9 +172,11 @@ te_fence_node(crm_graph_t * graph, crm_a
         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);
@@ -182,8 +185,9 @@ te_fence_node(crm_graph_t * graph, crm_a
         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,
openSUSE Build Service is sponsored by