File bsc#1181744-0002-Fix-fencer-update-outdated-pending-operations-accord-1.1.patch of Package pacemaker.22685

81c50fabb Fix: fencer: update outdated pending operations according to returned ones from remote peer history
 fencing/history.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/fencing/history.c b/fencing/history.c
index 286a35549..1f36e97c8 100644
--- a/fencing/history.c
+++ b/fencing/history.c
@@ -359,7 +359,18 @@ stonith_merge_in_history_list(GHashTable *history)
             g_hash_table_lookup(stonith_remote_op_list, op->id);
 
         if (stored_op) {
-            continue; /* skip over existant - state-merging migh be desirable */
+            if (stored_op->state != st_failed
+                && stored_op->state != st_done
+                && (op->state == st_failed || op->state == st_done)) {
+                    crm_debug("Updating outdated pending operation %.8s "
+                              "(state=%d) according to the one (state=%d) from "
+                              "remote peer history",
+                              op->id, stored_op->state,
+                              op->state);
+
+            } else {
+                continue; // Skip existent
+            }
         }
 
         updated = TRUE;
-- 
2.26.2

openSUSE Build Service is sponsored by