]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Remove --keep-locked-on-error, and behave as if it were specified
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 7 Oct 2011 21:45:01 +0000 (14:45 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 7 Oct 2011 21:49:53 +0000 (14:49 -0700)
This will help prevent machines with cephtest dirs still present from
being used. It's easy to unlock machines - the targets yaml fragment
is output during a run.

teuthology/run.py
teuthology/task/internal.py

index 511e060e960a9abe73a70ccc9146f7d372639dcc..62a631298b6376e82f0e48e0ef6554815c591145 100644 (file)
@@ -79,12 +79,6 @@ def parse_args():
         default=False,
         help='block until locking machines succeeds (use with --lock)',
         )
-    parser.add_argument(
-        '--keep-locked-on-error',
-        action='store_true',
-        default=False,
-        help='unlock machines only if the test succeeds (use with --lock)',
-        )
 
     args = parser.parse_args()
     return args
@@ -109,9 +103,6 @@ def main():
     if ctx.block:
         assert ctx.lock, \
             'the --block option is only supported with the --lock option'
-    if ctx.keep_locked_on_error:
-        assert ctx.lock, \
-            'the --keep_locked_on_error option is only supported with the --lock option'
 
     from teuthology.misc import read_config
     read_config(ctx)
index a448fa96ea570e8a04108c4ba07f37eb72316e21..0f2855c430252cf6d211c5fe78b3ad12027bfaf8 100644 (file)
@@ -89,7 +89,7 @@ def lock_machines(ctx, config):
     try:
         yield
     finally:
-        if not ctx.keep_locked_on_error or ctx.summary.get('success', False):
+        if ctx.summary.get('success', False):
             log.info('Unlocking machines...')
             for machine in ctx.config['targets'].iterkeys():
                 lock.unlock(ctx, machine, ctx.owner)