Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: cts by panjiam from
([email protected])
2. Linux-HA CVS: membership by zhenh from
([email protected])
3. Linux-HA CVS: membership by zhenh from
([email protected])
4. Linux-HA CVS: membership by zhenh from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 12 Mar 2006 19:14:55 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by panjiam from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : panjiam
Host :
Project : linux-ha
Module : cts
Dir : linux-ha/cts
Modified Files:
CIB.py.in
Log Message:
removed deprecated module whrandom
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CIB.py.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- CIB.py.in 27 Feb 2006 09:19:42 -0000 1.1
+++ CIB.py.in 13 Mar 2006 02:14:55 -0000 1.2
@@ -8,7 +8,7 @@
'''
from UserDict import UserDict
-import sys, time, types, syslog, whrandom, os, struct, string, signal,
traceback
+import sys, time, types, syslog, os, struct, string, signal, traceback
from CTS import ClusterManager
from CM_hb import HeartbeatCM
------------------------------
Message: 2
Date: Mon, 13 Mar 2006 00:54:06 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: membership by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : membership
Dir : linux-ha/membership/ccm
Modified Files:
ccmlib.h
Log Message:
add CCM_LLM as message type
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/membership/ccm/ccmlib.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- ccmlib.h 2 Mar 2006 10:15:54 -0000 1.20
+++ ccmlib.h 13 Mar 2006 07:54:05 -0000 1.21
@@ -1,4 +1,4 @@
-/* $Id: ccmlib.h,v 1.20 2006/03/02 10:15:54 zhenh Exp $ */
+/* $Id: ccmlib.h,v 1.21 2006/03/13 07:54:05 zhenh Exp $ */
/*
* ccmlib.h: internal definations for ccm library files.
*
@@ -104,5 +104,7 @@
#define CCM_EVICTED 1
#define CCM_NEW_MEMBERSHIP 2
#define CCM_INFLUX 3
+#define CCM_LLM 4
+
#endif /* __CCMLIB_H_ */
------------------------------
Message: 3
Date: Mon, 13 Mar 2006 01:06:27 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: membership by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : membership
Dir : linux-ha/membership/ccm
Modified Files:
ccm_statemachine.c
Log Message:
move the initialization of llm (low level membership) to init function of ccm
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/membership/ccm/ccm_statemachine.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ccm_statemachine.c 17 Feb 2006 05:48:24 -0000 1.16
+++ ccm_statemachine.c 13 Mar 2006 08:06:26 -0000 1.17
@@ -1,4 +1,4 @@
-/* $Id: ccm_statemachine.c,v 1.16 2006/02/17 05:48:24 zhenh Exp $ */
+/* $Id: ccm_statemachine.c,v 1.17 2006/03/13 08:06:26 zhenh Exp $ */
/*
* ccm.c: Consensus Cluster Service Program
*
@@ -3057,12 +3057,6 @@
{
ccm_info_t *info = (ccm_info_t *)((ccm_t *)data)->info;
ll_cluster_t *hbfd = (ll_cluster_t *)((ccm_t *)data)->hbfd;
- static gboolean client_flag=FALSE;
-
- if(!client_flag) {
- client_llm_init(CCM_GET_LLM(info));
- client_flag=TRUE;
- }
return ccm_control_process(info, hbfd);
}
@@ -3217,6 +3211,8 @@
ccmret->info = global_info;
ccmret->hbfd = hb_fd;
+ client_llm_init(&global_info->llm);
+
return (void*)ccmret;
errout:
------------------------------
Message: 4
Date: Mon, 13 Mar 2006 01:11:15 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: membership by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : membership
Dir : linux-ha/membership/ccm
Modified Files:
ccmclient.c
Log Message:
remove some flags and add msg type as parameter of send_all()
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/membership/ccm/ccmclient.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- ccmclient.c 9 Mar 2006 10:01:58 -0000 1.36
+++ ccmclient.c 13 Mar 2006 08:11:14 -0000 1.37
@@ -1,4 +1,4 @@
-/* $Id: ccmclient.c,v 1.36 2006/03/09 10:01:58 zhenh Exp $ */
+/* $Id: ccmclient.c,v 1.37 2006/03/13 08:11:14 zhenh Exp $ */
/*
* client.c: Consensus Cluster Client tracker
*
@@ -55,10 +55,7 @@
static GMemChunk *ipc_mem_chk = NULL;
static GMemChunk *ipc_misc_chk = NULL;
-static gboolean llm_flag = FALSE;
-static gboolean evicted_flag = FALSE;
-static gboolean prim_flag = FALSE;
-static gboolean restored_flag = FALSE;
+static gboolean membership_ready = FALSE;
/*
@@ -99,9 +96,9 @@
send_func(gpointer key, gpointer value, gpointer user_data)
{
ccm_client_t *ccm_client = (ccm_client_t *)value;
-
- if(evicted_flag) {
- /*send evicted message*/
+ int msg_type = (int) user_data;
+ switch (msg_type) {
+ case CCM_EVICTED:
if(ccm_client->ccm_flags == CL_MEM) {
struct IPC_CHANNEL* chan = ccm_client->ccm_ipc_client;
@@ -114,45 +111,20 @@
}
ccm_client->ccm_flags = CL_INIT;
}
- return;
- }
-
- switch(ccm_client->ccm_flags) {
- case CL_INIT:
- if(!llm_flag) {
- break;
- }
- /* send llm message */
+ break;
+ case CCM_INFLUX:
+ send_message(ccm_client, ipc_misc_message);
+ break;
+ case CCM_LLM:
send_message(ccm_client, ipc_llm_message);
- ccm_client->ccm_flags = CL_LLM;
- /*
- * FALL THROUGH
- */
- case CL_LLM:
- if(prim_flag) {
- /* send mem message */
- send_message(ccm_client, ipc_mem_message);
- ccm_client->ccm_flags = CL_MEM;
- }
break;
-
- case CL_MEM:
- if(restored_flag){
- /* send restored message */
- send_message(ccm_client,
- ipc_misc_message);
- }else if(prim_flag) {
- /* send mem message */
- send_message(ccm_client,
- ipc_mem_message);
- }else {
- /* send nonprimary message */
- send_message(ccm_client,
- ipc_misc_message);
+ case CCM_NEW_MEMBERSHIP:
+ if(membership_ready) {
+ send_message(ccm_client, ipc_mem_message);
}
break;
- default :
- break;
+ default:
+ ccm_log(LOG_ERR, "send_func:unknown message");
}
}
@@ -208,10 +180,10 @@
static void
-send_all(void)
+send_all(int msg_type)
{
if(g_hash_table_size(ccm_hashclient)) {
- g_hash_table_foreach(ccm_hashclient, send_func, NULL);
+ g_hash_table_foreach(ccm_hashclient, send_func,
(gpointer)msg_type);
}
return;
}
@@ -241,9 +213,7 @@
static void
cleanup(void)
{
- evicted_flag=FALSE;
- prim_flag=FALSE;
- restored_flag=FALSE;
+ membership_ready=FALSE;
flush_all(); /* flush out all the messages to all the clients*/
g_mem_chunk_reset(ipc_mem_chk);
g_mem_chunk_reset(ipc_misc_chk);
@@ -287,7 +257,8 @@
ccm_client->ccm_ipc_client = ipc_client;
ccm_client->ccm_flags = CL_INIT;
- send_func(ipc_client, ccm_client, NULL);
+ send_func(ipc_client, ccm_client, (gpointer)CCM_LLM);
+ send_func(ipc_client, ccm_client, (gpointer)CCM_NEW_MEMBERSHIP);
g_hash_table_insert(ccm_hashclient, ipc_client, ccm_client);
return 0;
@@ -420,8 +391,7 @@
assert( n<= MAXNODE);
- prim_flag=TRUE;
- restored_flag=FALSE;
+ membership_ready=TRUE;
ccm->ev = CCM_NEW_MEMBERSHIP;
@@ -459,7 +429,7 @@
(void)display_func;
#endif
- send_all();
+ send_all(CCM_NEW_MEMBERSHIP);
ccm_debug2(LOG_DEBUG, "membership state: new membership");
}
@@ -469,16 +439,15 @@
{
int type = CCM_INFLUX;
- if(prim_flag){
- prim_flag = FALSE;
- restored_flag = FALSE;
+ if(membership_ready){
+ membership_ready = FALSE;
if(ipc_misc_message && --(ipc_misc_message->count)==0){
delete_message(ipc_misc_message);
}
ipc_misc_message = create_message(ipc_misc_chk,
&type, sizeof(int));
ipc_misc_message->count++;
- send_all();
+ send_all(CCM_INFLUX);
}
ccm_debug2(LOG_DEBUG, "membership state: not primary");
@@ -489,16 +458,14 @@
client_evicted(void)
{
int type = CCM_EVICTED;
- evicted_flag=TRUE;
- if(llm_flag) {
- if(ipc_misc_message && --(ipc_misc_message->count)==0){
- delete_message(ipc_misc_message);
- }
- ipc_misc_message = create_message(ipc_misc_chk,
- &type, sizeof(int));
- ipc_misc_message->count++;
- send_all();
+ if(ipc_misc_message && --(ipc_misc_message->count)==0){
+ delete_message(ipc_misc_message);
}
+ ipc_misc_message = create_message(ipc_misc_chk,
+ &type, sizeof(int));
+ ipc_misc_message->count++;
+ send_all(CCM_EVICTED);
+
cleanup();
ccm_debug2(LOG_DEBUG, "membership state: evicted");
}
@@ -527,7 +494,6 @@
g_free(data);
ipc_llm_message->count++; /* make sure it never gets
dellocated */
- llm_flag = TRUE;
ipc_mem_chk = g_mem_chunk_new(memstr,
sizeof(ccm_ipc_t)+
@@ -538,8 +504,5 @@
sizeof(ccm_ipc_t)+
sizeof(int),
MAXIPC, G_ALLOC_AND_FREE);
-
- /* check if anybody is waiting */
- send_all();
return;
}
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 28, Issue 23
********************************************