From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23414 invoked by alias); 28 Aug 2008 19:36:30 -0000 Received: (qmail 23408 invoked by alias); 28 Aug 2008 19:36:30 -0000 X-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_43,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: RHEL5 - Revert "rgmanager: Implement wait-for-fence behavior" To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/RHEL5 X-Git-Reftype: branch X-Git-Oldrev: b856823dbc6310e3c4742bf986bf2fa991cdc334 X-Git-Newrev: 65fc562dc3fca9b0f32a4dd2654dce31bcd6842b From: Lon Hohberger Message-Id: <20080828193528.9C8B5120379@lists.fedorahosted.org> Date: Thu, 28 Aug 2008 19:57:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00353.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=65fc562dc3fca9b0f32a4dd2654dce31bcd6842b Commit: 65fc562dc3fca9b0f32a4dd2654dce31bcd6842b Parent: b856823dbc6310e3c4742bf986bf2fa991cdc334 Author: Lon Hohberger AuthorDate: Thu Aug 28 15:35:22 2008 -0400 Committer: Lon Hohberger CommitterDate: Thu Aug 28 15:35:22 2008 -0400 Revert "rgmanager: Implement wait-for-fence behavior" This reverts commit b856823dbc6310e3c4742bf986bf2fa991cdc334. This was done badly; we don't want libgroup as a shared library. --- group/lib/Makefile | 17 +++-------------- rgmanager/src/daemons/Makefile | 6 +++--- rgmanager/src/daemons/main.c | 25 +------------------------ rgmanager/src/daemons/rg_event.c | 21 --------------------- 4 files changed, 7 insertions(+), 62 deletions(-) diff --git a/group/lib/Makefile b/group/lib/Makefile index 733109a..fb86073 100644 --- a/group/lib/Makefile +++ b/group/lib/Makefile @@ -13,36 +13,25 @@ SOURCE=libgroup.c LIBNAME=libgroup -SHAREDLIB=$(LIBNAME).so.${RELEASE_MAJOR}.${RELEASE_MINOR} STATICLIB=$(LIBNAME).a top_srcdir=.. UNINSTALL=${top_srcdir}/scripts/uninstall.pl -include ${top_srcdir}/make/defines.mk +# include ${top_srcdir}/make/defines.mk CFLAGS += -g -O -I. -fPIC -I../daemon -all: $(STATICLIB) $(SHAREDLIB) +all: $(STATICLIB) $(LIBNAME).a: libgroup.o ${AR} r libgroup.a libgroup.o - ${RANLIB} libgroup.a - -$(LIBNAME).so.${RELEASE_MAJOR}.${RELEASE_MINOR}: libgroup.o - $(CC) -shared -o $@ -Wl,-soname=$(LIBNAME).so.$(RELEASE_MAJOR) $^ +# ${RANLIB} libgroup.a libgroup.o: libgroup.c $(CC) $(CFLAGS) -c -o $@ $< -I../daemon install: all - install -d ${incdir} - install libgroup.h ${incdir} - install -d ${libdir} - install $(LIBNAME).a ${libdir} - install $(LIBNAME).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) ${libdir} - ln -sf $(LIBNAME).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) ${libdir}/$(LIBNAME).so - ln -sf $(LIBNAME).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) ${libdir}/$(LIBNAME).so.$(RELEASE_MAJOR) uninstall: diff --git a/rgmanager/src/daemons/Makefile b/rgmanager/src/daemons/Makefile index b743de7..5812fe6 100644 --- a/rgmanager/src/daemons/Makefile +++ b/rgmanager/src/daemons/Makefile @@ -14,12 +14,12 @@ top_srcdir=../.. UNINSTALL=${top_srcdir}/scripts/uninstall.pl include ${top_srcdir}/make/defines.mk -INCLUDE += -I $(top_srcdir)/include -I $(top_srcdir)/../cman/lib -I $(top_srcdir)/../ccs/lib -I $(top_srcdir)/../dlm/lib -I $(top_srcdir)/../group/lib +INCLUDE += -I $(top_srcdir)/include -I $(top_srcdir)/../cman/lib -I $(top_srcdir)/../ccs/lib -I $(top_srcdir)/../dlm/lib INCLUDE += -I${incdir} -I/usr/include/libxml2 -I/usr/include/slang CFLAGS+= -g -Wstrict-prototypes -Wshadow -fPIC -D_GNU_SOURCE -DWRAP_THREADS -Wall -Wextra -LDFLAGS+= -L ../clulib -L../../../cman/lib -L../../../ccs/lib -L../../../dlm/lib -L../../../group/lib -L${libdir} -lclulib -lxml2 -lpthread -ldl -Wl,-wrap,pthread_create,-wrap,pthread_exit +LDFLAGS+= -L ../clulib -L../../../cman/lib -L../../../ccs/lib -L../../../dlm/lib -L${libdir} -lclulib -lxml2 -lpthread -ldl -Wl,-wrap,pthread_create,-wrap,pthread_exit -rdynamic TARGETS=clurgmgrd clurmtabd rg_test all: ${TARGETS} @@ -41,7 +41,7 @@ clurgmgrd: rg_thread.o rg_locks.o main.o groups.o \ rg_event.o watchdog.o rg_state.o event_config.o \ slang_event.o service_op.o restart_counter.o \ ../clulib/libclulib.a - $(CC) -o $@ $^ $(INCLUDE) $(CFLAGS) $(LDFLAGS) -lccs -lcman -lgroup -lpthread -ldlm -lslang + $(CC) -o $@ $^ $(INCLUDE) $(CFLAGS) $(LDFLAGS) -lccs -lcman -lpthread -ldlm -lslang rg_script_test: slang_event.o $(CC) -o rg_script_test slang_event.o $(INCLUDE) $(CFLAGS) -lslang $(LDFLAGS) diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c index b722ab2..8401bca 100644 --- a/rgmanager/src/daemons/main.c +++ b/rgmanager/src/daemons/main.c @@ -60,9 +60,6 @@ int svc_exists(char *); int watchdog_init(void); int32_t master_event_callback(char *key, uint64_t viewno, void *data, uint32_t datalen); -int node_has_fencing(int nodeid); -int fence_domain_joined(void); - int shutdown_pending = 0, running = 1, need_reconfigure = 0; char debug = 0; /* XXX* */ static int signalled = 0; @@ -912,25 +909,7 @@ clu_initialize(cman_handle_t *ch) while (cman_is_quorate(*ch) == 0) { sleep(1); } - clulog(LOG_NOTICE, "Quorum formed\n"); - } - -} - - -void -wait_for_fencing(void) -{ - if (node_has_fencing(my_id()) && !fence_domain_joined()) { - clulog(LOG_INFO, "Waiting for fence domain join operation " - "to complete\n"); - - while (fence_domain_joined() == 0) - sleep(1); - clulog(LOG_INFO, "Fence domain joined\n"); - } else { - clulog(LOG_DEBUG, "Fence domain already joined " - "or no fencing configured\n"); + clulog(LOG_NOTICE, "Quorum formed, starting\n"); } } @@ -1039,8 +1018,6 @@ main(int argc, char **argv) clulog(LOG_INFO, "I am node #%d\n", my_id()); - wait_for_fencing(); - /* We know we're quorate. At this point, we need to read the resource group trees from ccsd. diff --git a/rgmanager/src/daemons/rg_event.c b/rgmanager/src/daemons/rg_event.c index f8fcc1e..f614668 100644 --- a/rgmanager/src/daemons/rg_event.c +++ b/rgmanager/src/daemons/rg_event.c @@ -27,7 +27,6 @@ #include #include #include -#include /** @@ -175,26 +174,6 @@ node_has_fencing(int nodeid) } -/* Shameless cut-and-paste from gfs_controld */ -int -fence_domain_joined(void) -{ - group_data_t data; - int rv; - - memset(&data, 0, sizeof(data)); - - rv = group_get_group(0, "default", &data); - - if (rv || strcmp(data.client_name, "fence")) - return 0; - - if (data.member == 1) - return 1; - return 0; -} - - /** Quick query to cman to see if a node has been fenced. */