Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315051 Details for
Bug 459754
rgmanager needs to wait for fence domain join to complete on startup
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Implements wait-for-fence-domain behavior
cluster-459754.patch (text/plain), 3.20 KB, created by
Lon Hohberger
on 2008-08-26 21:04:48 UTC
(
hide
)
Description:
Implements wait-for-fence-domain behavior
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2008-08-26 21:04:48 UTC
Size:
3.20 KB
patch
obsolete
>diff --git a/group/lib/Makefile b/group/lib/Makefile >index fb86073..733109a 100644 >--- a/group/lib/Makefile >+++ b/group/lib/Makefile >@@ -13,25 +13,36 @@ > 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) >+all: $(STATICLIB) $(SHAREDLIB) > > $(LIBNAME).a: libgroup.o > ${AR} r libgroup.a libgroup.o >-# ${RANLIB} libgroup.a >+ ${RANLIB} libgroup.a >+ >+$(LIBNAME).so.${RELEASE_MAJOR}.${RELEASE_MINOR}: libgroup.o >+ $(CC) -shared -o $@ -Wl,-soname=$(LIBNAME).so.$(RELEASE_MAJOR) $^ > > 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/main.c b/rgmanager/src/daemons/main.c >index 8401bca..b722ab2 100644 >--- a/rgmanager/src/daemons/main.c >+++ b/rgmanager/src/daemons/main.c >@@ -60,6 +60,9 @@ 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; >@@ -909,7 +912,25 @@ clu_initialize(cman_handle_t *ch) > while (cman_is_quorate(*ch) == 0) { > sleep(1); > } >- clulog(LOG_NOTICE, "Quorum formed, starting\n"); >+ 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"); > } > } > >@@ -1018,6 +1039,8 @@ 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 f614668..00cb917 100644 >--- a/rgmanager/src/daemons/rg_event.c >+++ b/rgmanager/src/daemons/rg_event.c >@@ -27,6 +27,7 @@ > #include <stdint.h> > #include <vf.h> > #include <members.h> >+#include <libgroup.h> > > > /** >@@ -174,6 +175,25 @@ node_has_fencing(int nodeid) > } > > >+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. > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 459754
:
315051
|
315271