diff -Nru pacemaker-1.1.6/debian/changelog pacemaker-1.1.6/debian/changelog --- pacemaker-1.1.6/debian/changelog 2014-04-04 16:27:43.000000000 +0000 +++ pacemaker-1.1.6/debian/changelog 2014-05-02 20:47:36.000000000 +0000 @@ -1,3 +1,9 @@ +pacemaker (1.1.6-2ubuntu3.3) precise; urgency=high + + * Removed buggy logic that tried to prevent rare secondary dc fencing (LP: #1312156) + + -- Rafael David Tinoco Fri, 02 May 2014 15:47:36 -0500 + pacemaker (1.1.6-2ubuntu3.2) precise; urgency=low * debian/patches/Low-cib-If-we-received-the-message-the-peer-is-activ.patch: diff -Nru pacemaker-1.1.6/debian/patches/remove-buggy-logic-to-prevent-secondary-dc-fencing.patch pacemaker-1.1.6/debian/patches/remove-buggy-logic-to-prevent-secondary-dc-fencing.patch --- pacemaker-1.1.6/debian/patches/remove-buggy-logic-to-prevent-secondary-dc-fencing.patch 1970-01-01 00:00:00.000000000 +0000 +++ pacemaker-1.1.6/debian/patches/remove-buggy-logic-to-prevent-secondary-dc-fencing.patch 2014-05-02 20:47:33.000000000 +0000 @@ -0,0 +1,132 @@ +Description: Remove buggy logic to prevent secondary dc fencing + +On logic before commit 82aa2d8d17 the node responsible for fencing +(executioner) the dc was responsible also for updating cib. If this +update failed (due to a executioner fail, for ex) the dc would be +fenced a second time because the cluster would not know about fencing +result. + +On upstream commit 82aa2d8d17, a logic trying to avoid this second +dc fencing was introduced. If this node was not the dc fence executioner +it would keep its name. With its name, in the case executioner node +died and this node became the new dc it would be able to update cib +telling the result of last dc fencing. Problem is that this list +is never cleaned and there might be cases wrong cib update is given +(when a dc takeover has to run) resulting in a bad, bad thing: same +resource running on different nodes. + +It is much more acceptable for SRU to restore old behavior, known to +be safe even if it implies killing dc twice, than to backport several +pieces of code to implement a logic that was not there on the stable +version release. + +Commit: upstream, e49fbb4566c5641fd539843ffb66f082aa2d8d17 +Bug: https://www.mail-archive.com/pacemaker@oss.clusterlabs.org/msg19509.html +Author: Andrew Beekhof + +* needed for bug #1312156 + +--- + crmd/election.c | 11 ----------- + crmd/te_utils.c | 28 +++++++++++++--------------- + crmd/tengine.h | 1 - + 3 files changed, 13 insertions(+), 27 deletions(-) + +diff --git a/crmd/election.c b/crmd/election.c +index 412397d..20665da 100644 +--- a/crmd/election.c ++++ b/crmd/election.c +@@ -28,7 +28,6 @@ + #include + #include + #include +-#include + + GHashTable *voted = NULL; + uint highest_born_on = -1; +@@ -485,7 +484,6 @@ do_dc_takeover(long long action, + { + int rc = cib_ok; + xmlNode *cib = NULL; +- GListPtr gIter = NULL; + static const char *cluster_type = NULL; + + if(cluster_type == NULL) { +@@ -498,15 +496,6 @@ do_dc_takeover(long long action, + crm_info("Taking over DC status for this partition"); + set_bit_inplace(fsa_input_register, R_THE_DC); + +- for(gIter = stonith_cleanup_list; gIter != NULL; gIter = gIter->next) { +- char *target = gIter->data; +- const char *uuid = get_uuid(target); +- send_stonith_update(NULL, target, uuid); +- crm_free(target); +- } +- g_list_free(stonith_cleanup_list); +- stonith_cleanup_list = NULL; +- + #if SUPPORT_COROSYNC + if(is_classic_ais_cluster()) { + send_ais_text(crm_class_quorum, NULL, TRUE, NULL, crm_msg_ais); +diff --git a/crmd/te_utils.c b/crmd/te_utils.c +index da59a2e..a7189c2 100644 +--- a/crmd/te_utils.c ++++ b/crmd/te_utils.c +@@ -30,7 +30,6 @@ + + GCHSource *stonith_src = NULL; + crm_trigger_t *stonith_reconnect = NULL; +-GListPtr stonith_cleanup_list = NULL; + + static gboolean + fail_incompletable_stonith(crm_graph_t *graph) +@@ -180,21 +179,20 @@ tengine_stonith_notify(stonith_t *st, const char *event, xmlNode *msg) + #endif + + if(rc == stonith_ok && safe_str_eq(target, origin)) { +- if(fsa_our_dc == NULL || safe_str_eq(fsa_our_dc, target)) { +- crm_notice("Target was our leader %s (recorded: %s)", +- target, fsa_our_dc?fsa_our_dc:""); +- /* Given the CIB resyncing that occurs around elections, +- * have one node update the CIB now and, if the new DC is different, +- * have them do so too after the election +- */ +- if(safe_str_eq(executioner, fsa_our_uname)) { +- const char *uuid = get_uuid(target); +- send_stonith_update(NULL, target, uuid); +- } else { +- stonith_cleanup_list = g_list_append(stonith_cleanup_list, crm_strdup(target)); +- } ++ if(fsa_our_dc == NULL || safe_str_eq(fsa_our_dc, target)) { ++ const char *uuid = get_uuid(target); ++ crm_notice("Target was our leader %s/%s (recorded leader: %s)", ++ target, uuid, fsa_our_dc?fsa_our_dc:""); ++ /* There's no need for everyone to update the cib. ++ * Have the node that performed the op do the update too. ++ * In the unlikely event that both die, the DC would be ++ * shot a second time which is not ideal but safe. ++ */ ++ if(safe_str_eq(executioner, fsa_our_uname)) { ++ send_stonith_update(NULL, target, uuid); ++ } ++ } + } +- } + } + + gboolean +diff --git a/crmd/tengine.h b/crmd/tengine.h +index f5e0cb0..33f94fd 100755 +--- a/crmd/tengine.h ++++ b/crmd/tengine.h +@@ -22,7 +22,6 @@ + #include + #include + extern stonith_t *stonith_api; +-extern GListPtr stonith_cleanup_list; + extern void send_stonith_update(crm_action_t *stonith_action, const char *target, const char *uuid); + + /* tengine */ +-- +1.9.1 + diff -Nru pacemaker-1.1.6/debian/patches/series pacemaker-1.1.6/debian/patches/series --- pacemaker-1.1.6/debian/patches/series 2014-04-03 14:26:16.000000000 +0000 +++ pacemaker-1.1.6/debian/patches/series 2014-05-02 20:47:33.000000000 +0000 @@ -1,3 +1,4 @@ raexecupstart.patch cib-segfault.patch Low-cib-If-we-received-the-message-the-peer-is-activ.patch +remove-buggy-logic-to-prevent-secondary-dc-fencing.patch