]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
nuke: s/run_name/name/
authorSage Weil <sage@inktank.com>
Wed, 2 Oct 2013 03:57:53 +0000 (20:57 -0700)
committerSage Weil <sage@inktank.com>
Wed, 2 Oct 2013 03:57:53 +0000 (20:57 -0700)
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>
teuthology/nuke.py

index 05d1124876c4fc5450b3dccd4c1e02fed319d5c7..59ddb213c83fd50c7f7a3700c7caa73f0081fa14 100644 (file)
@@ -358,7 +358,7 @@ def main():
             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)
@@ -388,14 +388,14 @@ def nuke(ctx, log, should_unlock, sync_clocks=True, reboot_all=True,
     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: