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

[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-11-03 01:24:56

Modified files:
	luci/site/luci/Extensions: cluster_adapters.py 

Log message:
	fix the log url on the cluster node list page

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.140&r2=1.141

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/11/03 01:08:01	1.140
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/11/03 01:24:56	1.141
@@ -2551,15 +2551,16 @@
 
   #return infohash
   infohash['d_states'] = None
+
+  try:
+    nodename_resolved = resolve_nodename(self, clustername, nodename)
+  except:
+    luci_log.debug_verbose('Unable to resolve node name %s/%s to retrieve daemon information' % (nodename, clustername))
+    nodename_resolved = nodename
+
   if nodestate == NODE_ACTIVE or nodestate == NODE_INACTIVE:
   #call service module on node and find out which daemons are running
     try:
-      nodename_resolved = resolve_nodename(self, clustername, nodename)
-    except:
-      luci_log.debug_verbose('Unable to resolve node name %s/%s to retrieve daemon information' % (nodename, clustername))
-      nodename_resolved = nodename
-
-    try:
       rc = RicciCommunicator(nodename_resolved)
       if not rc:
         raise Exception, 'rc is none'
@@ -2576,14 +2577,12 @@
       dlist.append("rgmanager")
       states = getDaemonStates(rc, dlist)
       infohash['d_states'] = states
-  else:
-    nodename_resolved = nodename
 
   infohash['logurl'] = '/luci/logs/?nodename=' + nodename_resolved + '&clustername=' + clustername
   return infohash
   #get list of faildoms for node
 
-def getNodesInfo(self, model,status,req):
+def getNodesInfo(self, model, status,req):
   resultlist = list()
   nodelist = list()
   svclist = list()
@@ -2615,7 +2614,15 @@
       map['status'] = NODE_INACTIVE
       map['status_str'] = NODE_INACTIVE_STR
 
-    map['logurl'] = '/luci/logs?nodename=' + name + '&clustername=' + clustername
+    try:
+      nodename_resolved = resolve_nodename(self, clustername, name)
+    except:
+      luci_log.debug_verbose('Unable to resolve node name %s/%s' \
+          % (nodename, clustername))
+      nodename_resolved = name 
+
+    map['logurl'] = '/luci/logs?nodename=' + nodename_resolved + '&clustername=' + clustername
+
     #set up URLs for dropdown menu...
     if map['status'] == NODE_ACTIVE:
       map['jl_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_LEAVE_CLUSTER + "&nodename=" + name + "&clustername=" + clustername


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