import signal
import traceback
+from nodequery import pcu_select
#old_handler = signal.getsignal(signal.SIGCHLD)
l_pcu = i
except:
traceback.print_exc()
+ from nodecommon import email_exception
+ email_exception()
l_pcu = None
plc_lock.release()
l_node.append(n)
except:
traceback.print_exc()
+ from nodecommon import email_exception
+ email_exception()
l_node = None
plc_lock.release()
break
except:
traceback.print_exc()
+ from nodecommon import email_exception
+ email_exception()
values = None
plc_lock.release()
except:
b_except = True
traceback.print_exc()
+ from nodecommon import email_exception
+ email_exception()
continue_probe = False
if b_except or not continue_probe: return (None, None, None)
global count
global_round = externalState['round']
- tp = threadpool.ThreadPool(20)
+ tp = threadpool.ThreadPool(10)
# CREATE all the work requests
for pcuname in l_pcus:
pcus = []
for node in l_nodes:
pcus += node['pcu_ids']
+ # clear out dups.
+ l_pcus = [pcu for pcu in sets.Set(pcus)]
+ elif config.pcuselect is not None:
+ n, pcus = pcu_select(config.pcuselect)
+ # clear out dups.
l_pcus = [pcu for pcu in sets.Set(pcus)]
elif config.nodelist == None and config.pcuid == None:
parser.set_defaults(nodelist=None,
increment=False,
pcuid=None,
+ pcuselect=None,
site=None,
dbname="findbadpcus",
cachenodes=False,
help="Provide the input file for the node list")
parser.add_option("", "--site", dest="site", metavar="FILE",
help="Get all pcus associated with the given site's nodes")
+ parser.add_option("", "--pcuselect", dest="pcuselect", metavar="FILE",
+ help="Query string to apply to the findbad pcus")
parser.add_option("", "--pcuid", dest="pcuid", metavar="id",
help="Provide the id for a single pcu")
time.sleep(1)
except Exception, err:
traceback.print_exc()
+ from nodecommon import email_exception
+ email_exception()
print "Exception: %s" % err
print "Saving data... exitting."
database.dbDump(config.dbname, externalState)