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: heartbeat by xunsun from
([email protected])
2. Linux-HA CVS: membership by zhenh from
([email protected])
3. Linux-HA CVS: membership by zhenh from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 8 Mar 2006 21:52:29 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by xunsun from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : xunsun
Host :
Project : linux-ha
Module : heartbeat
Dir : linux-ha/heartbeat
Modified Files:
findif.c
Log Message:
removed the extra blanks which would cause problems when parsed by OCF IPaddr RA
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/findif.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- findif.c 16 Feb 2006 13:14:49 -0000 1.53
+++ findif.c 9 Mar 2006 04:52:29 -0000 1.54
@@ -1,4 +1,4 @@
-/* $Id: findif.c,v 1.53 2006/02/16 13:14:49 xunsun Exp $ */
+/* $Id: findif.c,v 1.54 2006/03/09 04:52:29 xunsun Exp $ */
/*
* findif.c: Finds an interface which can route a given address
*
@@ -752,7 +752,7 @@
best_netmask = htonl(best_netmask);
if (!OutputInCIDR) {
- printf("%s\t netmask %d.%d.%d.%d\tbroadcast %s\n"
+ printf("%s\tnetmask %d.%d.%d.%d\tbroadcast %s\n"
, best_if
, (int)((best_netmask>>24) & 0xff)
, (int)((best_netmask>>16) & 0xff)
@@ -760,7 +760,7 @@
, (int)(best_netmask & 0xff)
, bcast_arg);
}else{
- printf("%s\t netmask %d\tbroadcast %s\n"
+ printf("%s\tnetmask %d\tbroadcast %s\n"
, best_if
, netmask_bits(best_netmask)
, bcast_arg);
@@ -894,6 +894,9 @@
/*
* $Log: findif.c,v $
+ * Revision 1.54 2006/03/09 04:52:29 xunsun
+ * removed the extra blanks which would cause problems when parsed by OCF
IPaddr RA
+ *
* Revision 1.53 2006/02/16 13:14:49 xunsun
* check both interface name and broadcast address specified by user
*
------------------------------
Message: 2
Date: Thu, 9 Mar 2006 02:59:45 -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:
ccmmain.c
Log Message:
fix a typo error in log
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/membership/ccm/ccmmain.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- ccmmain.c 17 Feb 2006 05:48:24 -0000 1.33
+++ ccmmain.c 9 Mar 2006 09:59:44 -0000 1.34
@@ -1,4 +1,4 @@
-/* $Id: ccmmain.c,v 1.33 2006/02/17 05:48:24 zhenh Exp $ */
+/* $Id: ccmmain.c,v 1.34 2006/03/09 09:59:44 zhenh Exp $ */
/*
* ccm.c: Consensus Cluster Service Program
*
@@ -192,7 +192,7 @@
ccm_t* ccm = (ccm_t*)userdata;
ccm_info_t * info = (ccm_info_t*)ccm->info;
- ccm_log(LOG_INFO, "received SIGTERM, goint to shut down");
+ ccm_log(LOG_INFO, "received SIGTERM, going to shut down");
if (info == NULL){
ccm_log(LOG_ERR, "ccm_shutdone: invalid arguments");
return FALSE;
------------------------------
Message: 3
Date: Thu, 9 Mar 2006 03:01:59 -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 ccmlib_memapi.c
Log Message:
remove bornon message since we send the bornon value in membership message.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/membership/ccm/ccmclient.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- ccmclient.c 2 Mar 2006 10:15:54 -0000 1.35
+++ ccmclient.c 9 Mar 2006 10:01:58 -0000 1.36
@@ -1,4 +1,4 @@
-/* $Id: ccmclient.c,v 1.35 2006/03/02 10:15:54 zhenh Exp $ */
+/* $Id: ccmclient.c,v 1.36 2006/03/09 10:01:58 zhenh Exp $ */
/*
* client.c: Consensus Cluster Client tracker
*
@@ -48,13 +48,11 @@
static ccm_ipc_t *ipc_llm_message = NULL; /* active low level membership */
static ccm_ipc_t *ipc_mem_message = NULL; /* active membership */
-static ccm_ipc_t *ipc_born_message = NULL; /* active bornon information */
static ccm_ipc_t *ipc_misc_message = NULL; /* active misc information */
#define MAXIPC 100
static GMemChunk *ipc_mem_chk = NULL;
-static GMemChunk *ipc_born_chk = NULL;
static GMemChunk *ipc_misc_chk = NULL;
static gboolean llm_flag = FALSE;
@@ -132,8 +130,6 @@
*/
case CL_LLM:
if(prim_flag) {
- /* send born message */
- send_message(ccm_client, ipc_born_message);
/* send mem message */
send_message(ccm_client, ipc_mem_message);
ccm_client->ccm_flags = CL_MEM;
@@ -250,10 +246,8 @@
restored_flag=FALSE;
flush_all(); /* flush out all the messages to all the clients*/
g_mem_chunk_reset(ipc_mem_chk);
- g_mem_chunk_reset(ipc_born_chk);
g_mem_chunk_reset(ipc_misc_chk);
ipc_mem_message = NULL;
- ipc_born_message = NULL;
ipc_misc_message = NULL;
/* NOTE: ipc_llm_message is never destroyed. */
@@ -418,7 +412,6 @@
/* creating enough heap memory in order to avoid allocation */
static struct born_s bornbuffer[MAXNODE+10];
ccm_meminfo_t *ccm=(ccm_meminfo_t *)bornbuffer;
- ccm_born_t *born=(ccm_born_t *)bornbuffer;
struct born_s *born_arry = (struct born_s *)borndata;
int n = info->memcount;
int trans = info->ccm_transition_major;
@@ -456,17 +449,6 @@
(sizeof(ccm_meminfo_t) + n*sizeof(born_t)));
ipc_mem_message->count++;
- /* bornon array is sent in a seperate message */
- born->n = n;
- memcpy(born->born, born_arry, n*sizeof(struct born_s));
- if(ipc_born_message && --(ipc_born_message->count)==0){
- delete_message(ipc_born_message);
- }
-
- ipc_born_message = create_message(ipc_born_chk, born,
- sizeof(ccm_born_t )+n*sizeof(struct
born_s));
- ipc_born_message->count++;
-
#if 1
ccm_debug(LOG_DEBUG, "delivering new membership to %d clients: ",
g_hash_table_size(ccm_hashclient));
@@ -526,7 +508,6 @@
client_llm_init(llm_info_t *llm)
{
char memstr[] = "membership chunk";
- char bornstr[] = "born chunk";
char miscstr[] = "misc chunk";
int maxnode = llm_get_nodecount(llm);
int size = sizeof(ccm_llm_t)+ maxnode*sizeof(struct node_s);
@@ -553,11 +534,6 @@
sizeof(ccm_meminfo_t)+
maxnode*sizeof(born_t),
MAXIPC, G_ALLOC_AND_FREE);
- ipc_born_chk = g_mem_chunk_new(bornstr,
- sizeof(ccm_ipc_t)+
- sizeof(ccm_born_t)+
- maxnode*sizeof(struct born_s),
- MAXIPC, G_ALLOC_AND_FREE);
ipc_misc_chk = g_mem_chunk_new(miscstr,
sizeof(ccm_ipc_t)+
sizeof(int),
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/membership/ccm/ccmlib_memapi.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- ccmlib_memapi.c 2 Mar 2006 10:15:54 -0000 1.40
+++ ccmlib_memapi.c 9 Mar 2006 10:01:58 -0000 1.41
@@ -1,4 +1,4 @@
-/* $Id: ccmlib_memapi.c,v 1.40 2006/03/02 10:15:54 zhenh Exp $ */
+/* $Id: ccmlib_memapi.c,v 1.41 2006/03/09 10:01:58 zhenh Exp $ */
/*
* ccmlib_memapi.c: Consensus Cluster Membership API
*
@@ -118,7 +118,7 @@
static void
-init_llm(mbr_private_t *mem, struct IPC_MESSAGE *msg)
+on_llm_msg(mbr_private_t *mem, struct IPC_MESSAGE *msg)
{
unsigned long len = msg->msg_len;
int numnodes;
@@ -136,30 +136,6 @@
return;
}
-static void
-init_bornon(mbr_private_t *private,
- struct IPC_MESSAGE *msg)
-{
- ccm_born_t *born;
- int numnodes, i, n;
- struct born_s *bornon;
-
- numnodes = CLLM_GET_NODECOUNT(private->llm);
-
- born = (ccm_born_t *)msg->msg_body;
-
- n = born->n;
- assert(msg->msg_len == sizeof(ccm_born_t)
- +n*sizeof(struct born_s));
- bornon = born->born;
- for (i = 0 ; i < n; i++) {
- assert(bornon[i].index <= numnodes);
- g_hash_table_insert(private->bornon,
- GINT_TO_POINTER(bornon[i].index),
- GINT_TO_POINTER(bornon[i].bornon+1));
- }
- return;
-}
static void
@@ -177,10 +153,10 @@
}
static int
-init_llmborn(mbr_private_t *private)
+init_llm(mbr_private_t *private)
{
struct IPC_CHANNEL *ch;
- int sockfd, i=0, ret;
+ int sockfd, ret;
struct IPC_MESSAGE *msg;
if(private->llm) {
@@ -189,14 +165,7 @@
ch = private->channel;
sockfd = ch->ops->get_recv_select_fd(ch);
-
- /* receive the initiale low level membership
- * information in the first iteration, and
- * recieve the bornon information in the
- * second iteration
- */
- while( i < 2) {
-
+ while(1) {
if(ch->ops->waitin(ch) != IPC_OK){
ch->ops->destroy(ch);
return -1;
@@ -206,22 +175,16 @@
fprintf(stderr, "connection denied\n");
return -1;
}
- if(ret == IPC_FAIL){
+ if(ret == IPC_FAIL){
fprintf(stderr, ".");
cl_shortsleep();
continue;
}
-
- switch(i) {
- case 0: init_llm(private, msg);
- break;
- case 1: init_bornon(private, msg);
- private->client_report = TRUE;
- break;
- }
- i++;
- msg->msg_done(msg);
+ break;
}
+ on_llm_msg(private, msg);
+ private->client_report = TRUE;
+ msg->msg_done(msg);
return 0;
}
@@ -492,7 +455,7 @@
private = (mbr_private_t *)class->private;
ch = private->channel;
- if(init_llmborn(private)){
+ if(init_llm(private)){
return FALSE;
}
------------------------------
_______________________________________________
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 11
********************************************