Cluster Project branch, master, updated. cluster-2.99.00-34-gc23b4e3

teigland@sourceware.org teigland@sourceware.org
Fri May 9 21:47:00 GMT 2008


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=c23b4e33daf07619736ea55940295c10e9271b7c

The branch, master has been updated
       via  c23b4e33daf07619736ea55940295c10e9271b7c (commit)
      from  74b2b54ae2388692c4cd3c05012dc47d1436a3fa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c23b4e33daf07619736ea55940295c10e9271b7c
Author: David Teigland <teigland@redhat.com>
Date:   Fri May 9 16:46:14 2008 -0500

    dlm_controld: options to disable fencing/quorum dependency
    
    There may be cases where someone wants to use the dlm without
    a recovery dependency on fencing and/or quorum.
    
    Signed-off-by: David Teigland <teigland@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 group/dlm_controld/config.c |   10 ++++++++++
 group/dlm_controld/config.h |    6 ++++++
 group/dlm_controld/cpg.c    |   15 +++++++++++++--
 group/dlm_controld/main.c   |   28 +++++++++++++++++++++-------
 4 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/group/dlm_controld/config.c b/group/dlm_controld/config.c
index 4709186..21511de 100644
--- a/group/dlm_controld/config.c
+++ b/group/dlm_controld/config.c
@@ -47,6 +47,8 @@ int optk_debug;
 int optk_timewarn;
 int optk_protocol;
 int optd_groupd_compat;
+int optd_enable_fencing;
+int optd_enable_quorum;
 int optd_enable_deadlk;
 int optd_enable_plock;
 int optd_plock_debug;
@@ -63,6 +65,8 @@ int cfgk_debug			= -1;
 int cfgk_timewarn		= -1;
 int cfgk_protocol		= -1;
 int cfgd_groupd_compat		= DEFAULT_GROUPD_COMPAT;
+int cfgd_enable_fencing		= DEFAULT_ENABLE_FENCING;
+int cfgd_enable_quorum		= DEFAULT_ENABLE_QUORUM;
 int cfgd_enable_deadlk		= DEFAULT_ENABLE_DEADLK;
 int cfgd_enable_plock		= DEFAULT_ENABLE_PLOCK;
 int cfgd_plock_debug		= DEFAULT_PLOCK_DEBUG;
@@ -238,6 +242,8 @@ static void read_ccs_protocol(int cd, char *path, int *config_val)
 #define TIMEWARN_PATH "/cluster/dlm/@timewarn"
 #define PROTOCOL_PATH "/cluster/dlm/@protocol"
 #define GROUPD_COMPAT_PATH "/cluster/group/@groupd_compat"
+#define ENABLE_FENCING_PATH "/cluster/dlm/@enable_fencing"
+#define ENABLE_QUORUM_PATH "/cluster/dlm/@enable_quorum"
 #define ENABLE_DEADLK_PATH "/cluster/dlm/@enable_deadlk"
 #define ENABLE_PLOCK_PATH "/cluster/dlm/@enable_plock"
 #define PLOCK_DEBUG_PATH "/cluster/dlm/@plock_debug"
@@ -266,6 +272,10 @@ void read_ccs(void)
 		read_ccs_protocol(cd, PROTOCOL_PATH, &cfgk_protocol);
 	if (!optd_groupd_compat)
 		read_ccs_int(cd, GROUPD_COMPAT_PATH, &cfgd_groupd_compat);
+	if (!optd_enable_fencing)
+		read_ccs_int(cd, ENABLE_FENCING_PATH, &cfgd_enable_fencing);
+	if (!optd_enable_quorum)
+		read_ccs_int(cd, ENABLE_QUORUM_PATH, &cfgd_enable_quorum);
 	if (!optd_enable_deadlk)
 		read_ccs_int(cd, ENABLE_DEADLK_PATH, &cfgd_enable_deadlk);
 	if (!optd_enable_plock)
diff --git a/group/dlm_controld/config.h b/group/dlm_controld/config.h
index 0ae121d..83effdb 100644
--- a/group/dlm_controld/config.h
+++ b/group/dlm_controld/config.h
@@ -14,6 +14,8 @@
    we only change them if new values are given on command line or in ccs */
 
 #define DEFAULT_GROUPD_COMPAT 1
+#define DEFAULT_ENABLE_FENCING 1
+#define DEFAULT_ENABLE_QUORUM 1
 #define DEFAULT_ENABLE_DEADLK 0
 #define DEFAULT_ENABLE_PLOCK 1
 #define DEFAULT_PLOCK_DEBUG 0
@@ -27,6 +29,8 @@ extern int optk_debug;
 extern int optk_timewarn;
 extern int optk_protocol;
 extern int optd_groupd_compat;
+extern int optd_enable_fencing;
+extern int optd_enable_quorum;
 extern int optd_enable_deadlk;
 extern int optd_enable_plock;
 extern int optd_plock_debug;
@@ -40,6 +44,8 @@ extern int cfgk_debug;
 extern int cfgk_timewarn;
 extern int cfgk_protocol;
 extern int cfgd_groupd_compat;
