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 12-10-2007, 03:17 PM
 
Default cluster/group/dlm_controld dlm_daemon.h member ...

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield@sourceware.org 2007-12-10 16:17:07

Modified files:
group/dlm_controld: dlm_daemon.h member_cman.c

Log message:
Add multi-path capability. Each address we get from cman is now
passed into the DLM.

It's still incumbent on cluster.conf to set the transport to sctp.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/dlm_daemon.h.diff?cvsroot=cluster&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/member_cman.c.diff?cvsroot=cluster&r1=1.8&r2=1.9

--- cluster/group/dlm_controld/dlm_daemon.h 2007/08/17 21:17:53 1.13
+++ cluster/group/dlm_controld/dlm_daemon.h 2007/12/10 16:17:06 1.14
@@ -56,6 +56,7 @@
#define MAXCON 4
#define MAXNAME 255
#define MAX_NODES 256 /* should be same as MAX_GROUP_MEMBERS */
+#define MAX_NODE_ADDRESSES 4

extern char *prog_name;
extern int daemon_debug_opt;
--- cluster/group/dlm_controld/member_cman.c 2007/07/24 18:15:43 1.8
+++ cluster/group/dlm_controld/member_cman.c 2007/12/10 16:17:06 1.9
@@ -68,7 +68,10 @@

static void statechange(void)
{
- int i, rv;
+ int i, j, rv;
+ struct cman_node_address addrs[MAX_NODE_ADDRESSES];
+ int num_addrs;
+ struct cman_node_address *addrptr = addrs;

old_node_count = cman_node_count;
memcpy(&old_nodes, &cman_nodes, sizeof(old_nodes));
@@ -96,14 +99,25 @@
if (cman_nodes[i].cn_member &&
!is_old_member(cman_nodes[i].cn_nodeid)) {

+ rv = cman_get_node_addrs(ch, cman_nodes[i].cn_nodeid,
+ MAX_NODE_ADDRESSES,
+ &num_addrs, addrs);
+ if (rv < 0) {
+ log_debug("cman_get_node_addrs failed, falling back to single-homed. ");
+ num_addrs = 1;
+ addrptr = &cman_nodes[i].cn_address;
+ }
+
log_debug("cman: node %d added",
cman_nodes[i].cn_nodeid);

- add_configfs_node(cman_nodes[i].cn_nodeid,
- cman_nodes[i].cn_address.cna_address,
- cman_nodes[i].cn_address.cna_addrlen,
- (cman_nodes[i].cn_nodeid ==
- our_nodeid));
+ for (j = 0; j < num_addrs; j++) {
+ add_configfs_node(cman_nodes[i].cn_nodeid,
+ addrptr[j].cna_address,
+ addrptr[j].cna_addrlen,
+ (cman_nodes[i].cn_nodeid ==
+ our_nodeid));
+ }
}
}
}
 

Thread Tools




All times are GMT. The time now is 04:15 AM.

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