conga/luci/site/luci/Extensions LuciClusterAct ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: EXPERIMENTAL
Changes by: rmccabe at sourceware.org 2007-05-18 05:23:55
Modified files:
luci/site/luci/Extensions: LuciClusterActions.py
LuciClusterInfo.py LuciDB.py LuciZope.py RicciQueries.py cluster_adapters.py homebase_adapters.py ricci_communicator.py system_adapters.py
Log message:
Better debug log messages.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterActions.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.5&r2=1.1.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciDB.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.8&r2=1.1.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZope.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.6&r2=1.1.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/RicciQueries.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.4&r2=1.1.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.255.2.7&r2=1.255.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.50.2.5&r2=1.50.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_communicator.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.25.2.4&r2=1.25.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/system_adapters.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.2.2.3&r2=1.2.2.4
luci/site/luci/Extensions/Attic/LuciClusterActions.py +5 -3
@@ -22,7 +22,8 @@ raise Exception, 'cluster name from model.getClusterName() is blank' except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('PCC0: getClusterName: %r' % e) + luci_log.debug_verbose('PCC0: getClusterName: %r %s' \ + % (e, str(e))) errors.append('Unable to determine cluster name') return (False, { 'errors': errors, 'messages': messages })
@@ -43,7 +44,7 @@ raise Exception, 'The new cluster configuration is blank' except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('PCC2: %r' % e) + luci_log.debug_verbose('PCC2: %r %s' % (e, str(e))) errors.append(repr(e)) return (False, { 'errors': errors, 'messages': messages })
@@ -61,5 +62,6 @@ clustername) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('PCC4: set_node_flag: %r' % e) + luci_log.debug_verbose('PCC4: set_node_flag: %r %s' \ + % (e, str(e))) return (True, { 'errors': errors, 'messages': messages, 'batchid': batch_id })
luci/site/luci/Extensions/Attic/LuciClusterInfo.py +15 -17
@@ -32,7 +32,7 @@ return map(lambda x: str(x.getName()), model.getNodes()) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('getnodes0: %r' % e) + luci_log.debug_verbose('getnodes0: %r %s' % (e, str(e))) return [] def getResourceInfo(model, name, res=None):
@@ -79,14 +79,14 @@ results.append(vals) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GCSM0: %r' % e) + luci_log.debug_verbose('GCSM0: %r %s' % (e, str(e))) return None try: nodelist = model.getNodes() except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GCSM1: %r' % e) + luci_log.debug_verbose('GCSM1: %r %s' % (e, str(e))) return None for node in nodelist:
@@ -123,7 +123,7 @@ raise Exception, 'doc is None' except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GCS0: error: %r' % e) + luci_log.debug_verbose('GCS0: error: %r %s' % (e, str(e))) doc = None if doc is None and not cluname:
@@ -135,7 +135,7 @@ return cinfo except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GCS1: %r' % e) + luci_log.debug_verbose('GCS1: %r %s' % (e, str(e))) doc = None if not doc:
@@ -161,7 +161,7 @@ return cinfo except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GCS1a: unable to get cluster info from DB: %r' % e) + luci_log.debug_verbose('GCS1a: unable to get cluster info from DB: %r %s' % (e, str(e))) return [] results = list()
@@ -463,7 +463,7 @@ fdom = model.getFailoverDomainByName(request['fdomname']) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('getFdomInfo0: %r' % e) + luci_log.debug_verbose('getFdomInfo0: %r %s' % (e, str(e))) return fhash fhash['name'] = fdom.getName()
@@ -589,7 +589,7 @@ req.SESSION.set('model', model) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GCI1: unable to get model for cluster %s: %r' % (cluname, e)) + luci_log.debug_verbose('GCI1: unable to get model for cluster %s: %r %s' % (cluname, e, str(e))) return {} else: totem = model.getTotemPtr()
@@ -827,7 +827,7 @@ nodename = request['nodename'] except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('getNodeInfo0: %r' % e) + luci_log.debug_verbose('getNodeInfo0: %r %s' % (e, str(e))) return {} # extract correct node line from cluster status
@@ -1168,7 +1168,7 @@ nodename = request.form['nodename'] except: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('getFenceInfo2: unable to extract nodename: %r' % e) + luci_log.debug_verbose('getFenceInfo2: unable to extract nodename: %r %s' % (e, str(e))) return {} # Here we need to get fences for a node - just the first two levels
@@ -1180,7 +1180,7 @@ node = model.retrieveNodeByName(nodename) except GeneralError, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('getFenceInfo3: unable to find node name "%s" in current node list: %r' % (str(nodename), e)) + luci_log.debug_verbose('getFenceInfo3: unable to find node name "%s" in current node list: %r %s' % (str(nodename), e, str(e))) return {} fds = model.getFenceDevices()
@@ -1547,7 +1547,7 @@ raise Exception, 'getClusterConf returned None' except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GMB0: unable to get cluster_conf_node in getModelBuilder: %r' % e) + luci_log.debug_verbose('GMB0: unable to get cluster_conf_node in getModelBuilder: %r %s' % (e, str(e))) return None try:
@@ -1557,7 +1557,7 @@ except Exception, e: try: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GMB1: An error occurred while trying to get model for conf "%r": %r' % (cluster_conf_node.toxml(), e)) + luci_log.debug_verbose('GMB1: An error occurred while trying to get model for conf "%s": %r %s' % (cluster_conf_node.toxml(), e, str(e))) except: if LUCI_DEBUG_MODE is True: luci_log.debug_verbose('GMB1: ModelBuilder failed')
@@ -1572,8 +1572,7 @@ rc = getRicciAgent(self, clustername) if not rc: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GMFC0: unable to find a ricci agent for %s' \ - % clustername) + luci_log.debug_verbose('GMFC0: unable to find a ricci agent for %s' % clustername) return None try:
@@ -1582,8 +1581,7 @@ raise Exception, 'model is none' except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GMFC1: unable to get model builder for %s: %r' \ - % (clustername, e)) + luci_log.debug_verbose('GMFC1: unable to get model builder for %s: %r %s' % (clustername, e, str(e))) return None return model
luci/site/luci/Extensions/Attic/LuciDB.py +98 -81
476 lines not on this page · raw message
luci/site/luci/Extensions/Attic/LuciZope.py +3 -2
@@ -20,7 +20,7 @@ return os.path.isfile('%sprivkey.pem' % CERTS_DIR_PATH) and os.path.isfile('%scacert.pem' % CERTS_DIR_PATH) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('SIS0: %r' % e) + luci_log.debug_verbose('SIS0: %r %s' % (e, str(e))) return False def strFilter(regex, replaceChar, arg):
@@ -121,5 +121,6 @@ request.SESSION.set('model', model) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('Appending model to request failed: %r' % e) + luci_log.debug_verbose('Appending model to request failed: %r %s' \ + % (e, str(e))) return 'An error occurred while storing the cluster model'
luci/site/luci/Extensions/Attic/RicciQueries.py +36 -22
166 lines not on this page · raw message
luci/site/luci/Extensions/cluster_adapters.py +214 -157
1,117 lines not on this page · raw message
luci/site/luci/Extensions/homebase_adapters.py +100 -65
408 lines not on this page · raw message
luci/site/luci/Extensions/ricci_communicator.py +2 -2
@@ -439,8 +439,8 @@ luci_log.debug_verbose('RC:BS1: Returning (%d, %d) for batch_status("%s")' % (last, total, batch_xml.toxml())) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('RC:BS2: error %r: (last, total)' % \ - (e, last, total)) + luci_log.debug_verbose('RC:BS2: error %r %s: (last, total)' \ + % (e, str(e), last, total)) return (last, total) # extract error_code from module's response
luci/site/luci/Extensions/system_adapters.py +4 -4
@@ -20,7 +20,7 @@ raise Exception, 'None' except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('GSSL0: %s: %r' % (hostname, e)) + luci_log.debug_verbose('GSSL0: %s: %r %s' % (hostname, e, str(e))) return [] service_list = list_services(rc)
@@ -84,7 +84,7 @@ raise Exception, 'unknown error' except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('VSU0: %s: %r' % (hostname, e)) + luci_log.debug_verbose('VSU0: %s: %r %s' % (hostname, e, str(e))) return (False, {'errors': [ 'Unable to connect to the ricci agent on %s: %s' % (hostname, str(e)) ]}) sys_svc_list = list()
@@ -97,7 +97,7 @@ sys_svc_list.append(svc_name) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('VSU1: %s: %r' % (hostname, e)) + luci_log.debug_verbose('VSU1: %s: %r %s' % (hostname, e, str(e))) return (False, {'errors': [ 'Unable to retrieve the list of services from %s' % hostname ]}) try:
@@ -148,7 +148,7 @@ ret = svc_manage(rc, hostname, servicename, op) except Exception, e: if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('VMS0: %r' % e) + luci_log.debug_verbose('VMS0: %r %s' % (e, str(e))) result.setAttribute('message', str(e)) ret.appendChild(result) else: