Blame SOURCES/015-fail-timeout.patch

8ba105
From 74171d10462e11e46c67c3aabbbc4e1185a334d4 Mon Sep 17 00:00:00 2001
8ba105
From: Andrew Beekhof <andrew@beekhof.net>
8ba105
Date: Wed, 11 Apr 2018 11:48:13 +1000
8ba105
Subject: [PATCH] Fix: rhbz#1565187 - Ensure failures that cause fencing are
8ba105
 not removed until after fencing completes
8ba105
8ba105
---
8ba105
 lib/pengine/unpack.c | 12 ++++++++++++
8ba105
 1 file changed, 12 insertions(+)
8ba105
8ba105
diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c
8ba105
index 355cdcf..3a4a7cc 100644
8ba105
--- a/lib/pengine/unpack.c
8ba105
+++ b/lib/pengine/unpack.c
8ba105
@@ -2949,6 +2949,7 @@ static bool check_operation_expiry(resource_t *rsc, node_t *node, int rc, xmlNod
8ba105
     }
8ba105
 
8ba105
     if (clear_reason != NULL) {
8ba105
+        node_t *remote_node = pe_find_node(data_set->nodes, rsc->id);
8ba105
         char *key = generate_op_key(rsc->id, CRM_OP_CLEAR_FAILCOUNT, 0);
8ba105
         action_t *clear_op = custom_action(rsc, key, CRM_OP_CLEAR_FAILCOUNT,
8ba105
                                            node, FALSE, TRUE, data_set);
8ba105
@@ -2957,6 +2958,17 @@ static bool check_operation_expiry(resource_t *rsc, node_t *node, int rc, xmlNod
8ba105
 
8ba105
         crm_notice("Clearing failure of %s on %s because %s " CRM_XS " %s",
8ba105
                    rsc->id, node->details->uname, clear_reason, clear_op->uuid);
8ba105
+
8ba105
+        if (is_set(data_set->flags, pe_flag_stonith_enabled)
8ba105
+            && rsc->remote_reconnect_interval
8ba105
+            && remote_node
8ba105
+            && remote_node->details->unclean) {
8ba105
+
8ba105
+            action_t *fence = pe_fence_op(remote_node, NULL, TRUE, NULL, data_set);
8ba105
+            crm_notice("Waiting for %s to complete before clearing %s failure for remote node %s", fence?fence->uuid:"nil", task, rsc->id);
8ba105
+
8ba105
+            order_actions(fence, clear_op, pe_order_implies_then);
8ba105
+        }
8ba105
     }
8ba105
 
8ba105
     crm_element_value_int(xml_op, XML_LRM_ATTR_INTERVAL, &interval);
8ba105
-- 
8ba105
1.8.3.1
8ba105