Hi Andrew & all,

  Since 1.0.1, pacemaker can start mgmtd automatic when "use_mgmtd:
yes" is specified.  This is a very handy feature.

  Now I'm wondering about something similar for clvmd ? How about a
"use_clvmd" option as well ?

  I create/test a simple patch for this purpose. Can you give some
comments on this ?
Index: pacemaker/lib/ais/plugin.c
===================================================================
--- pacemaker.orig/lib/ais/plugin.c	2008-11-22 01:42:50.000000000 +0800
+++ pacemaker/lib/ais/plugin.c	2008-12-02 23:07:21.000000000 +0800
@@ -91,6 +91,7 @@
     { 0, crm_proc_stonithd, crm_flag_none,    1, 0, TRUE,  "stonithd", NULL,       HA_LIBHBDIR"/stonithd", NULL, NULL },
     { 0, crm_proc_pe,       crm_flag_none,    4, 0, TRUE,  "pengine",  HA_CCMUSER, HA_LIBHBDIR"/pengine",  NULL, NULL },
     { 0, crm_proc_mgmtd,    crm_flag_none,    7, 0, TRUE,  "mgmtd",    NULL,	   HA_LIBHBDIR"/mgmtd",    NULL, NULL },
+    { 0, crm_proc_clvmd,    crm_flag_none,    8, 0, TRUE,  "clvmd",    NULL,	   "/usr/sbin/clvmd -d 2",    NULL, NULL },
 };
 
 void send_cluster_id(void);
@@ -341,6 +342,17 @@
 	    }
 	}
     }
+
+	get_config_opt(crm_api, local_handle, "use_clvmd", &value, "no");
+	if (ais_get_boolean(value) == FALSE) {
+		int lpc = 0;
+		for (; lpc < SIZEOF(crm_children); lpc++) {
+			if (crm_proc_clvmd & crm_children[lpc].flag) {
+				crm_children[lpc].start_seq = 0;
+				break;
+			}
+		}
+	}
     
     config_find_done(crm_api, local_handle);
 }
Index: pacemaker/include/crm/ais_common.h
===================================================================
--- pacemaker.orig/include/crm/ais_common.h	2008-11-22 01:42:50.000000000 +0800
+++ pacemaker/include/crm/ais_common.h	2008-12-02 22:37:37.000000000 +0800
@@ -124,6 +124,7 @@
     crm_proc_pe      = 0x00010000,
     crm_proc_te      = 0x00020000,
     crm_proc_mgmtd   = 0x00040000,
+    crm_proc_clvmd   = 0x00080000,
 };
 
 typedef struct crm_peer_node_s 
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker

Reply via email to