From f36a32e20a273bdb0192c45fd6fe4c05c9b73f74 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 12 2015 15:14:14 +0000 Subject: import corosync-2.3.4-4.el7_1.1 --- diff --git a/SOURCES/bz1205336-1-Votequorum-Fix-auto_tie_breaker-default.patch b/SOURCES/bz1205336-1-Votequorum-Fix-auto_tie_breaker-default.patch new file mode 100644 index 0000000..7745d0c --- /dev/null +++ b/SOURCES/bz1205336-1-Votequorum-Fix-auto_tie_breaker-default.patch @@ -0,0 +1,51 @@ +From 314a01c98e5f98ff686333966dbe675935b7b6a8 Mon Sep 17 00:00:00 2001 +From: Christine Caulfield +Date: Mon, 2 Mar 2015 15:48:01 +0000 +Subject: [PATCH] Votequorum: Fix auto_tie_breaker default + +The default for auto_tie_breaker should be 'lowest' - which is what it +was before the extended ATB functionality of auto_tie_breaker_node was +added, and what the documentation states. + +However this was broken so that if auto_tie_breaker_node was not +specified then auto_tie_breaker itself was ignored. This patch fixes +that. + +It also fixes a typo in a comment. + +Signed-Off-By: Christine Caulfield +Reviewed-by: Jan Friesse +--- + exec/votequorum.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/exec/votequorum.c b/exec/votequorum.c +index 6caccaf..3757b53 100644 +--- a/exec/votequorum.c ++++ b/exec/votequorum.c +@@ -628,7 +628,7 @@ static int is_in_nodelist(int nodeid, unsigned int *members, int entries) + } + + /* +- * The algorithm for a list of time-breaker nodes is: ++ * The algorithm for a list of tie-breaker nodes is: + * travel the list of nodes in the auto_tie_breaker list, + * if the node IS in our current partition, check if the + * nodes earlier in the atb list are in the 'previous' partition; +@@ -1290,7 +1290,12 @@ static char *votequorum_readconfig(int runtime) + icmap_get_uint8("quorum.auto_tie_breaker", &atb); + icmap_get_string("quorum.auto_tie_breaker_node", &atb_string); + +- if (!atb) { ++ /* auto_tie_breaker defaults to LOWEST */ ++ if (atb) { ++ auto_tie_breaker = ATB_LOWEST; ++ icmap_set_uint32("runtime.votequorum.atb_type", auto_tie_breaker); ++ } ++ else { + auto_tie_breaker = ATB_NONE; + if (atb_string) { + log_printf(LOGSYS_LEVEL_WARNING, +-- +1.7.1 + diff --git a/SOURCES/bz1205338-1-Don-t-allow-both-two_node-and-auto_tie_breaker-in-co.patch b/SOURCES/bz1205338-1-Don-t-allow-both-two_node-and-auto_tie_breaker-in-co.patch new file mode 100644 index 0000000..d380bd9 --- /dev/null +++ b/SOURCES/bz1205338-1-Don-t-allow-both-two_node-and-auto_tie_breaker-in-co.patch @@ -0,0 +1,40 @@ +From c832ade034fa737561ccabefbe417c9d7855d970 Mon Sep 17 00:00:00 2001 +From: Christine Caulfield +Date: Mon, 2 Mar 2015 15:50:21 +0000 +Subject: [PATCH] Don't allow both two_node and auto_tie_breaker in corosync.conf + +The two_node and auto_tie_breaker options are incompatible as they +specify conflicting methods of determining the quorate half of a cluster +partition. + +This patch detects this error in corosync.conf, issues a message and +disables two_node if auto_tie_breaker is present. + +Signed-Off-By: Christine Caulfield +Reviewed-by: Jan Friesse +--- + exec/votequorum.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/exec/votequorum.c b/exec/votequorum.c +index 3757b53..2ff0b43 100644 +--- a/exec/votequorum.c ++++ b/exec/votequorum.c +@@ -1323,6 +1323,14 @@ static char *votequorum_readconfig(int runtime) + + } + ++ /* two_node and auto_tie_breaker are not compatible as two_node uses ++ * a fence race to decide quorum whereas ATB decides based on node id ++ */ ++ if (two_node && auto_tie_breaker != ATB_NONE) { ++ log_printf(LOGSYS_LEVEL_CRIT, "two_node and auto_tie_breaker are both specified but are not compatible."); ++ log_printf(LOGSYS_LEVEL_CRIT, "two_node has been disabled, please fix your corosync.conf"); ++ two_node = 0; ++ } + /* + * quorum device is not compatible with last_man_standing and auto_tie_breaker + * neither lms or atb can be set at runtime, so there is no need to check for +-- +1.7.1 + diff --git a/SPECS/corosync.spec b/SPECS/corosync.spec index 4bd49dd..8a817dd 100644 --- a/SPECS/corosync.spec +++ b/SPECS/corosync.spec @@ -21,7 +21,7 @@ Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces Version: 2.3.4 -Release: 4%{?gitver}%{?dist} +Release: 4%{?gitver}%{?dist}.1 License: BSD Group: System Environment/Base URL: http://www.corosync.org/ @@ -34,6 +34,8 @@ Patch3: bz1078361-1-manpage-Fix-English.patch Patch4: bz1078361-2-Store-configuration-values-used-by-totem-to-cmap.patch Patch5: bz1078361-3-man-page-Improve-description-of-token-timeout.patch Patch6: bz1184154-1-Handle-adding-and-removing-UDPU-members-atomically.patch +Patch7: bz1205336-1-Votequorum-Fix-auto_tie_breaker-default.patch +Patch8: bz1205338-1-Don-t-allow-both-two_node-and-auto_tie_breaker-in-co.patch %if 0%{?rhel} ExclusiveArch: i686 x86_64 s390x @@ -88,6 +90,8 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %patch4 -p1 -b .bz1078361-2 %patch5 -p1 -b .bz1078361-3 %patch6 -p1 -b .bz1184154-1 +%patch7 -p1 -b .bz1205336-1 +%patch8 -p1 -b .bz1205338-1 %build %if %{with runautogen} @@ -350,6 +354,15 @@ The Corosync Cluster Engine APIs. %{_mandir}/man8/quorum_overview.8* %changelog +* Wed Mar 25 2015 Jan Friesse 2.3.4-4.1 +- Resolves: rhbz#1205336 +- Resolves: rhbz#1205338 + +- Votequorum: Fix auto_tie_breaker default (rhbz#1205336) +- merge upstream commit 314a01c98e5f98ff686333966dbe675935b7b6a8 (rhbz#1205336) +- Don't allow both two_node and auto_tie_breaker in corosync.conf (rhbz#1205338) +- merge upstream commit c832ade034fa737561ccabefbe417c9d7855d970 (rhbz#1205338) + * Wed Jan 21 2015 Jan Friesse 2.3.4-4 - Resolves: rhbz#1184154