* [Cluster-devel] conga/luci cluster/configured.png cluster/form ...
@ 2007-01-02 20:12 rmccabe
0 siblings, 0 replies; 2+ messages in thread
From: rmccabe @ 2007-01-02 20:12 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-01-02 20:12:23
Modified files:
luci/cluster : configured.png form-macros installed.png
joined.png notstarted.png portlet_cluconfig
rebooted.png
luci/homebase : form-macros
luci/site/luci/Extensions: cluster_adapters.py
homebase_adapters.py
Log message:
fixes for regressions found while testing the fix for bz201394
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/configured.png.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.138&r2=1.139
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/installed.png.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/joined.png.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/notstarted.png.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/portlet_cluconfig.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/rebooted.png.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.50&r2=1.51
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.192&r2=1.193
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.42&r2=1.43
Binary files /cvs/cluster/conga/luci/cluster/configured.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/configured.png 2007/01/02 20:12:22 1.2 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/configured.png: diff failed
--- conga/luci/cluster/form-macros 2006/12/22 17:18:42 1.138
+++ conga/luci/cluster/form-macros 2007/01/02 20:12:22 1.139
@@ -220,7 +220,7 @@
<input name="cluster_os" type="hidden"
tal:attributes="value add_cluster/cluster_os | nothing" />
- <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <table id="systemsTable" class="systemsTable" cellspacing="0">
<thead class="systemsTable">
<tr class="systemsTable"><td class="systemsTable" colspan="2">
<div class="systemsTableTop">
Binary files /cvs/cluster/conga/luci/cluster/installed.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/installed.png 2007/01/02 20:12:22 1.2 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/installed.png: diff failed
Binary files /cvs/cluster/conga/luci/cluster/joined.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/joined.png 2007/01/02 20:12:22 1.2 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/joined.png: diff failed
Binary files /cvs/cluster/conga/luci/cluster/notstarted.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/notstarted.png 2007/01/02 20:12:22 1.2 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/notstarted.png: diff failed
--- conga/luci/cluster/portlet_cluconfig 2006/11/10 19:44:57 1.3
+++ conga/luci/cluster/portlet_cluconfig 2007/01/02 20:12:22 1.4
@@ -34,7 +34,8 @@
tal:omit-tag=""
tal:define="global data python:here.createCluConfigTree(request, modelb)">
-<dl class="portlet" id="portlet-cluconfig-tree">
+<dl class="portlet" id="portlet-cluconfig-tree"
+ tal:condition="data">
<dt class="portletHeader">
<a href="/luci/cluster/index_html?pagetype=3"
tal:attributes="href python:here.getClusterURL(request,modelb)">
Binary files /cvs/cluster/conga/luci/cluster/rebooted.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/rebooted.png 2007/01/02 20:12:22 1.2 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/rebooted.png: diff failed
--- conga/luci/homebase/form-macros 2006/12/21 05:08:48 1.50
+++ conga/luci/homebase/form-macros 2007/01/02 20:12:22 1.51
@@ -293,7 +293,7 @@
<h2 class="homebase">Manage Systems and Clusters</h2>
- <h3>Authenticate to Storage or Cluster Systems</h3>
+ <h3>Reauthenticate to Storage or Cluster Systems</h3>
<form name="authform" method="post" action="">
<table id="systemsTable" class="systemsTable" border="0" cellspacing="0"
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/12/21 21:26:20 1.192
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/01/02 20:12:22 1.193
@@ -86,7 +86,8 @@
clusterName = None
try:
clusterName = str(request.form['clusterName'])
- except:
+ except Exception, e:
+ luci_log.debug_verbose('PNC00: missing cluster name: %s' % str(e))
clusterName = None
if clusterName is None:
@@ -1802,7 +1803,6 @@
#a clustername query var
cluname = request['clustername']
-
nd = {}
nd['Title'] = "Nodes"
nd['cfg_type'] = "nodes"
@@ -2219,8 +2219,20 @@
return alias
def getClusterURL(self, request, model):
- #this method will eventually extract the clustername from the request method
- return "."
+ try:
+ clustername = request.clustername
+ if not clustername:
+ raise Exception, 'cluster name from request is blank'
+ except:
+ try:
+ clustername = model.getClusterName()
+ if not clustername:
+ raise Exception, 'cluster name from model is blank'
+ except:
+ luci_log.debug_verbose('GCURL0: unable to get cluster name')
+ return '.'
+
+ return '/luci/cluster/index_html?pagetype=7&clustername=%s' % clustername
def getTabs(self, req):
###XXX Make this method return only tabs current user can use
--- conga/luci/site/luci/Extensions/homebase_adapters.py 2006/12/21 05:08:49 1.42
+++ conga/luci/site/luci/Extensions/homebase_adapters.py 2007/01/02 20:12:22 1.43
@@ -1189,7 +1189,7 @@
def createSystem(self, host, passwd):
try:
- dummy = self.restrictedTraverse(STORAGE_FOLDER_PATH + host)
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
luci_log.debug_verbose('CS0: %s already exists' % host)
return 'Storage system %s is already managed' % host
except:
@@ -1220,7 +1220,7 @@
return 'Authentication for storage system %s failed' % host
try:
- dummy = self.restrictedTraverse(STORAGE_FOLDER_PATH + host)
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
luci_log.debug_verbose('CS4 %s already exists' % host)
return 'Storage system %s is already managed' % host
except:
@@ -1333,7 +1333,7 @@
try:
# It's already there, as a storage system, no problem.
- dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host))
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
continue
except:
pass
@@ -1392,7 +1392,7 @@
try:
# It's already there, as a storage system, no problem.
- dummy = self.restrictedTraverse(STORAGE_FOLDER_PATH + host)
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
continue
except:
pass
@@ -1417,10 +1417,10 @@
try:
rc = RicciCommunicator(systemName)
if rc is None:
- raise Exception, 'unknown error'
+ raise Exception, 'rc is None'
except Exception, e:
try:
- ssystem.manage_delObjects([systemName])
+ ssystem.manage_delObjects([ systemName ])
except Exception, e:
luci_log.debug_verbose('delSystem1: %s: %s' % (systemName, str(e)))
return 'Unable to delete the storage system %s' % systemName
@@ -1430,22 +1430,32 @@
# Only unauthenticate if the system isn't a member of
# a managed cluster.
cluster_info = rc.cluster_info()
- if not cluster_info[0]:
+ if not cluster_info:
+ cluster_name = None
+ elif not cluster_info[0]:
+ cluster_name = cluster_info[1]
+ else:
+ cluster_name = cluster_info[0]
+
+ unauth = False
+ if not cluster_name:
+ # If it's a member of no cluster, unauthenticate
+ unauth = True
+ else:
+ try:
+ dummy = self.restrictedTraverse(str(CLUSTER_FOLDER_PATH + cluster_name + '/' + systemName)).objectItems()
+ except Exception, e:
+ # It's not a member of a managed cluster, so unauthenticate.
+ unauth = True
+
+ if unauth is True:
try:
rc.unauth()
except:
pass
- else:
- try:
- dummy = self.restrictedTraverse(CLUSTER_FOLDER_PATH + cluster_info[0] + '/' + systemName)
- except:
- try:
- rc.unauth()
- except:
- pass
try:
- ssystem.manage_delObjects([systemName])
+ ssystem.manage_delObjects([ systemName ])
except Exception, e:
luci_log.debug_verbose('delSystem3: %s: %s' % (systemName, str(e)))
return 'Unable to delete storage system %s: %s' \
@@ -1465,15 +1475,14 @@
return err
try:
- clusters.manage_delObjects([clusterName])
+ clusters.manage_delObjects([ clusterName ])
except Exception, e:
luci_log.debug_verbose('delCluster1: %s' % str(e))
return 'Unable to delete cluster %s' % clusterName
def delClusterSystem(self, cluster, systemName):
try:
- if not self.restrictedTraverse(STORAGE_FOLDER_PATH + systemName):
- raise
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + systemName)).objectItems()
except:
# It's not a storage system, so unauthenticate.
try:
@@ -1484,7 +1493,7 @@
% (systemName, str(e)))
try:
- cluster.manage_delObjects([systemName])
+ cluster.manage_delObjects([ systemName ])
except Exception, e:
err_str = 'Error deleting cluster object %s: %s' % (systemName, str(e))
luci_log.debug_verbose('delClusterSystem1: %s' % err_str)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cluster-devel] conga/luci cluster/configured.png cluster/form ...
@ 2007-01-02 20:21 rmccabe
0 siblings, 0 replies; 2+ messages in thread
From: rmccabe @ 2007-01-02 20:21 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-01-02 20:21:26
Modified files:
luci/cluster : configured.png form-macros installed.png
joined.png notstarted.png portlet_cluconfig
rebooted.png
luci/homebase : form-macros
luci/site/luci/Extensions: cluster_adapters.py
homebase_adapters.py
Log message:
fixes for regressions found while testing the fix for bz201394
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/configured.png.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.90.2.11&r2=1.90.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/installed.png.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/joined.png.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/notstarted.png.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/portlet_cluconfig.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/rebooted.png.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.44.2.5&r2=1.44.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.120.2.15&r2=1.120.2.16
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.34.2.7&r2=1.34.2.8
Binary files /cvs/cluster/conga/luci/cluster/configured.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/configured.png 2007/01/02 20:21:25 1.1.2.1 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/configured.png: diff failed
--- conga/luci/cluster/form-macros 2006/12/22 17:50:16 1.90.2.11
+++ conga/luci/cluster/form-macros 2007/01/02 20:21:25 1.90.2.12
@@ -220,7 +220,7 @@
<input name="cluster_os" type="hidden"
tal:attributes="value add_cluster/cluster_os | nothing" />
- <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <table id="systemsTable" class="systemsTable" cellspacing="0">
<thead class="systemsTable">
<tr class="systemsTable"><td class="systemsTable" colspan="2">
<div class="systemsTableTop">
Binary files /cvs/cluster/conga/luci/cluster/installed.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/installed.png 2007/01/02 20:21:26 1.1.2.1 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/installed.png: diff failed
Binary files /cvs/cluster/conga/luci/cluster/joined.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/joined.png 2007/01/02 20:21:26 1.1.2.1 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/joined.png: diff failed
Binary files /cvs/cluster/conga/luci/cluster/notstarted.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/notstarted.png 2007/01/02 20:21:26 1.1.2.1 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/notstarted.png: diff failed
--- conga/luci/cluster/portlet_cluconfig 2006/11/16 19:34:52 1.2.2.1
+++ conga/luci/cluster/portlet_cluconfig 2007/01/02 20:21:26 1.2.2.2
@@ -34,7 +34,8 @@
tal:omit-tag=""
tal:define="global data python:here.createCluConfigTree(request, modelb)">
-<dl class="portlet" id="portlet-cluconfig-tree">
+<dl class="portlet" id="portlet-cluconfig-tree"
+ tal:condition="data">
<dt class="portletHeader">
<a href="/luci/cluster/index_html?pagetype=3"
tal:attributes="href python:here.getClusterURL(request,modelb)">
Binary files /cvs/cluster/conga/luci/cluster/rebooted.png 2006/10/11 04:39:44 1.1 and /cvs/cluster/conga/luci/cluster/rebooted.png 2007/01/02 20:21:26 1.1.2.1 differ
rcsdiff: /cvs/cluster/conga/luci/cluster/rebooted.png: diff failed
--- conga/luci/homebase/form-macros 2006/12/22 17:50:16 1.44.2.5
+++ conga/luci/homebase/form-macros 2007/01/02 20:21:26 1.44.2.6
@@ -293,7 +293,7 @@
<h2 class="homebase">Manage Systems and Clusters</h2>
- <h3>Authenticate to Storage or Cluster Systems</h3>
+ <h3>Reauthenticate to Storage or Cluster Systems</h3>
<form name="authform" method="post" action="">
<table id="systemsTable" class="systemsTable" border="0" cellspacing="0"
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/12/22 17:50:16 1.120.2.15
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/01/02 20:21:26 1.120.2.16
@@ -86,7 +86,8 @@
clusterName = None
try:
clusterName = str(request.form['clusterName'])
- except:
+ except Exception, e:
+ luci_log.debug_verbose('PNC00: missing cluster name: %s' % str(e))
clusterName = None
if clusterName is None:
@@ -1802,7 +1803,6 @@
#a clustername query var
cluname = request['clustername']
-
nd = {}
nd['Title'] = "Nodes"
nd['cfg_type'] = "nodes"
@@ -2219,8 +2219,20 @@
return alias
def getClusterURL(self, request, model):
- #this method will eventually extract the clustername from the request method
- return "."
+ try:
+ clustername = request.clustername
+ if not clustername:
+ raise Exception, 'cluster name from request is blank'
+ except:
+ try:
+ clustername = model.getClusterName()
+ if not clustername:
+ raise Exception, 'cluster name from model is blank'
+ except:
+ luci_log.debug_verbose('GCURL0: unable to get cluster name')
+ return '.'
+
+ return '/luci/cluster/index_html?pagetype=7&clustername=%s' % clustername
def getTabs(self, req):
###XXX Make this method return only tabs current user can use
--- conga/luci/site/luci/Extensions/homebase_adapters.py 2006/12/22 17:50:16 1.34.2.7
+++ conga/luci/site/luci/Extensions/homebase_adapters.py 2007/01/02 20:21:26 1.34.2.8
@@ -1189,7 +1189,7 @@
def createSystem(self, host, passwd):
try:
- dummy = self.restrictedTraverse(STORAGE_FOLDER_PATH + host)
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
luci_log.debug_verbose('CS0: %s already exists' % host)
return 'Storage system %s is already managed' % host
except:
@@ -1220,7 +1220,7 @@
return 'Authentication for storage system %s failed' % host
try:
- dummy = self.restrictedTraverse(STORAGE_FOLDER_PATH + host)
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
luci_log.debug_verbose('CS4 %s already exists' % host)
return 'Storage system %s is already managed' % host
except:
@@ -1333,7 +1333,7 @@
try:
# It's already there, as a storage system, no problem.
- dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host))
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
continue
except:
pass
@@ -1392,7 +1392,7 @@
try:
# It's already there, as a storage system, no problem.
- dummy = self.restrictedTraverse(STORAGE_FOLDER_PATH + host)
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + host)).objectItems()
continue
except:
pass
@@ -1417,10 +1417,10 @@
try:
rc = RicciCommunicator(systemName)
if rc is None:
- raise Exception, 'unknown error'
+ raise Exception, 'rc is None'
except Exception, e:
try:
- ssystem.manage_delObjects([systemName])
+ ssystem.manage_delObjects([ systemName ])
except Exception, e:
luci_log.debug_verbose('delSystem1: %s: %s' % (systemName, str(e)))
return 'Unable to delete the storage system %s' % systemName
@@ -1430,22 +1430,32 @@
# Only unauthenticate if the system isn't a member of
# a managed cluster.
cluster_info = rc.cluster_info()
- if not cluster_info[0]:
+ if not cluster_info:
+ cluster_name = None
+ elif not cluster_info[0]:
+ cluster_name = cluster_info[1]
+ else:
+ cluster_name = cluster_info[0]
+
+ unauth = False
+ if not cluster_name:
+ # If it's a member of no cluster, unauthenticate
+ unauth = True
+ else:
+ try:
+ dummy = self.restrictedTraverse(str(CLUSTER_FOLDER_PATH + cluster_name + '/' + systemName)).objectItems()
+ except Exception, e:
+ # It's not a member of a managed cluster, so unauthenticate.
+ unauth = True
+
+ if unauth is True:
try:
rc.unauth()
except:
pass
- else:
- try:
- dummy = self.restrictedTraverse(CLUSTER_FOLDER_PATH + cluster_info[0] + '/' + systemName)
- except:
- try:
- rc.unauth()
- except:
- pass
try:
- ssystem.manage_delObjects([systemName])
+ ssystem.manage_delObjects([ systemName ])
except Exception, e:
luci_log.debug_verbose('delSystem3: %s: %s' % (systemName, str(e)))
return 'Unable to delete storage system %s: %s' \
@@ -1465,15 +1475,14 @@
return err
try:
- clusters.manage_delObjects([clusterName])
+ clusters.manage_delObjects([ clusterName ])
except Exception, e:
luci_log.debug_verbose('delCluster1: %s' % str(e))
return 'Unable to delete cluster %s' % clusterName
def delClusterSystem(self, cluster, systemName):
try:
- if not self.restrictedTraverse(STORAGE_FOLDER_PATH + systemName):
- raise
+ dummy = self.restrictedTraverse(str(STORAGE_FOLDER_PATH + systemName)).objectItems()
except:
# It's not a storage system, so unauthenticate.
try:
@@ -1484,7 +1493,7 @@
% (systemName, str(e)))
try:
- cluster.manage_delObjects([systemName])
+ cluster.manage_delObjects([ systemName ])
except Exception, e:
err_str = 'Error deleting cluster object %s: %s' % (systemName, str(e))
luci_log.debug_verbose('delClusterSystem1: %s' % err_str)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-02 20:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-02 20:21 [Cluster-devel] conga/luci cluster/configured.png cluster/form rmccabe
-- strict thread matches above, loose matches on Subject: below --
2007-01-02 20:12 rmccabe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).