From 3d3eb0efea99e0c3d7ba9ba893932978e066241d Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 7 Oct 2011 14:45:01 -0700 Subject: [PATCH] Remove --keep-locked-on-error, and behave as if it were specified 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 | 9 --------- teuthology/task/internal.py | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/teuthology/run.py b/teuthology/run.py index 511e060e96..62a631298b 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -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) diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index a448fa96ea..0f2855c430 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -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) -- 2.39.5