[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/fence fenced/fd.h fenced/main.c fenced ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh sourceware org	2008-01-30 19:20:11

Modified files:
	fence/fenced   : fd.h main.c recover.c 
	fence/man      : fenced.8 

Log message:
	Make fenced's override wait time configurable.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/fd.h.diff?cvsroot=cluster&r1=1.27&r2=1.28
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/main.c.diff?cvsroot=cluster&r1=1.46&r2=1.47
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/recover.c.diff?cvsroot=cluster&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/man/fenced.8.diff?cvsroot=cluster&r1=1.7&r2=1.8

--- cluster/fence/fenced/fd.h	2007/10/26 20:36:49	1.27
+++ cluster/fence/fenced/fd.h	2008/01/30 19:20:11	1.28
@@ -132,12 +132,15 @@
 {
 	int post_join_delay;
 	int post_fail_delay;
+	int override_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 override_time_opt;
 };
 
 #define FDFL_RUN        (0)
--- cluster/fence/fenced/main.c	2008/01/07 05:52:28	1.46
+++ cluster/fence/fenced/main.c	2008/01/30 19:20:11	1.47
@@ -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:T:hVS")
 #define LOCKFILE_NAME			"/var/run/fenced.pid"
 
 struct client {
@@ -162,6 +162,20 @@
 			free(str);
 	}
 
+	if (comline.override_time_opt == FALSE) {
+		str = NULL;
+		memset(path, 0, 256);
+		sprintf(path, "/cluster/fence_daemon/@override_time");
+
+		error = ccs_get(cd, path, &str);
+		if (!error && str)
+			comline.override_time = atoi(str);
+		if (str)
+			free(str);
+		if (comline.override_time < 3)
+			comline.override_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->override_time_opt = FALSE;
+	comline->override_time = 5;	/* default */
 
 	while (cont) {
 		optchar = getopt(argc, argv, OPTION_STRING);
@@ -602,6 +618,13 @@
 			comline->override_path_opt = TRUE;
 			break;
 
+		case 'R':
+			comline->override_time = atoi(optarg);
+			if (comline->override_time < 3)
+				comline->override_time = 3;
+			comline->override_time_opt = TRUE;
+			break;
+
 		case 'D':
 			daemon_debug_opt = TRUE;
 			break;
--- cluster/fence/fenced/recover.c	2007/10/26 20:36:49	1.30
+++ cluster/fence/fenced/recover.c	2008/01/30 19:20:11	1.31
@@ -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.override_time) > 0) {
 			syslog(LOG_WARNING, "fence \"%s\" overridden by "
 			       "administrator intervention", node->name);
 
--- cluster/fence/man/fenced.8	2007/08/17 18:26:16	1.7
+++ cluster/fence/man/fenced.8	2008/01/30 19:20:11	1.8
@@ -143,6 +143,12 @@
 
   <fence_daemon override_path="/var/run/cluster/fenced_override"/>
 
+Override-time is the amount of time to wait for administrator intervention
+after fencing has failed.  The default is 5 seconds.
+
+  <fence_daemon override_time="10"/>
+
+
 .SS Per-node fencing settings
 
 The per-node fencing configuration can become complex and is largely
@@ -273,7 +279,11 @@
 All nodes are in a clean state to start.
 .TP
 \fB-O\fP
-Path of the override fifo.
+Path of the override FIFO.
+.TP
+\fB-T\fP
+Amount of time to wait for administrator intervention after 
+fencing has failed, in seconds.
 .TP
 \fB-D\fP
 Enable debugging code and don't fork into the background.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]