cluster: RHEL510 - rgmanager: Clean up comments in ASEHAagent.sh
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=a5875267a2e...
Commit: a5875267a2eb0137dc7a123340db44d42dee4ee9
Parent: 3f3ea2f4404ecc13e64368842bd91ea3ba881004
Author: J.H.M. Dassen (Ray) <rdassen(a)redhat.com>
AuthorDate: Tue Feb 5 09:53:30 2013 +0100
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Apr 12 14:13:48 2013 -0400
rgmanager: Clean up comments in ASEHAagent.sh
Correct string reference in comment
Resolves: rhbz#841142
Acked-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/ASEHAagent.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/resources/ASEHAagent.sh b/rgmanager/src/resources/ASEHAagent.sh
index bc5df42..489d49b 100755
--- a/rgmanager/src/resources/ASEHAagent.sh
+++ b/rgmanager/src/resources/ASEHAagent.sh
@@ -532,7 +532,7 @@ EOF
t=0
while [[ $t -lt $OCF_RESKEY_shutdown_timeout ]]
do
- # Search "usshutdown: exiting" in the server log. If found, it means the server has been shutted down.
+ # Search "ueshutdown: exiting" in the server log. If found, it means the server has been shutted down.
# Otherwise, we need to wait.
tail $CONSOLE_LOG | grep "ueshutdown: exiting" > /dev/null 2>&1
if [[ $? != 0 ]]
11 years, 2 months
cluster: RHEL510 - rgmanager: Clean up comments in ASEHAagent.sh
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=3f3ea2f4404...
Commit: 3f3ea2f4404ecc13e64368842bd91ea3ba881004
Parent: 75c2fd69df2abc96c9b3fabf33b6a8ecaee26a2c
Author: J.H.M. Dassen (Ray) <rdassen(a)redhat.com>
AuthorDate: Tue Feb 5 09:52:28 2013 +0100
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Apr 12 14:13:15 2013 -0400
rgmanager: Clean up comments in ASEHAagent.sh
Correct function names in comment blocks
Resolves: rhbz#841142
Acked-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/ASEHAagent.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/resources/ASEHAagent.sh b/rgmanager/src/resources/ASEHAagent.sh
index 9a0eaac..bc5df42 100755
--- a/rgmanager/src/resources/ASEHAagent.sh
+++ b/rgmanager/src/resources/ASEHAagent.sh
@@ -212,7 +212,7 @@ EOT
}
##################################################################################################
-# Function Name: validate_all #
+# Function Name: verify_all #
# Parameter: None #
# Return value: #
# 0 SUCCESS #
@@ -661,7 +661,7 @@ ase_is_running()
}
####################################################################################
-# Function name: ase_is_running #
+# Function name: kill_ase #
# Parameter: #
# DELAY The seconds to wait before killing the ASE processes. 0 means #
# kill the ASE processes immediately. #
11 years, 2 months
cluster: RHEL510 - rgmanager: Clean up comments in ASEHAagent.sh
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=75c2fd69df2...
Commit: 75c2fd69df2abc96c9b3fabf33b6a8ecaee26a2c
Parent: 7c0f0b9c9c161ba6bfdaae6747aeaf9df980da60
Author: J.H.M. Dassen (Ray) <rdassen(a)redhat.com>
AuthorDate: Tue Feb 5 09:51:13 2013 +0100
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Apr 12 14:11:50 2013 -0400
rgmanager: Clean up comments in ASEHAagent.sh
Grammar fix
Resolves: rhbz#841142
Acked-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/ASEHAagent.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/resources/ASEHAagent.sh b/rgmanager/src/resources/ASEHAagent.sh
index 2b6bd69..9a0eaac 100755
--- a/rgmanager/src/resources/ASEHAagent.sh
+++ b/rgmanager/src/resources/ASEHAagent.sh
@@ -282,7 +282,7 @@ verify_all()
# Check if the Run_server file exists.
if [[ ! -f $RUNSERVER_SCRIPT ]]
then
- ocf_log err "ASEHAagent: There file $RUNSERVER_SCRIPT doesn't exist. The sybase directory may be incorrect."
+ ocf_log err "ASEHAagent: The file $RUNSERVER_SCRIPT doesn't exist. The sybase directory may be incorrect."
return $OCF_ERR_ARGS
fi
11 years, 2 months
cluster: RHEL510 - rgmanager: Install man pages with mode 0644
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=7c0f0b9c9c1...
Commit: 7c0f0b9c9c161ba6bfdaae6747aeaf9df980da60
Parent: 02ae12174d1c1908acb53c67cb04d26a3d19b536
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Fri Apr 12 11:02:32 2013 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Apr 12 11:05:46 2013 -0400
rgmanager: Install man pages with mode 0644
Man pages were previously installed mode 0755. Install them mode 0644.
Resolves: rhbz#883860
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/man/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/rgmanager/man/Makefile b/rgmanager/man/Makefile
index 4e34b6e..58b88dc 100644
--- a/rgmanager/man/Makefile
+++ b/rgmanager/man/Makefile
@@ -19,7 +19,7 @@ include ${top_srcdir}/make/defines.mk
install:
install -d ${mandir}/man8
- install ${TARGETS} ${mandir}/man8
+ install -m 644 ${TARGETS} ${mandir}/man8
uninstall:
${UNINSTALL} ${TARGETS} ${mandir}/man8
11 years, 2 months
cluster: RHEL510 - rgmanager: Don't duplicate configuration change events
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=02ae12174d1...
Commit: 02ae12174d1c1908acb53c67cb04d26a3d19b536
Parent: efdb438ad868b447e28cde5959530b5dc763186f
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Tue Feb 26 11:36:04 2013 -0500
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Apr 12 11:05:46 2013 -0400
rgmanager: Don't duplicate configuration change events
If a cluster configuration change is detected while there are events
on the event queue that take some time to process, a large number of
duplicate configuration update events are put onto the event queue.
With a large number of services and a small status poll interval,
thousands of duplicate events can be put onto the queue.
This patch causes rgmanager to queue only one config event per detected
configuration change.
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/main.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 1c7f746..59150c3 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -73,6 +73,7 @@ static int port = RG_PORT;
static char *rgmanager_lsname = "rgmanager"; /* XXX default */
static int status_poll_interval = DEFAULT_CHECK_INTERVAL;
static int stops_queued = 0;
+static int lastqver = 0;
int next_node_id(cluster_member_list_t *membership, int me);
@@ -750,7 +751,7 @@ dump_internal_state(int fd)
int
event_loop(msgctx_t *localctx, msgctx_t *clusterctx)
{
- int n = 0, max, ret, oldver, newver;
+ int n = 0, max, ret, oldver = 0, newver = 0;
fd_set rfds;
msgctx_t *newctx;
struct timeval tv;
@@ -826,9 +827,14 @@ event_loop(msgctx_t *localctx, msgctx_t *clusterctx)
return 0;
if (need_reconfigure || check_config_update(&oldver, &newver)) {
+ /* Only queue configuration events once per detected config update */
+ if (!need_reconfigure && newver <= lastqver)
+ return 0;
+
need_reconfigure = 0;
configure_rgmanager(-1, 0, NULL);
config_event_q(oldver, newver);
+ lastqver = newver;
return 0;
}
11 years, 2 months
cluster: RHEL59 - fenced: get the cman fd before each poll
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=c830187908b...
Commit: c830187908b759b5b5203efc0fa441fc401b7f1b
Parent: 444a46c80e3ee12544eb8960fdea9f7cefc78d1e
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Apr 8 16:11:51 2013 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Apr 12 09:19:51 2013 +0200
fenced: get the cman fd before each poll
Prevent a rare but possible spinning in poll on the
cman fd.
Resolves rhbz#951049
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
fence/fenced/fd.h | 1 +
fence/fenced/main.c | 5 ++++-
fence/fenced/member_cman.c | 5 +++++
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/fence/fenced/fd.h b/fence/fenced/fd.h
index c4204c8..584367c 100644
--- a/fence/fenced/fd.h
+++ b/fence/fenced/fd.h
@@ -197,5 +197,6 @@ int is_member(char *name);
int is_fenced(char *name);
fd_node_t *get_new_node(fd_t *fd, int nodeid, char *in_name);
void update_cman(char *victim, char *agent);
+int get_member_fd(void);
#endif /* __FD_DOT_H__ */
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 3d553b2..72961f5 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -531,6 +531,7 @@ static int setup_listen(void)
static int loop(void)
{
int rv, i, f, maxi = 0, listen_fd, member_fd, groupd_fd;
+ int cluster_fd_pos;
rv = listen_fd = setup_listen();
if (rv < 0)
@@ -540,7 +541,7 @@ static int loop(void)
rv = member_fd = setup_member();
if (rv < 0)
goto out;
- client_add(member_fd, &maxi);
+ cluster_fd_pos = client_add(member_fd, &maxi);
rv = groupd_fd = setup_groupd();
if (rv < 0)
@@ -551,6 +552,8 @@ static int loop(void)
listen_fd, member_fd, groupd_fd);
for (;;) {
+ /* We need to re-get the cluster FD eac time */
+ pollfd[cluster_fd_pos].fd = get_member_fd();
rv = poll(pollfd, maxi + 1, -1);
if (rv < 0) {
if (errno == EINTR)
diff --git a/fence/fenced/member_cman.c b/fence/fenced/member_cman.c
index 6ef74c3..8086af4 100644
--- a/fence/fenced/member_cman.c
+++ b/fence/fenced/member_cman.c
@@ -241,6 +241,11 @@ void exit_member(void)
cman_finish(ch);
}
+int get_member_fd()
+{
+ return cman_get_fd(ch);
+}
+
int is_member(char *name)
{
cman_node_t *cn;
11 years, 2 months
gfs2-utils: master - libgfs2: Don't release rgrp buffers which are still in use
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=6649ab41...
Commit: 6649ab418b25992eb707ab821f2fdcb317c27dd9
Parent: b1b751868059ebc1188de3e13db1eadbb5ede16c
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Tue Apr 9 18:41:22 2013 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue Apr 9 18:48:33 2013 +0100
libgfs2: Don't release rgrp buffers which are still in use
lgfs2_dinode_alloc currently releases rgrp buffers unconditionally,
which breaks things for fsck.gfs2 which requires that they persist. This
patch moves the gfs2_rgrp_relse calls into blk_alloc_in_rg and only
releases the buffers when blk_alloc_in_rg itself allocated them.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/fs_ops.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index 4ea6dd3..51e6abf 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -122,6 +122,7 @@ static int blk_alloc_in_rg(struct gfs2_sbd *sdp, unsigned int type, struct rgrp_
struct gfs2_rgrp *rg;
unsigned int block, bn = 0, x = 0, y = 0;
unsigned int state;
+ unsigned int release = 0;
struct gfs2_buffer_head *bh;
if (rl == NULL || rl->rg.rg_free == 0) {
@@ -129,8 +130,11 @@ static int blk_alloc_in_rg(struct gfs2_sbd *sdp, unsigned int type, struct rgrp_
return -1;
}
- if (rl->bh[0] == NULL && gfs2_rgrp_read(sdp, rl) != 0)
- return -1;
+ if (rl->bh[0] == NULL) {
+ if (gfs2_rgrp_read(sdp, rl) != 0)
+ return -1;
+ release = 1;
+ }
ri = &rl->ri;
rg = &rl->rg;
@@ -149,7 +153,7 @@ static int blk_alloc_in_rg(struct gfs2_sbd *sdp, unsigned int type, struct rgrp_
fprintf(stderr, "allocation is broken (1): %"PRIu64" %u\n",
(uint64_t)rl->ri.ri_addr, rl->rg.rg_free);
- return -1;
+ goto out_err;
found:
if (bn >= ri->ri_bitbytes * GFS2_NBBY) {
@@ -157,7 +161,7 @@ found:
" (0x%" PRIx64 ") Free:%u\n",
bn, ri->ri_bitbytes * GFS2_NBBY, (uint64_t)rl->ri.ri_addr,
(uint64_t)rl->ri.ri_addr, rl->rg.rg_free);
- return -1;
+ goto out_err;
}
switch (type) {
@@ -171,7 +175,7 @@ found:
break;
default:
fprintf(stderr, "bad state\n");
- return -1;
+ goto out_err;
}
bh->b_data[x] &= ~(0x03 << (GFS2_BIT_SIZE * y));
@@ -186,7 +190,14 @@ found:
sdp->blks_alloced++;
*blkno = ri->ri_data0 + bn;
+ if (release)
+ gfs2_rgrp_relse(rl);
return 0;
+out_err:
+ if (release)
+ gfs2_rgrp_relse(rl);
+ return -1;
+
}
/**
@@ -251,8 +262,6 @@ int lgfs2_dinode_alloc(struct gfs2_sbd *sdp, const uint64_t blksreq, uint64_t *b
return -1;
ret = blk_alloc_in_rg(sdp, DINODE, rgt, blkno);
- gfs2_rgrp_relse(rgt);
-
if (ret == 0)
sdp->dinodes_alloced++;
11 years, 2 months
gfs2-utils: master - gfs2-utils: Build system fixes
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=b1b75186...
Commit: b1b751868059ebc1188de3e13db1eadbb5ede16c
Parent: 9c6977dae8082767f07f96f1c29672556fa062bf
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Tue Apr 9 16:52:25 2013 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue Apr 9 16:52:25 2013 +0100
gfs2-utils: Build system fixes
Previously we were disabling the whole test suite when check isn't
installed but tool_tests.sh doesn't require it so the conditional has
been moved into tests/Makefile.am so that tool_tests.sh is always
enabled.
Also fixes a problem where AC_PROG_YACC allowed the build to continue
when bison was not installed but byacc was. We use bison-specific
features so a specific check for bison has been added.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
Makefile.am | 6 +-----
configure.ac | 5 ++++-
tests/Makefile.am | 6 +++++-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 3cd0b85..210ab15 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,11 +16,7 @@ if BUILD_GFS_CONTROLD
DIR_GROUP = group
endif
-if BUILD_TESTS
-DIR_TESTS = tests
-endif
-
-SUBDIRS = po $(DIR_GROUP) gfs2 doc $(DIR_TESTS)
+SUBDIRS = po $(DIR_GROUP) gfs2 doc tests
install-exec-local:
$(INSTALL) -d $(DESTDIR)/$(LOGDIR)
diff --git a/configure.ac b/configure.ac
index b24fc86..45b38eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,7 +58,8 @@ AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LEX
-AC_PROG_YACC
+AC_CHECK_PROG([YACC], [bison], [bison -y])
+test x"$YACC" = x && AC_MSG_ERROR([bison not found])
## local helper functions
@@ -275,3 +276,5 @@ AC_CONFIG_FILES([Makefile
])
AC_OUTPUT
+
+test x"$BUILD_TESTS" = x && AC_MSG_NOTICE([package 'check' not found; unit tests will not be built])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d8aa8f2..a97b8c5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,7 @@
TESTS_ENVIRONMENT = TOPBUILDDIR=$(top_builddir)
-TESTS = check_libgfs2 tool_tests.sh
EXTRA_DIST = tool_tests.sh
+
+if BUILD_TESTS
check_PROGRAMS = check_libgfs2
check_libgfs2_SOURCES = check_meta.c \
$(top_srcdir)/gfs2/libgfs2/libgfs2.h
@@ -8,3 +9,6 @@ check_libgfs2_CFLAGS = -I$(top_srcdir)/gfs2/libgfs2 \
-I$(top_srcdir)/gfs2/include \
@check_CFLAGS@
check_libgfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la @check_LIBS@
+endif
+
+TESTS = $(check_PROGRAMS) tool_tests.sh
11 years, 2 months
cluster: RHEL510 - fenced: reconnect to ccs in more places
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=efdb438ad86...
Commit: efdb438ad868b447e28cde5959530b5dc763186f
Parent: 60dd70f06444939ea14bb6a40cfb61ab1eea9616
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 10 10:29:49 2013 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Apr 8 15:33:18 2013 -0500
fenced: reconnect to ccs in more places
Reconnect to ccsd if connection descriptor times out during
processing.
bz 881217
Based on patch from John Ruemker <jruemker(a)redhat.com>
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
fence/fenced/agent.c | 42 +++++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/fence/fenced/agent.c b/fence/fenced/agent.c
index de4467c..604bbb9 100644
--- a/fence/fenced/agent.c
+++ b/fence/fenced/agent.c
@@ -302,6 +302,25 @@ void update_cman(char *victim, char *method)
cman_finish(ch);
}
+static int reconnect_ccs(void)
+{
+ int count = 0;
+ int cd;
+
+ syslog(LOG_INFO, "ccs connection timed out, retrying\n");
+
+ while ((cd = ccs_connect()) < 0) {
+ sleep(1);
+
+ count++;
+ if (!(count % 60)) {
+ syslog(LOG_WARNING, "ccs reconnect failing\n");
+ }
+ }
+
+ return cd;
+}
+
int dispatch_fence_agent(char *victim, int force)
{
char good_device[256];
@@ -328,14 +347,9 @@ int dispatch_fence_agent(char *victim, int force)
error = get_method(cd, victim, m, &method);
- /* if the connection timed out while we were trying
- * to fence, try to open the connection again
- */
+ /* ccs connection times out if prev call took too long */
if (error == -EBADR) {
- syslog(LOG_INFO, "ccs connection timed out, "
- "retrying\n");
- while ((cd = ccs_connect()) < 0)
- sleep(1);
+ cd = reconnect_ccs();
error = get_method(cd, victim, m, &method);
}
@@ -349,10 +363,24 @@ int dispatch_fence_agent(char *victim, int force)
for (d = 0; d < num_devices; d++) {
error = get_device(cd, victim, method, d, &device);
+
+ /* ccs connection times out if prev call took too long */
+ if (error == -EBADR) {
+ cd = reconnect_ccs();
+ error = get_device(cd, victim, method, d, &device);
+ }
+
if (error)
break;
error = use_device(cd, victim, method, d, device);
+
+ /* ccs connection times out if prev call took too long */
+ if (error == -EBADR) {
+ cd = reconnect_ccs();
+ error = use_device(cd, victim, method, d, device);
+ }
+
if (error)
break;
11 years, 2 months
cluster: RHEL510 - fenced: get the cman fd before each poll
by Christine Caulfield
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=60dd70f0644...
Commit: 60dd70f06444939ea14bb6a40cfb61ab1eea9616
Parent: 6e4fb7809d4146929c22b8683cb436d38fccdf1d
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Apr 8 16:11:51 2013 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Mon Apr 8 16:11:51 2013 +0100
fenced: get the cman fd before each poll
Prevent a rare but possible spinning in poll on the
cman fd.
Resolves rhbz#856214
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
fence/fenced/fd.h | 1 +
fence/fenced/main.c | 5 ++++-
fence/fenced/member_cman.c | 5 +++++
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/fence/fenced/fd.h b/fence/fenced/fd.h
index c4204c8..584367c 100644
--- a/fence/fenced/fd.h
+++ b/fence/fenced/fd.h
@@ -197,5 +197,6 @@ int is_member(char *name);
int is_fenced(char *name);
fd_node_t *get_new_node(fd_t *fd, int nodeid, char *in_name);
void update_cman(char *victim, char *agent);
+int get_member_fd(void);
#endif /* __FD_DOT_H__ */
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 3d553b2..72961f5 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -531,6 +531,7 @@ static int setup_listen(void)
static int loop(void)
{
int rv, i, f, maxi = 0, listen_fd, member_fd, groupd_fd;
+ int cluster_fd_pos;
rv = listen_fd = setup_listen();
if (rv < 0)
@@ -540,7 +541,7 @@ static int loop(void)
rv = member_fd = setup_member();
if (rv < 0)
goto out;
- client_add(member_fd, &maxi);
+ cluster_fd_pos = client_add(member_fd, &maxi);
rv = groupd_fd = setup_groupd();
if (rv < 0)
@@ -551,6 +552,8 @@ static int loop(void)
listen_fd, member_fd, groupd_fd);
for (;;) {
+ /* We need to re-get the cluster FD eac time */
+ pollfd[cluster_fd_pos].fd = get_member_fd();
rv = poll(pollfd, maxi + 1, -1);
if (rv < 0) {
if (errno == EINTR)
diff --git a/fence/fenced/member_cman.c b/fence/fenced/member_cman.c
index 6ef74c3..8086af4 100644
--- a/fence/fenced/member_cman.c
+++ b/fence/fenced/member_cman.c
@@ -241,6 +241,11 @@ void exit_member(void)
cman_finish(ch);
}
+int get_member_fd()
+{
+ return cman_get_fd(ch);
+}
+
int is_member(char *name)
{
cman_node_t *cn;
11 years, 2 months