conga luci/site/Makefile luci/site/luci/Extens ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-08-20 16:31:14
Modified files:
luci/site : Makefile
luci/site/luci/Extensions: LuciClusterActions.py LuciDB.py
LuciZope.py
luci/storage : form-macros
luci/utils : luci_admin luci_manage
ricci/modules/cluster: Clusvcadm.cpp
Log message:
Fixes from the -RHEL5 branch.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/Makefile.diff?cvsroot=cluster&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterActions.py.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciDB.py.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZope.py.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/utils/luci_admin.diff?cvsroot=cluster&r1=1.55&r2=1.56
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/utils/luci_manage.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&r1=1.12&r2=1.13
luci/site/Makefile +2 -0
@@ -40,6 +40,8 @@ install: install -d ${DESTDIR}/var/lib/luci + echo False > ${DESTDIR}/var/lib/luci/.default_password_has_been_reset + chmod 640 ${DESTDIR}/var/lib/luci/.default_password_has_been_reset install -d ${DESTDIR}/var/lib/luci/bin # install `find luci/bin -maxdepth 1 -type f` ${DESTDIR}/var/lib/luci/bin
luci/site/luci/Extensions/LuciClusterActions.py +7 -0
@@ -364,6 +364,10 @@ exclude_names=[ nodename_resolved ], exclude_busy=True) if rc2 is None: + rc2 = getRicciAgent(self, clustername, + exclude_names=[ nodename_resolved ]) + + if rc2 is None: if LUCI_DEBUG_MODE is True: luci_log.debug_verbose('ND0: unable to find ricci agent to delete %s from %s' % (nodename_resolved, clustername)) return None
@@ -589,9 +593,11 @@ def NodeFence(self, clustername, nodename, nodename_resolved): rc = getRicciAgent(self, clustername, exclude_names=[ nodename_resolved, nodename ], exclude_busy=True) + if rc is None: rc = getRicciAgent(self, clustername, exclude_names=[ nodename_resolved, nodename ]) + if rc is None: if LUCI_DEBUG_MODE is True: luci_log.debug_verbose('FNF0: no ricci to fence %s for cluster %s' \
@@ -636,6 +642,7 @@ if rc is None: rc = getRicciAgent(self, clustername, exclude_busy=True) + if rc is None: rc = getRicciAgent(self, clustername)
luci/site/luci/Extensions/LuciDB.py +2 -2
@@ -852,7 +852,7 @@ continue if exclude_busy is True: - if NodeBusy(self, cluname, ricci_hostname, rc) is not False: + if NodeBusy(self, clustername, ricci_hostname, rc) is not False: if LUCI_DEBUG_MODE is True: luci_log.debug_verbose('GRA13: %s is busy, excluding' \ % ricci_hostname)
@@ -861,7 +861,7 @@ if LUCI_DEBUG_MODE is True: luci_log.debug('GRA14: no ricci agent could be found for cluster %s' \ - % cluname) + % clustername) return None def getClusterDBObj(self, clustername):
luci/site/luci/Extensions/LuciZope.py +1 -1
@@ -126,7 +126,7 @@ def GetReqVars(req, varlist): ret = {} - from types import ListType; + from types import ListType for i in varlist: pval = None
luci/storage/form-macros +11 -5
@@ -615,7 +615,7 @@ id="graphics_checkbox_id" tal:attributes="checked mapper/graphical_view" onchange="var s = (this.checked)?'graphical_view':'textual_view'; singleVisibleSpan('mappings_view', s);"/> - Graphical View + Graphical View <small>(Uncheck if volumes are too small to select)</small> <span id="mappings_view" tal:define="mappings_view_classnames mapper/mappings-view_css_classnames">
@@ -1068,7 +1068,7 @@ type string:text; value prop/value; onkeypress python:'return validate_text_keypress(this, event, 2, \'' + prop['validation']['illegal_chars'] + '\', ' + str(prop['validation']['max_length']) + ')'; - onblur python:'validate_text(this, 2, \'' + prop['validation']['illegal_chars'] + '\', \'' + prop['validation']['reserved_words'] + '\', ' + str(prop['validation']['min_length']) + ', ' + str(prop['validation']['max_length']) + ', \'' + form_submit_button_id + '\')'"/> + onchange python:'validate_text(this, 2, \'' + prop['validation']['illegal_chars'] + '\', \'' + prop['validation']['reserved_words'] + '\', ' + str(prop['validation']['min_length']) + ', ' + str(prop['validation']['max_length']) + ', \'' + form_submit_button_id + '\')'"/>
@@ -1078,7 +1078,7 @@ type string:text; size string:15; value prop/value; - onblur python:'validate_int(this, 2, ' + str(prop['validation']['min']) + ', ' + str(prop['validation']['max']) + ', ' + str(prop['validation']['step']) + ', \'' + prop_units + '\', \'' + form_submit_button_id + '\')'" + onchange python:'validate_int(this, 2, ' + str(prop['validation']['min']) + ', ' + str(prop['validation']['max']) + ', ' + str(prop['validation']['step']) + ', \'' + prop_units + '\', \'' + form_submit_button_id + '\')'" onkeypress="return validate_int_keypress(this, event, 2)"/> (<span tal:replace="prop/validation/min"/> - <span tal:replace="prop/validation/max"/>) <span tal:replace="prop_units"/>
@@ -1096,7 +1096,7 @@ type string:text; size string:15; value value; - onblur python:'validate_float(this, 2, ' + str(minim) + ', ' + str(maxim) + ', ' + str(step) + ', \'' + units + '\', \'' + form_submit_button_id + '\')'" + onchange python:'validate_float(this, 2, ' + str(minim) + ', ' + str(maxim) + ', ' + str(step) + ', \'' + units + '\', \'' + form_submit_button_id + '\')'" onkeypress="return validate_float_keypress(this, event, 2)"/> (<span tal:replace="minim"/> - <span tal:replace="maxim"/>) <span tal:replace="units"/>
@@ -1422,9 +1422,15 @@ return ev.which; } +var pending_warning = false; + function display_warning(el, timeout, text) { - alert(text); + if (!pending_warning) { + pending_warning = true; + alert(text); + pending_warning = false; + } return; var geom_obj = getGeom(el);
luci/utils/luci_admin +10 -0
@@ -99,7 +99,17 @@ }) orig_stderr = sys.stderr + if '--debug' in sys.argv or '--verbose' in sys.argv: + try: + del sys.argv[sys.argv.index('--debug')] + except: + pass + + try: + del sys.argv[sys.argv.index('--verbose')] + except: + pass verbose = sys.stderr else: verbose = file('/dev/null', 'rwb+', 0)
luci/utils/luci_manage +7 -6
@@ -43,9 +43,10 @@ try: luci = pwd.getpwnam(LUCI_USER)[2:4] if not luci or len(luci) != 2: - raise - except: - sys.stderr.write('Cannot find the \"' + LUCI_USER + '\" user.\n') + raise Exception, 'user does not exist' + except Exception, e: + sys.stderr.write('Cannot find the "%s" user: %s\n' \ + % (LUCI_USER, str(e))) return -1 try:
@@ -56,8 +57,8 @@ os.chown(LUCI_DB_PATH + i, luci[0], luci[1]) os.chmod(LUCI_DB_PATH + i, 0600) except: pass - except: - sys.stderr.write('Unable to change ownership of the Luci database back to user \"' + LUCI_USER + '\"\n') + except Exception, e: + sys.stderr.write('Unable to change ownership of the Luci database to user "%s": %s\n' % (LUCI_USER, str(e))) return -1 def luci_set_mgmt(set_state):
@@ -82,7 +83,7 @@ from Products.PlonePAS import config from Products.PlonePAS.interfaces.plugins import IUserManagement import BTrees.OOBTree - ImageFile.ImageFile.__init__ = lambda x,y,z:None + ImageFile.ImageFile.__init__ = lambda x, y, z: None sys.stderr = orig_stderr try:
ricci/modules/cluster/Clusvcadm.cpp +42 -18
144 lines not on this page · raw message