From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci cluster/configured.png cluster/form ...
Date: 2 Jan 2007 20:21:31 -0000 [thread overview]
Message-ID: <20070102202131.25378.qmail@sourceware.org> (raw)
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)
next reply other threads:[~2007-01-02 20:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-02 20:21 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-01-02 20:12 [Cluster-devel] conga/luci cluster/configured.png cluster/form 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=20070102202131.25378.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.