File pacemaker-crmd-dont-abandon-fencing-after-one-no-devices-failure.patch of Package pacemaker.14737

commit ff8813761d1024de2bba3d813e3e8aacc698bb54
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Tue Apr 4 16:44:20 2017 -0500

    Fix: crmd: don't abandon fencing after one "no devices" failure

Index: pacemaker/crmd/te_callbacks.c
===================================================================
--- pacemaker.orig/crmd/te_callbacks.c
+++ pacemaker/crmd/te_callbacks.c
@@ -619,7 +619,6 @@ process_te_message(xmlNode * msg, xmlNod
 GHashTable *stonith_failures = NULL;
 struct st_fail_rec {
     int count;
-    int last_rc;
 };
 
 gboolean
@@ -638,9 +637,6 @@ too_many_st_failures(void)
         if (value->count > 10) {
             crm_warn("Too many failures to fence %s (%d), giving up", key, value->count);
             return TRUE;
-        } else if (value->last_rc == -ENODEV) {
-            crm_warn("No devices found in cluster to fence %s, giving up", key);
-            return TRUE;
         }
     }
     return FALSE;
@@ -657,7 +653,6 @@ st_fail_count_reset(const char *target)
 
     if (rec) {
         rec->count = 0;
-        rec->last_rc = 0;
     }
 }
 
@@ -683,8 +678,6 @@ st_fail_count_increment(const char *targ
         rec->count = 1;
         g_hash_table_insert(stonith_failures, strdup(target), rec);
     }
-    rec->last_rc = rc;
-
 }
 
 void
openSUSE Build Service is sponsored by