This matches an existing argument (with the same meaning) and
avoids an error like
2013-10-01T17:20:35.395 CRITICAL:root: File "/var/lib/teuthworker/teuthology-master/virtualenv/bin/teuthology", line 9, in <module>
load_entry_point('teuthology==0.0.1', 'console_scripts', 'teuthology')()
File "/home/teuthworker/teuthology-master/teuthology/run.py", line 235, in main
nuke(ctx, log, ctx.lock)
File "/home/teuthworker/teuthology-master/teuthology/nuke.py", line 391, in nuke
if ctx.run_name:
2013-10-01T17:20:35.395 CRITICAL:root:AttributeError: 'Namespace' object has no attribute 'run_name'
Signed-off-by: Sage Weil <sage@inktank.com>
ctx.owner = info.get('owner')
if not ctx.owner:
ctx.owner = open(ctx.archive + '/owner').read().rstrip('\n')
- ctx.run_name = info.get('name')
+ ctx.name = info.get('name')
from teuthology.misc import read_config
read_config(ctx)
from teuthology.lock import list_locks
total_unnuked = {}
targets = dict(ctx.config['targets'])
- if ctx.run_name:
+ if ctx.name:
log.info('Checking targets against current locks')
locks = list_locks(ctx)
#Remove targets who's description doesn't match archive name.
for lock in locks:
for target in targets:
if target == lock['name']:
- if ctx.run_name not in lock['description']:
+ if ctx.name not in lock['description']:
del ctx.config['targets'][lock['name']]
log.info('Not nuking %s because description doesn\'t match', lock['name'])
with parallel() as p: