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

[Cluster-devel] Re: [RFC PATCH] dlm: enhancing dlm_controld (pcmk) to be able to handle redundant rings

On Thu, Oct 15, 2009 at 2:17 AM, David Teigland <teigland redhat com> wrote:
On Wed, Oct 14, 2009 at 06:50:56PM +0800, Jiaju Zhang wrote:
> Hi,
> Since there is no proper way to enable SCTP when using pacemaker stack,
> this patch is to auto-enabled SCTP when redundant rings have been configured
> in corosync.
> Review and comments are welcome :)


Could we just make it a command line option?  Is it important to turn on
Yes, making it a command line option also works fine and it is simpler than that patch. Attached is a new patch which adding a command line option, I'll be very appreciated for your review and comments.

The reason I wanted to turn on SCTP automatically is that it might have a little better usability since the user won't care the detail "redundant rings need SCTP to be configured" and even if the user hasn't read the manual very carefully and hasn't turn on SCTP in command line, the software will also help him to do this.
That was my original thought, I don't know which one is better at that time.

Thanks again for your review of the new patch :)

Signed-off-by: Jiaju Zhang <jjzhang linux gmail com>


diff -Nupr a/group/dlm_controld/main.c b/group/dlm_controld/main.c
--- a/group/dlm_controld/main.c	2009-10-14 18:00:20.000000000 +0800
+++ b/group/dlm_controld/main.c	2009-10-15 12:17:47.000000000 +0800
@@ -1058,11 +1058,13 @@ static void print_usage(void)
 	printf("		Default is %u\n", DEFAULT_DROP_RESOURCES_COUNT);
 	printf("  -a <ms>	plock ownership drop resources age (milliseconds)\n");
 	printf("		Default is %u\n", DEFAULT_DROP_RESOURCES_AGE);
+	printf("  -r <num>	Options to select TCP (0) or SCTP (1) as communication protocol\n");
+	printf("		Default is TCP\n");
 	printf("  -h		Print this help, then exit\n");
 	printf("  -V		Print program version information, then exit\n");
-#define OPTION_STRING "LDKf:q:d:p:Pl:o:t:c:a:hV"
+#define OPTION_STRING "LDKf:q:d:p:Pl:o:t:c:a:r:hV"
 static void read_arguments(int argc, char **argv)
@@ -1142,6 +1144,11 @@ static void read_arguments(int argc, cha
 			cfgd_drop_resources_age = atoi(optarg);
+		case 'r':
+			optk_protocol = 1;
+			cfgk_protocol = atoi(optarg);
+			break;
 		case 'h':

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