Skip to content

Commit

Permalink
Fix: crmd: don't abandon fencing after one "no devices" failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kgaillot committed Apr 4, 2017
1 parent 9d912a0 commit ff88137
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions crmd/te_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ process_te_message(xmlNode * msg, xmlNode * xml_data)
GHashTable *stonith_failures = NULL;
struct st_fail_rec {
int count;
int last_rc;
};

gboolean
Expand All @@ -652,9 +651,6 @@ too_many_st_failures(void)
if (value->count > stonith_max_attempts ) {
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;
Expand All @@ -671,7 +667,6 @@ st_fail_count_reset(const char *target)

if (rec) {
rec->count = 0;
rec->last_rc = 0;
}
}

Expand All @@ -697,8 +692,6 @@ st_fail_count_increment(const char *target, int rc)
rec->count = 1;
g_hash_table_insert(stonith_failures, strdup(target), rec);
}
rec->last_rc = rc;

}

void
Expand Down

0 comments on commit ff88137

Please sign in to comment.