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

[Cluster-devel] conga/ricci/modules/cluster ClusterStatus.cpp



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic sourceware org	2006-10-05 19:24:30

Modified files:
	ricci/modules/cluster: ClusterStatus.cpp 

Log message:
	cluster module: start/stop qdiskd if needed

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterStatus.cpp.diff?cvsroot=cluster&r1=1.12&r2=1.13

--- conga/ricci/modules/cluster/ClusterStatus.cpp	2006/10/05 17:38:01	1.12
+++ conga/ricci/modules/cluster/ClusterStatus.cpp	2006/10/05 19:24:30	1.13
@@ -116,7 +116,6 @@
   
   if (stat.get_attr("cluster_version") == "4") {
     run_initd("ccsd", true, false);
-    cluster_conf = ClusterConf::get(); // ccsd should bring newest cluster.conf
     if (ClusterConf::is_cman(cluster_conf))
       try {
 	run_initd("cman", true, true);
@@ -144,6 +143,16 @@
       }
     }
     
+    bool use_qdisk = false;
+    cluster_conf = ClusterConf::get(); // ccsd should bring newest cluster.conf
+    for (list<XMLObject>::const_iterator iter = cluster_conf.children().begin();
+	 iter != cluster_conf.children().end();
+	 iter++)
+      if (iter->tag() == "quorumd")
+	use_qdisk = true;
+    
+    if (use_qdisk)
+      run_initd("qdiskd", true, false);
     run_initd("fenced", true, false);
     run_initd("clvmd", true, false);
     run_initd("gfs", true, false);
@@ -159,6 +168,10 @@
       run_chkconfig("cman", false);
       run_chkconfig("lock_gulmd", true);
     }
+    if (use_qdisk)
+      run_chkconfig("qdiskd", true);
+    else
+      run_chkconfig("qdiskd", false);
     run_chkconfig("fenced", true);
     run_chkconfig("clvmd", true);
     run_chkconfig("gfs", true);
@@ -199,9 +212,9 @@
 	 iter++)
       if (iter->tag() == "quorumd")
 	use_qdisk = true;
+    
     if (use_qdisk)
       run_initd("qdiskd", true, false);
-    
     run_initd("clvmd", true, false);
     run_initd("gfs", true, false);
     run_initd("gfs2", true, false);
@@ -246,6 +259,7 @@
     run_initd("gfs", false, false);
     run_initd("clvmd", false, false);
     run_initd("fenced", false, false);
+    run_initd("qdiskd", false, false);
     if (ClusterConf::is_cman(ClusterConf::get()))
       cman_leave();
     else
@@ -257,6 +271,7 @@
     run_chkconfig("ccsd", false);
     run_chkconfig("cman", false);
     run_chkconfig("lock_gulmd", false);
+    run_chkconfig("qdiskd", false);
     run_chkconfig("fenced", false);
     run_chkconfig("clvmd", false);
     run_chkconfig("gfs", false);


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