+extern int cfgd_enable_fencing;
+extern int cfgd_enable_quorum;
 extern int cfgd_enable_deadlk;
 extern int cfgd_enable_plock;
 extern int cfgd_plock_debug;
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 00c4ce6..6edc893 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -352,11 +352,14 @@ static void node_history_fail(struct lockspace *ls, int nodeid,
 		return;
 	}
 
-	if (!node->add_time)
+	if (cfgd_enable_fencing && !node->add_time)
 		node->check_fencing = 1;
 
-	node->check_quorum = 1;
+	if (cfgd_enable_quorum)
+		node->check_quorum = 1;
+
 	node->check_fs = 1;
+
 	node->removed_seq = cg->seq;	/* for queries */
 	node->failed_reason = reason;	/* for queries */
 }
@@ -369,6 +372,9 @@ static int check_fencing_done(struct lockspace *ls)
 	int wait_count = 0;
 	int rv;
 
+	if (!cfgd_enable_fencing)
+		return 1;
+
 	list_for_each_entry(node, &ls->node_history, list) {
 		if (!node->check_fencing)
 			continue;
@@ -417,6 +423,9 @@ static int check_quorum_done(struct lockspace *ls)
 	struct node *node;
 	int wait_count = 0;
 
+	if (!cfgd_enable_quorum)
+		return 1;
+
 	if (!cman_quorate) {
 		log_group(ls, "check_quorum %d", cman_quorate);
 		return 0;
@@ -619,6 +628,8 @@ static void cleanup_changes(struct lockspace *ls)
 		free_cg(ls->started_change);
 	ls->started_change = cg;
 
+	cg->combined_seq = cg->seq; /* for queries */
+
 	list_for_each_entry_safe(cg, safe, &ls->changes, list) {
 		ls->started_change->combined_seq = cg->seq; /* for queries */
 		list_del(&cg->list);
diff --git a/group/dlm_controld/main.c b/group/dlm_controld/main.c
index e08f805..7e8604c 100644
--- a/group/dlm_controld/main.c
+++ b/group/dlm_controld/main.c
@@ -999,26 +999,30 @@ static void print_usage(void)
 	printf("		on: use libgroup, compat with cluster2/stable2/rhel5\n");
 	printf("		off: use libcpg, no backward compatability\n");
 	printf("		Default is %d\n", DEFAULT_GROUPD_COMPAT);
-	printf("  -d <num>	Enable (1) or disable (0) deadlock code\n");
+	printf("  -f <num>	Enable (1) or disable (0) fencing recovery dependency\n");
+	printf("		Default is %d\n", DEFAULT_ENABLE_FENCING);
+	printf("  -q <num>	Enable (1) or disable (0) quorum recovery dependency\n");
+	printf("		Default is %d\n", DEFAULT_ENABLE_QUORUM);
+	printf("  -d <num>	Enable (1) or disable (0) deadlock detection code\n");
 	printf("		Default is %d\n", DEFAULT_ENABLE_DEADLK);
-	printf("  -p <num>	Enable (1) or disable (0) plock code\n");
+	printf("  -p <num>	Enable (1) or disable (0) plock code for cluster fs\n");
 	printf("		Default is %d\n", DEFAULT_ENABLE_PLOCK);
 	printf("  -P		Enable plock debugging\n");
 	printf("  -l <limit>	Limit the rate of plock operations\n");
 	printf("		Default is %d, set to 0 for no limit\n", DEFAULT_PLOCK_RATE_LIMIT);
-	printf("  -o <n>	plock ownership, 1 enable, 0 disable\n");
+	printf("  -o <n>	Enable (1) or disable (0) plock ownership\n");
 	printf("		Default is %d\n", DEFAULT_PLOCK_OWNERSHIP);
-	printf("  -t <ms>	plock drop resources time (milliseconds)\n");
+	printf("  -t <ms>	plock ownership drop resources time (milliseconds)\n");
 	printf("		Default is %u\n", DEFAULT_DROP_RESOURCES_TIME);
-	printf("  -c <num>	plock drop resources count\n");
+	printf("  -c <num>	plock ownership drop resources count\n");
 	printf("		Default is %u\n", DEFAULT_DROP_RESOURCES_COUNT);
-	printf("  -a <ms>	plock drop resources age (milliseconds)\n");
+	printf("  -a <ms>	plock ownership drop resources age (milliseconds)\n");
 	printf("		Default is %u\n", DEFAULT_DROP_RESOURCES_AGE);
 	printf("  -h		Print this help, then exit\n");
 	printf("  -V		Print program version information, then exit\n");
 }
 
-#define OPTION_STRING			"DKg:d:p:Pl:o:t:c:a:hV"
+#define OPTION_STRING			"DKg:f:q:d:p:Pl:o:t:c:a:hV"
 
 static void read_arguments(int argc, char **argv)
 {
@@ -1048,6 +1052,16 @@ static void read_arguments(int argc, char **argv)
 			cfgk_debug = 1;
 			break;
 
+		case 'f':
+			optd_enable_fencing = 1;
+			cfgd_enable_fencing = atoi(optarg);
+			break;
+
+		case 'q':
+			optd_enable_quorum = 1;
+			cfgd_enable_quorum = atoi(optarg);
+			break;
+
 		case 'd':
 			optd_enable_deadlk = 1;
 			cfgd_enable_deadlk = atoi(optarg);


hooks/post-receive
--
Cluster Project



More information about the Cluster-cvs mailing list