From: Lon Hohberger <lhh@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] Make fenced's retry time configurable;
Date: Tue, 29 Jan 2008 16:42:32 -0500 [thread overview]
Message-ID: <1201642952.15818.31.camel@ayanami.boston.devel.redhat.com> (raw)
As seen here:
https://bugzilla.redhat.com/show_bug.cgi?id=418531
Index: fenced/fd.h
===================================================================
RCS file: /cvs/cluster/cluster/fence/fenced/fd.h,v
retrieving revision 1.27
diff -u -r1.27 fd.h
--- fenced/fd.h 26 Oct 2007 20:36:49 -0000 1.27
+++ fenced/fd.h 29 Jan 2008 21:39:16 -0000
@@ -132,12 +132,15 @@
{
int post_join_delay;
int post_fail_delay;
+ int retry_time;
+ int pad;
char *override_path;
int8_t clean_start;
int8_t post_join_delay_opt;
int8_t post_fail_delay_opt;
int8_t clean_start_opt;
int8_t override_path_opt;
+ int8_t retry_time_opt;
};
#define FDFL_RUN (0)
Index: fenced/main.c
===================================================================
RCS file: /cvs/cluster/cluster/fence/fenced/main.c,v
retrieving revision 1.46
diff -u -r1.46 main.c
--- fenced/main.c 7 Jan 2008 05:52:28 -0000 1.46
+++ fenced/main.c 29 Jan 2008 21:39:16 -0000
@@ -15,7 +15,7 @@
#include "ccs.h"
#include "copyright.cf"
-#define OPTION_STRING ("cj:f:Dn:O:hVS")
+#define OPTION_STRING ("cj:f:Dn:O:R:hVS")
#define LOCKFILE_NAME "/var/run/fenced.pid"
struct client {
@@ -162,6 +162,20 @@
free(str);
}
+ if (comline.retry_time_opt == FALSE) {
+ str = NULL;
+ memset(path, 0, 256);
+ sprintf(path, "/cluster/fence_daemon/@retry_time");
+
+ error = ccs_get(cd, path, &str);
+ if (!error && str)
+ comline.retry_time = atoi(str);
+ if (str)
+ free(str);
+ if (comline.retry_time < 3)
+ comline.retry_time = 3;
+ }
+
log_debug("delay post_join %ds post_fail %ds",
comline.post_join_delay, comline.post_fail_delay);
@@ -576,6 +590,8 @@
comline->post_join_delay_opt = FALSE;
comline->post_fail_delay_opt = FALSE;
comline->clean_start_opt = FALSE;
+ comline->retry_time_opt = FALSE;
+ comline->retry_time = 5; /* default */
while (cont) {
optchar = getopt(argc, argv, OPTION_STRING);
@@ -602,6 +618,13 @@
comline->override_path_opt = TRUE;
break;
+ case 'R':
+ comline->retry_time = atoi(optarg);
+ if (comline->retry_time < 3)
+ comline->retry_time = 3;
+ comline->retry_time_opt = TRUE;
+ break;
+
case 'D':
daemon_debug_opt = TRUE;
break;
Index: fenced/recover.c
===================================================================
RCS file: /cvs/cluster/cluster/fence/fenced/recover.c,v
retrieving revision 1.30
diff -u -r1.30 recover.c
--- fenced/recover.c 26 Oct 2007 20:36:49 -0000 1.30
+++ fenced/recover.c 29 Jan 2008 21:39:16 -0000
@@ -402,7 +402,8 @@
/* Check for manual intervention */
override = open_override(comline.override_path);
- if (check_override(override, node->name, 5) > 0) {
+ if (check_override(override, node->name,
+ comline.retry_time) > 0) {
syslog(LOG_WARNING, "fence \"%s\" overridden by "
"administrator intervention", node->name);
next reply other threads:[~2008-01-29 21:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-29 21:42 Lon Hohberger [this message]
2008-01-30 19:12 ` [Cluster-devel] [PATCH] Make fenced's retry time configurable; Lon Hohberger
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=1201642952.15818.31.camel@ayanami.boston.devel.redhat.com \
--to=lhh@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).