[Cluster-devel] conga/luci/site/luci/Extensions LuciSyslog.py ...

rmccabe at sourceware.org rmccabe at sourceware.org
Fri Oct 20 22:29:23 UTC 2006


CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2006-10-20 22:29:22

Modified files:
	luci/site/luci/Extensions: LuciSyslog.py cluster_adapters.py 
	                           ricci_bridge.py ricci_communicator.py 

Log message:
	fix debug output of ricci's sent data
	fix openlog call

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciSyslog.py.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.124&r2=1.125
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_communicator.py.diff?cvsroot=cluster&r1=1.13&r2=1.14

--- conga/luci/site/luci/Extensions/LuciSyslog.py	2006/10/20 22:20:43	1.6
+++ conga/luci/site/luci/Extensions/LuciSyslog.py	2006/10/20 22:29:22	1.7
@@ -15,7 +15,7 @@
 	def __init__(self):
 		self.__init = 0
 		try:
-			openlog('luci', LOG_DAEMON, LOG_PID | LOG_NDELAY)
+			openlog('luci', LOG_PID | LOG_NDELAY, LOG_DAEMON)
 			self.__init = 1
 		except:
 			raise LuciSyslogError, 'unable to setup syslog functionality.'
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/20 22:20:43	1.124
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/20 22:29:22	1.125
@@ -2242,7 +2242,7 @@
 
 		#First, delete cluster.conf from node to be deleted.
 		#next, have node leave cluster.
-		batch_number, result = nodeLeaveCluster(rc)
+		batch_number, result = nodeLeaveCluster(rc, purge=True)
 
 		#It is not worth flagging this node in DB, as we are going
 		#to delete it anyway. Now, we need to delete node from model
--- conga/luci/site/luci/Extensions/ricci_bridge.py	2006/10/16 20:56:09	1.30
+++ conga/luci/site/luci/Extensions/ricci_bridge.py	2006/10/20 22:29:22	1.31
@@ -298,7 +298,7 @@
 		return (None, None)
 	return batchAttemptResult(doc)
 
-def nodeLeaveCluster(rc, cluster_shutdown=False, purge=True):
+def nodeLeaveCluster(rc, cluster_shutdown=False, purge=False):
 	cshutdown = 'false'
 	if cluster_shutdown == True:
 		cshutdown = 'true'
--- conga/luci/site/luci/Extensions/ricci_communicator.py	2006/10/20 20:00:29	1.13
+++ conga/luci/site/luci/Extensions/ricci_communicator.py	2006/10/20 22:29:22	1.14
@@ -47,7 +47,7 @@
         hello = self.__receive()
         try:
             luci_log.debug_verbose('Received header from %s: \"%s\"' \
-				% (self.__hostname, hello.toxml()))
+                % (self.__hostname, hello.toxml()))
         except:
             pass
 
@@ -267,8 +267,11 @@
                 raise RicciError, 'write error while sending XML to host %s' \
                         % self.__hostname
             buff = buff[pos:]
-        luci_log.debug_verbose('Sent XML \"%s\" to host %s' \
-            % (buff, self.__hostname))
+        try:
+            luci_log.debug_verbose('Sent XML \"%s\" to host %s' \
+                % (xml_doc.toxml(), self.__hostname))
+        except:
+            pass
         return
     
     def __receive(self):




More information about the Cluster-devel mailing list