From: rpeterso@sourceware.org <rpeterso@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster cman/init.d/cman fence/fence_tool/Make ...
Date: 13 Oct 2006 14:57:55 -0000 [thread overview]
Message-ID: <20061013145755.26763.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2006-10-13 14:57:55
Modified files:
cman/init.d : cman
fence/fence_tool: Makefile fence_tool.c
Log message:
This is for bugzilla 210162: fence_tool needs -w and -t options
to wait for group membership.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/init.d/cman.diff?cvsroot=cluster&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_tool/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_tool/fence_tool.c.diff?cvsroot=cluster&r1=1.22&r2=1.23
--- cluster/cman/init.d/cman 2006/10/04 20:32:05 1.23
+++ cluster/cman/init.d/cman 2006/10/13 14:57:55 1.24
@@ -34,7 +34,7 @@
# wait FENCED_START_TIMEOUT seconds before giving up and failing when
# fenced does not start. If FENCED_START_TIMEOUT is zero, then
# wait indefinately for fenced to start.
-FENCED_START_TIMEOUT=120
+FENCED_START_TIMEOUT=300
LOCK_FILE="/var/lock/subsys/cman"
@@ -115,7 +115,7 @@
start_fence()
{
- errmsg=$( /sbin/fence_tool -w -j $FENCED_START_TIMEOUT join \
+ errmsg=$( /sbin/fence_tool -w -t $FENCED_START_TIMEOUT join \
> /dev/null 2>&1 ) || return 1
return 0
}
@@ -246,7 +246,7 @@
{
if /sbin/pidof fenced &> /dev/null
then
- /sbin/fence_tool leave > /dev/null 2>&1
+ /sbin/fence_tool -w leave > /dev/null 2>&1
rtrn=$?
sleep 1 # A bit of time for fenced to exit
return $rtrn
--- cluster/fence/fence_tool/Makefile 2006/10/04 19:16:51 1.11
+++ cluster/fence/fence_tool/Makefile 2006/10/13 14:57:55 1.12
@@ -34,7 +34,7 @@
all: ${TARGET}
-fence_tool: ${FENCE_TOOL_SRC:.c=.o}
+fence_tool: ${FENCE_TOOL_SRC:.c=.o} ${top_srcdir}/../group/lib/libgroup.a
${CC} ${CFLAGS} ${INCLUDE} ${FENCE_TOOL_SRC:.c=.o} ${LDFLAGS} ${LOADLIBES} ${LDLIBS} -o $@
agent.c:
--- cluster/fence/fence_tool/fence_tool.c 2006/10/04 19:16:51 1.22
+++ cluster/fence/fence_tool/fence_tool.c 2006/10/13 14:57:55 1.23
@@ -57,7 +57,7 @@
char *prog_name;
int operation;
int child_wait = FALSE;
-int fenced_start_timeout = 30;
+int fenced_start_timeout = 300; /* five minutes */
static int get_int_arg(char argopt, char *arg)
{
@@ -135,15 +135,16 @@
return gdata.member;
}
-static int do_wait(void)
+static int do_wait(int joining)
{
int i;
for (i=0; !fenced_start_timeout || i < fenced_start_timeout; i++) {
- if (we_are_in_fence_domain())
+ if (we_are_in_fence_domain() == joining)
return 0;
if (!(i % 5))
- printf("Waiting for fenced to join the fence group.\n");
+ printf("Waiting for fenced to %s the fence group.\n",
+ (joining?"join":"leave"));
sleep(1);
}
printf("Error joining the fence group.\n");
@@ -178,7 +179,7 @@
/* printf("join result %d %s\n", rv, buf); */
if (child_wait)
- do_wait();
+ do_wait(1);
close(fd);
return EXIT_SUCCESS;
}
@@ -205,6 +206,8 @@
rv = read(fd, buf, sizeof(buf));
/* printf("leave result %d %s\n", rv, buf); */
+ if (child_wait)
+ do_wait(0);
close(fd);
return EXIT_SUCCESS;
}
reply other threads:[~2006-10-13 14:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061013145755.26763.qmail@sourceware.org \
--to=rpeterso@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.