From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci homebase/form-macros site/luci/Exte ...
Date: 31 Oct 2006 19:09:28 -0000 [thread overview]
Message-ID: <20061031190928.12435.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2006-10-31 19:09:28
Modified files:
luci/homebase : form-macros
luci/site/luci/Extensions: homebase_adapters.py
Log message:
back out patch that tried to address the memory use problems
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.44.2.1&r2=1.44.2.2
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.3&r2=1.34.2.4
--- conga/luci/homebase/form-macros 2006/10/31 17:28:04 1.44.2.1
+++ conga/luci/homebase/form-macros 2006/10/31 19:09:25 1.44.2.2
@@ -1,7 +1,7 @@
<html>
<tal:comment tal:replace="nothing">
- $Id: form-macros,v 1.44.2.1 2006/10/31 17:28:04 rmccabe Exp $
+ $Id: form-macros,v 1.44.2.2 2006/10/31 19:09:25 rmccabe Exp $
</tal:comment>
<head>
@@ -554,11 +554,8 @@
set_page_title('Luci ??? homebase ??? Add a running cluster to be managed by Luci');
</script>
- <tal:block tal:condition="python: request.SESSION.has_key('checkRet')"
- tal:define="global sessionObj python:request.SESSION.get('checkRet')" />
-
- <tal:block tal:condition="python: not request.SESSION.has_key('checkRet')"
- tal:define="global sessionObj python:{}" />
+ <tal:block tal:define="
+ global sessionObj python:request.SESSION.get('checkRet')" />
<h2 class="homebase">Add Cluster</h2>
--- conga/luci/site/luci/Extensions/homebase_adapters.py 2006/10/31 17:28:04 1.34.2.3
+++ conga/luci/site/luci/Extensions/homebase_adapters.py 2006/10/31 19:09:27 1.34.2.4
@@ -13,6 +13,15 @@
from ricci_communicator import CERTS_DIR_PATH
from clusterOS import resolveOSType
from conga_constants import *
+from LuciSyslog import LuciSyslog, LuciSyslogError
+
+try:
+ luci_log = LuciSyslog()
+except LuciSyslogError, e:
+ pass
+
+class InCluster(Exception):
+ pass
def siteIsSetup(self):
try:
@@ -296,7 +305,8 @@
try:
sessionData = request.SESSION.get('checkRet')
requestResults = sessionData['requestResults']
- except:
+ except Exception, e:
+ luci_log.debug_verbose('VAC0: error getting session obj: %s' % str(e))
try:
clusterName = request.form['clusterName']
except:
@@ -304,24 +314,27 @@
try:
nodeList = requestResults['nodeList']
+ luci_log.debug_verbose('VAC1: unauth to node list')
nodeUnauth(nodeList)
except:
pass
- return (False, { 'errors': [ 'A data integrity error has occurred. Please attempt adding the cluster again.' ], 'requestResults': { 'clusterName': clusterName, 'isComplete': False, 'nodeList': [] } })
+ return (False, { 'errors': [ 'A data integrity error has occurred. Please attempt adding the cluster again.' ], 'requestResults': { 'clusterName': clusterName, 'isComplete': False, 'nodeList': [], 'redirect': HOMEBASE_ADD_CLUSTER_INITIAL } })
try:
clusterName = request.form['clusterName']
if not clusterName:
- raise
- except:
+ raise Exception, 'no cluster name was found'
+ except Exception, e:
+ luci_log.debug_verbose('VAC2: no cluser name found: %s', str(e))
return (False, { 'errors': ['No cluster name was given.'], 'requestResults': requestResults })
try:
nodeList = requestResults['nodeList']
if not nodeList or len(nodeList) < 1:
- raise
- except:
+ raise Exception, 'no node list found'
+ except Exception, e:
+ luci_log.debug_verbose('VAC3: no nodeList found: %s', str(e))
return (False, { 'errors': ['No cluster nodes were given.'], 'requestResults': requestResults })
try:
@@ -338,13 +351,15 @@
try:
numStorage = int(request.form['numStorage'])
if numStorage != len(nodeList):
- raise
- except:
- nodeUnauth(nodeList)
+ raise Exception, 'numstorage != len(nodelist)'
+ except Exception, e:
try:
requestResults['isComplete'] = False
+ luci_log.debug_verbose('VAC4: error: %s' % str(e))
except:
pass
+
+ nodeUnauth(nodeList)
return (False, {
'errors': [ 'Unknown number of nodes entered' ],
'requestResults': requestResults })
@@ -372,8 +387,9 @@
oldNode = rnodeHash[k]
if not oldNode:
+ luci_log.debug_verbose('VAC5: node %s not found', sysData[0])
nodeUnauth(nodeList)
- return (False, { 'errors': [ 'A data integrity error has occurred. Please attempt adding the cluster again.' ], 'requestResults': { 'clusterName': clusterName, 'nodeList': nodeList, 'isComplete': False } })
+ return (False, { 'errors': [ 'A data integrity error has occurred. Please attempt adding the cluster again.' ], 'requestResults': { 'clusterName': clusterName, 'nodeList': nodeList, 'isComplete': False, 'redirect': HOMEBASE_ADD_CLUSTER_INITIAL } })
if oldNode['host'] != node['host']:
del nodeHash[oldNode['host']]
@@ -658,20 +674,23 @@
except:
sessionData = None
- try:
- request.SESSION.delete('checkRet')
- except:
- pass
-
if 'ACTUAL_URL' in request:
url = request['ACTUAL_URL']
else:
url = '.'
- try:
+ if 'pagetype' in request.form:
pagetype = int(request.form['pagetype'])
+ else:
+ try: request.SESSION.set('checkRet', {})
+ except: pass
+ return homebasePortal(self, request, '.', '0')
+
+ try:
validatorFn = formValidators[pagetype - 1]
except:
+ try: request.SESSION.set('checkRet', {})
+ except: pass
return homebasePortal(self, request, '.', '0')
if validatorFn == validateAddClusterInitial or validatorFn == validateAddCluster:
@@ -699,7 +718,7 @@
return homebaseControlPost(self, request)
try:
- request.SESSION.delete('checkRet')
+ request.SESSION.set('checkRet', {})
except:
pass
@@ -1003,6 +1022,7 @@
def manageCluster(self, clusterName, nodeList):
clusterName = str(clusterName)
+ luci_log.debug_verbose('manageCluster for %s' % clusterName)
try:
clusters = self.restrictedTraverse(PLONE_ROOT + '/systems/cluster/')
next reply other threads:[~2006-10-31 19:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 19:09 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-10-13 17:04 [Cluster-devel] conga/luci homebase/form-macros site/luci/Exte rmccabe
2006-07-31 17:46 rmccabe
2006-06-30 21:39 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=20061031190928.12435.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 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).