cluster/group/daemon Makefile cman.c cpg.c gd_ ...
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-06-30 15:29:19
Modified files:
group/daemon : Makefile cman.c cpg.c gd_internal.h
Log message:
- build against installed openais/cman headers and libs
- if a cman node fails that isn't in the groupd cpg, don't wait on a cpg update for it
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/Makefile.diff?cvsroot=cluster&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/cman.c.diff?cvsroot=cluster&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/cpg.c.diff?cvsroot=cluster&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/gd_internal.h.diff?cvsroot=cluster&r1=1.36&r2=1.37
group/daemon/Makefile +4 -5
@@ -14,7 +14,8 @@ include ${top_srcdir}/make/defines.mk UNINSTALL=${top_srcdir}/scripts/uninstall.pl -CFLAGS+= -g -I. -I../include/ -I../../cman/lib/ -I../lib/ -I../../cman/daemon/openais/trunk/include/ +CFLAGS+= -g -I. -I../include/ -I../../cman/lib/ -I../lib/ +LDFLAGS+= -L/usr/lib/openais -L/usr/lib TARGET=groupd
@@ -24,10 +25,8 @@ cpg.o \ cman.o \ joinleave.o \ - main.o \ - ../../cman/lib/libcman.a \ - ../../cman/daemon/openais/trunk/lib/libcpg.a - $(CC) $(LDFLAGS) -o $@ $^ + main.o + $(CC) $(LDFLAGS) -lcman -lcpg -o $@ $^ app.o: app.c gd_internal.h $(CC) $(CFLAGS) -c -o $@ $<
group/daemon/cman.c +6 -1
@@ -97,7 +97,12 @@ rs =get_recovery_set (old_nodes[i].cn_nodeid); rs->cman_update =1 ; -if (rs->cpg_update &&list_empty (&rs->entries)) { +if (!rs->cpg_update && !in_groupd_cpg (rs->nodeid)) { +log_debug ("free recovery set %d not in cpg" , + rs->nodeid); +list_del (&rs->list); +free (rs); + }else if (rs->cpg_update &&list_empty (&rs->entries)) {log_debug ("free unused recovery set %d cman" , rs->nodeid);list_del (&rs->list);
group/daemon/cpg.c +33 -14
102 lines not on this page · raw message
group/daemon/gd_internal.h +2 -2
@@ -33,13 +33,12 @@#include <sys/poll.h> #include <sys/stat.h> #include <sys/wait.h> +#include <openais/cpg.h> #include "list.h" #include "linux_endian.h" #include "groupd.h" #include "libgroup.h" -#include "saAis.h" -#include "cpg.h" #define MAX_NAMELEN (32)/* should match libgroup.h */ #define MAX_LEVELS (4)
@@ -276,6 +275,7 @@int send_message (group_t *g,void *buf,int len);int send_message_groupd (group_t *g,void *buf,int len);void copy_groupd_data (group_data_t *data); +int in_groupd_cpg (int nodeid);/* joinleave.c */ void remove_group (group_t *g);