All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/site/luci/Extensions LuciClusterAct ...
Date: 26 Jul 2007 04:21:00 -0000	[thread overview]
Message-ID: <20070726042100.19084.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2007-07-26 04:20:59

Modified files:
	luci/site/luci/Extensions: LuciClusterActions.py LuciDB.py 
	                           RicciQueries.py conga_constants.py 

Log message:
	Fix for bz249291

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterActions.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.2&r2=1.1.4.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciDB.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.3&r2=1.1.4.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/RicciQueries.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.3&r2=1.1.4.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.19.2.12&r2=1.19.2.13

--- conga/luci/site/luci/Extensions/LuciClusterActions.py	2007/06/19 15:54:10	1.1.4.2
+++ conga/luci/site/luci/Extensions/LuciClusterActions.py	2007/07/26 04:20:59	1.1.4.3
@@ -245,7 +245,11 @@
 		return None
 	return True
 
-def NodeLeaveCluster(self, rc, clustername, nodename_resolved):
+def NodeLeaveCluster(	self,
+						rc,
+						clustername,
+						nodename_resolved,
+						stop_cluster=False):
 	reported_cluname = None
 	try:
 		cluster_info = rc.cluster_info()
@@ -266,7 +270,7 @@
 				% nodename_resolved)
 		return None
 
-	batch_number, result = rq.nodeLeaveCluster(rc)
+	batch_number, result = rq.nodeLeaveCluster(rc, cluster_shutdown=stop_cluster)
 	if batch_number is None or result is None:
 		if LUCI_DEBUG_MODE is True:
 			luci_log.debug_verbose('NLC2: %s: batch_number or result is None' \
@@ -367,7 +371,7 @@
 	# First, delete cluster.conf from node to be deleted.
 	# next, have node leave cluster.
 
-	batch_number, result = rq.nodeLeaveCluster(rc, purge=False)
+	batch_number, result = rq.nodeLeaveCluster(rc, purge=True)
 	if batch_number is None or result is None:
 		if LUCI_DEBUG_MODE is True:
 			luci_log.debug_verbose('ND5: batch_number and/or result is None')
@@ -505,7 +509,8 @@
 					luci_log.debug_verbose('CStop1: [1] nodeDelete failed')
 				errors += 1
 		else:
-			ret = NodeLeaveCluster(self, rc, clustername, nodename_resolved)
+			ret = NodeLeaveCluster(self, rc, clustername,
+					nodename_resolved, stop_cluster=True)
 			if ret is None:
 				if LUCI_DEBUG_MODE is True:
 					luci_log.debug_verbose('CStop2: [0] nodeLeave %s' \
--- conga/luci/site/luci/Extensions/LuciDB.py	2007/07/16 21:35:17	1.1.4.3
+++ conga/luci/site/luci/Extensions/LuciDB.py	2007/07/26 04:20:59	1.1.4.4
@@ -825,6 +825,7 @@
 				if LUCI_DEBUG_MODE is True:
 					luci_log.debug_verbose('GRA8: cluster name is none for %s' \
 						% ricci_hostname)
+				raise Exception, '%s not in a cluster' % ricci_hostname
 
 			cur_alias = str(clu_info[1]).strip().lower()
 			if not cur_alias:
--- conga/luci/site/luci/Extensions/RicciQueries.py	2007/07/16 21:35:17	1.1.4.3
+++ conga/luci/site/luci/Extensions/RicciQueries.py	2007/07/26 04:20:59	1.1.4.4
@@ -701,17 +701,19 @@
 
 	try:
 		ret = rc.process_batch(batch)
+		if not ret:
+			raise Exception, 'no XML response'
 	except Exception, e:
 		if LUCI_DEBUG_MODE is True:
 			luci_log.debug_verbose('GCC1: process_batch error for %s: %r %s' \
 				% (system_info, e, str(e)))
 		return None
 
-	if not ret:
-		return None
-
 	var_nodes = ret.getElementsByTagName('var')
 	for i in var_nodes:
 		if i.getAttribute('name') == 'cluster.conf':
 			return i.childNodes[0]
+
+	if LUCI_DEBUG_MODE is True:
+		luci_log.debug_verbose('GCC2: no conf node found')
 	return None
--- conga/luci/site/luci/Extensions/conga_constants.py	2007/06/27 07:43:17	1.19.2.12
+++ conga/luci/site/luci/Extensions/conga_constants.py	2007/07/26 04:20:59	1.19.2.13
@@ -134,7 +134,7 @@
 	'A problem occurred when starting this node: %s'
 ]
 
-REDIRECT_SEC = 3
+REDIRECT_SEC = 5
 
 # cluster/node create error status messages
 PRE_INSTALL = 'The install state is not yet complete.'



             reply	other threads:[~2007-07-26  4:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26  4:21 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-08-05 18:16 [Cluster-devel] conga/luci/site/luci/Extensions LuciClusterAct rmccabe
2007-10-22 19:24 rmccabe
2007-09-28  5:36 rmccabe
2007-08-09 21:35 rmccabe
2007-05-23 21:21 rmccabe
2007-05-22 21:52 rmccabe
2007-05-18  5:23 rmccabe
2007-05-14 18:00 rmccabe

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=20070726042100.19084.qmail@sourceware.org \
    --to=rmccabe@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.