All of lore.kernel.org
 help / color / mirror / Atom feed
From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ./clustermon.spec.in.in ricci/docs/clust ...
Date: 5 Oct 2006 17:38:03 -0000	[thread overview]
Message-ID: <20061005173803.18482.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2006-10-05 17:38:01

Modified files:
	.              : clustermon.spec.in.in 
	ricci/docs     : cluster_api.html 
	ricci/modules/cluster: ClusterConf.cpp ClusterConf.h 
	                       ClusterModule.cpp ClusterStatus.cpp 
	                       ClusterStatus.h 

Log message:
	cluster module: add purge_conf argument to stop_node() (bz202314)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/clustermon.spec.in.in.diff?cvsroot=cluster&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/docs/cluster_api.html.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterConf.cpp.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterConf.h.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterModule.cpp.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterStatus.cpp.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterStatus.h.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- conga/clustermon.spec.in.in	2006/10/04 16:32:40	1.15
+++ conga/clustermon.spec.in.in	2006/10/05 17:38:01	1.16
@@ -194,6 +194,9 @@
 
 
 %changelog
+* Fri Oct 06 2006 Stanko Kupcevic <kupcevic@redhat.com> 0.8-18
+- Add purge_conf argument to stop_node modcluster call (bz202314)
+
 * Wed Oct 04 2006 Stanko Kupcevic <kupcevic@redhat.com> 0.8-17
 - Version bump
 
--- conga/ricci/docs/cluster_api.html	2006/06/20 19:37:22	1.3
+++ conga/ricci/docs/cluster_api.html	2006/10/05 17:38:01	1.4
@@ -125,9 +125,12 @@
 		<P>Stop cluster infrastructure on this node (also, disable daemons'
 		boot startup). <BR>It is not an error to stop already stopped node.
 				</P>
-		<P>Input variables:<BR>- ???cluster_shutdown??? (boolean) ???
+		<P>Input variables:
+		<BR>- ???cluster_shutdown??? (boolean) ???
 		optional, default ???false???, cluster is shutting down (don't
-		bounce services around)</P>
+		bounce services around)
+		<BR>- ???purge_conf??? (boolean) ???
+		optional, default ???false???, delete cluster.conf; start_node() cannot be called any more, without calling set_cluster.conf() first
 		<P>No output variables. 
 		</P>
 		<P>On failure:<BR>- No special errors defined, only generic ones
@@ -148,4 +151,4 @@
 <P><BR><BR>
 </P>
 </BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- conga/ricci/modules/cluster/ClusterConf.cpp	2006/09/26 00:54:26	1.6
+++ conga/ricci/modules/cluster/ClusterConf.cpp	2006/10/05 17:38:01	1.7
@@ -123,6 +123,12 @@
   }
 }
 
+void 
+ClusterConf::purge_conf()
+{
+  unlink(CLUSTER_CONF_PATH.c_str());
+}
+
 bool
 ClusterConf::is_gulm(const XMLObject& cluster_conf)
 {
--- conga/ricci/modules/cluster/ClusterConf.h	2006/03/30 19:53:32	1.2
+++ conga/ricci/modules/cluster/ClusterConf.h	2006/10/05 17:38:01	1.3
@@ -33,6 +33,7 @@
   static XMLObject get();
   static void set(const XMLObject& xml,
 		  bool propagate=true);
+  static void purge_conf();
   
   static bool is_gulm(const XMLObject& cluster_conf);
   static bool is_cman(const XMLObject& cluster_conf);
--- conga/ricci/modules/cluster/ClusterModule.cpp	2006/08/10 22:53:08	1.4
+++ conga/ricci/modules/cluster/ClusterModule.cpp	2006/10/05 17:38:01	1.5
@@ -224,15 +224,20 @@
 stop_node(const VarMap& args)
 {
   bool cluster_shutdown = false;
+  bool purge_conf = false;
   try {
     VarMap::const_iterator iter = args.find("cluster_shutdown");
     if (iter != args.end())
       cluster_shutdown = iter->second.get_bool();
+    iter = args.find("purge_conf");
+    if (iter != args.end())
+      purge_conf = iter->second.get_bool();
   } catch ( String e ) {
     throw APIerror(e);
   }
   
-  Cluster::stop_node(cluster_shutdown);
+  Cluster::stop_node(cluster_shutdown,
+		     purge_conf);
   
   VarMap ret;
   return ret;
--- conga/ricci/modules/cluster/ClusterStatus.cpp	2006/08/15 00:16:30	1.11
+++ conga/ricci/modules/cluster/ClusterStatus.cpp	2006/10/05 17:38:01	1.12
@@ -111,11 +111,12 @@
 void 
 Cluster::start_node(bool cluster_startup)
 {
+  XMLObject cluster_conf(ClusterConf::get()); // bailout if cluster.conf not present
   XMLObject stat = status();
   
   if (stat.get_attr("cluster_version") == "4") {
-    XMLObject cluster_conf(ClusterConf::get());
     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);
@@ -192,7 +193,7 @@
     }
     
     bool use_qdisk = false;
-    XMLObject cluster_conf(ClusterConf::get()); // ccsd should bring newest cluster.conf
+    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++)
@@ -223,7 +224,8 @@
 }
 
 void 
-Cluster::stop_node(bool cluster_shutdown)
+Cluster::stop_node(bool cluster_shutdown,
+		   bool purge_conf)
 {
   XMLObject stat = status();
   
@@ -279,6 +281,10 @@
   } else {
     throw String("unsupported cluster version ") + stat.get_attr("cluster_version");
   }
+  
+  if (purge_conf) {
+    ClusterConf::purge_conf();
+  }
 }
 
 
--- conga/ricci/modules/cluster/ClusterStatus.h	2006/06/20 19:37:23	1.3
+++ conga/ricci/modules/cluster/ClusterStatus.h	2006/10/05 17:38:01	1.4
@@ -33,7 +33,8 @@
   static XMLObject status();
   
   static void start_node(bool cluster_startup = false);
-  static void stop_node(bool cluster_shutdown = false);
+  static void stop_node(bool cluster_shutdown = false,
+			bool purge_conf = false);
   
 };
 



                 reply	other threads:[~2006-10-05 17:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061005173803.18482.qmail@sourceware.org \
    --to=kupcevic@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.