FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 03-22-2011, 07:33 AM
"Fabio M. Di Nitto"
 
Default cman: Don't increment on LEAVING->MEMBER transition

The patch looks sane to me and I am fairly sure it needs to be applied
to STABLE31/RHEL6 too.

IŽd like also an ACK from Chrissie here.

Fabio

On 3/22/2011 2:06 AM, Lon Hohberger wrote:
> If a node left the cluster prior using 'cman_tool leave', its
> internal state is set to NODESTATE_LEAVING.
>
> Ordinarily, during the transition from NODESTATE_LEAVING to
> NODESTATE_DEAD, the member count is decremented. However, it
> is possible to rejoin the cluster membership from the
> NODESTATE_LEAVING state.
>
> If this occurs, the cluster member count is incremented, but
> since the node never transitioned from LEAVING->DEAD, it was
> not previously decremented, causing an ever-increasing node
> count in 'cman_tool status'.
>
> This patch resolves the issue by not incrementing the member
> count during a LEAVING->MEMBER transition.
>
> Resolves: rhbz#649533
>
> Signed-off-by: Lon Hohberger <lhh@redhat.com>
> ---
> cman/daemon/commands.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
> index 6ffe9e5..6c91d7a 100644
> --- a/cman/daemon/commands.c
> +++ b/cman/daemon/commands.c
> @@ -1994,9 +1994,12 @@ void add_ais_node(int nodeid, uint64_t incarnation, int total_members)
>
> if (node->state == NODESTATE_DEAD || node->state == NODESTATE_LEAVING) {
> gettimeofday(&node->join_time, NULL);
> + /* If a node rejoins before it completes a leave,
> + * we should not increment cluster_members */
> + if (node->state != NODESTATE_LEAVING)
> + cluster_members++;
> node->incarnation = incarnation;
> node->state = NODESTATE_MEMBER;
> - cluster_members++;
> recalculate_quorum(0, 0);
> }
> }
 
Old 03-22-2011, 09:28 AM
Christine Caulfield
 
Default cman: Don't increment on LEAVING->MEMBER transition

On 22/03/11 08:33, Fabio M. Di Nitto wrote:

The patch looks sane to me and I am fairly sure it needs to be applied
to STABLE31/RHEL6 too.

IŽd like also an ACK from Chrissie here.


ACK

Chrissie


Fabio

On 3/22/2011 2:06 AM, Lon Hohberger wrote:

If a node left the cluster prior using 'cman_tool leave', its
internal state is set to NODESTATE_LEAVING.

Ordinarily, during the transition from NODESTATE_LEAVING to
NODESTATE_DEAD, the member count is decremented. However, it
is possible to rejoin the cluster membership from the
NODESTATE_LEAVING state.

If this occurs, the cluster member count is incremented, but
since the node never transitioned from LEAVING->DEAD, it was
not previously decremented, causing an ever-increasing node
count in 'cman_tool status'.

This patch resolves the issue by not incrementing the member
count during a LEAVING->MEMBER transition.

Resolves: rhbz#649533

Signed-off-by: Lon Hohberger<lhh@redhat.com>
---
cman/daemon/commands.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 6ffe9e5..6c91d7a 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1994,9 +1994,12 @@ void add_ais_node(int nodeid, uint64_t incarnation, int total_members)

if (node->state == NODESTATE_DEAD || node->state == NODESTATE_LEAVING) {
gettimeofday(&node->join_time, NULL);
+ /* If a node rejoins before it completes a leave,
+ * we should not increment cluster_members */
+ if (node->state != NODESTATE_LEAVING)
+ cluster_members++;
node->incarnation = incarnation;
node->state = NODESTATE_MEMBER;
- cluster_members++;
recalculate_quorum(0, 0);
}
}
 

Thread Tools




All times are GMT. The time now is 10:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org