cluster: RHEL60 - cman init: fix "stop remove" operation
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: fcbecf2eda74f092e3b488506cdca9eb97cdd1e9
Parent: 11f4e89470e8e239087e80b3f2ce94baf7cbe154
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Sep 28 13:15:24 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Oct 1 09:03:06 2010 +0200
cman init: fix "stop remove" operation
re-instate support for stop remove that was erroneusly dropped
Resolves: rhbz#638954
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 787000f..50df96d 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -842,6 +842,9 @@ start)
;;
stop)
cmanremove=""
+ if [ -n "$2" ] && [ "$2" = "remove" ]; then
+ cmanremove=remove
+ fi
stop && rm -f $LOCK_FILE
if [ "$INITLOGLEVEL" = "quiet" ]; then
success
13 years, 7 months
cluster: RHEL6 - cman: Calculate expected_votes correctly after leave remove
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 10d13e6f288bba93951cda1ee3230dc1e12f6b19
Parent: 43fbabb3658f4eda981d18413ae337e78294d38b
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Wed Sep 29 12:02:12 2010 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Oct 1 09:02:05 2010 +0200
cman: Calculate expected_votes correctly after leave remove
When cman_tool leave_remove happens on one node the flag is not cleared
so the same thing happens next time the node just runs "leave". We also
need to keep the recalculated expected votes in the local storage too, or it gets lost when the node leaves again.
Resolves: rhbz#634718
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
cman/daemon/commands.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 7a922dd..d4d9fd9 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -2034,6 +2034,7 @@ static void do_process_transition(int nodeid, char *data)
/* Take into account any new expected_votes value that the new node has */
node->expected_votes = msg->expected_votes;
+ us->expected_votes = max(us->expected_votes, msg->expected_votes);
if (old_state != node->state || old_expected != node->expected_votes)
recalculate_quorum(0, 0);
@@ -2246,6 +2247,7 @@ void add_ais_node(int nodeid, uint64_t incar, int total_members)
gettimeofday(&node->join_time, NULL);
node->incarnation = incar;
node->state = NODESTATE_MEMBER;
+ node->leave_reason = 0;
cluster_members++;
recalculate_quorum(0, 0);
}
13 years, 7 months
cluster: RHEL6 - cman init: fix "stop remove" operation
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 43fbabb3658f4eda981d18413ae337e78294d38b
Parent: 4548cf064eca28c59e12d7b88ed3ded193907c98
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Sep 28 13:15:24 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Oct 1 09:01:41 2010 +0200
cman init: fix "stop remove" operation
re-instate support for stop remove that was erroneusly dropped
Resolves: rhbz#634718
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 787000f..50df96d 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -842,6 +842,9 @@ start)
;;
stop)
cmanremove=""
+ if [ -n "$2" ] && [ "$2" = "remove" ]; then
+ cmanremove=remove
+ fi
stop && rm -f $LOCK_FILE
if [ "$INITLOGLEVEL" = "quiet" ]; then
success
13 years, 7 months