conga ./conga.spec.in.in luci/site/luci/Extens ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2008-01-14 20:51:42
Modified files:
. : conga.spec.in.in
luci/site/luci/Extensions: cluster_adapters.py LuciDB.py
luci/cluster : busy_wait-macro
Log message:
Fix bz239387 (RFE: add timeouts for actions that can leave cluster unreachable)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&r1=1.91&r2=1.92
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.277&r2=1.278
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciDB.py.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/busy_wait-macro.diff?cvsroot=cluster&r1=1.1&r2=1.2
conga.spec.in.in +1 -0
@@ -302,6 +302,7 @@ - Fixed bz253727 (RFE: graphical view should be default in partiton tables view) - Fixed bz337041 (Add option to not fail-back service) - Fixed bz264161 (RFE: support setting the "__independent_subtree" attribute on cluster resources) +- Fixed bz239387 (RFE: add timeouts for actions that can leave cluster unreachable) * Mon Aug 27 2007 Ryan McCabe <[email protected]> 0.10.0-6 - Fixed bz253783
luci/site/luci/Extensions/cluster_adapters.py +47 -15
163 lines not on this page · raw message
luci/site/luci/Extensions/LuciDB.py +34 -2
@@ -84,6 +84,38 @@ luci_log.debug_verbose('clearNodeStatus0: %r %s' \ % (e, str(e))) +def del_node_flag(self, cluname, agent, batchid=None): + path = str('%s%s' % (CLUSTER_FOLDER_PATH, cluname)) + objname = '%s____flag' % agent + + try: + flag_obj = self.restrictedTraverse(str('%s/%s' % (path, objname))) + clusterfolder = self.restrictedTraverse(path) + except Exception, e: + if LUCI_DEBUG_MODE is True: + luci_log.debug_verbose('DNF0: %s/%s: %s %r %s' \ + % (path, objname, flag_obj[0], e, str(e))) + return False + + if batchid: + try: + bid = flag_obj.getProperty(BATCH_ID) + if bid != batchid: + raise Exception, 'mismatch: got %s, wanted %s' % (bid, batchid) + except Exception, e1: + if LUCI_DEBUG_MODE is True: + luci_log.debug_verbose('DNF1: unable to find flag with bid: %s for %s/%s: %r %s' % (batchid, path, objname, e1, str(e1))) + return False + + try: + clusterfolder.manage_delObjects([objname]) + except Exception, e: + if LUCI_DEBUG_MODE is True: + luci_log.debug_verbose('DNF2: %s/%s: %r %s' \ + % (path, objname, e, str(e))) + return False + return True + def set_node_flag(self, cluname, agent, batchid, task, desc): path = str('%s%s' % (CLUSTER_FOLDER_PATH, cluname)) batch_id = str(batchid)
@@ -99,8 +131,8 @@ flag.manage_addProperty(TASKTYPE, task, 'string') flag.manage_addProperty(FLAG_DESC, desc, 'string') except Exception, e: - errmsg = 'SNF0: error creating flag (%s,%s,%s) at %s: %s' \ - % (batch_id, task, desc, objpath, str(e)) + errmsg = 'Error creating flag (bid: %s task: %s desc: %s) at %s: %s' \ + % (batch_id, task, desc, objpath, str(e)) if LUCI_DEBUG_MODE is True: luci_log.debug_verbose('SNF0: %r %s' % (e, errmsg)) raise Exception, errmsg
luci/cluster/busy_wait-macro +54 -46
116 lines not on this page · raw message