From: Zack Cerza Date: Wed, 17 Aug 2016 15:43:55 +0000 (-0600) Subject: Check locks before doing anything else X-Git-Tag: 1.1.0~548^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=87323f794f3218f40bb3f5411912fb75b1d984d7;p=teuthology.git Check locks before doing anything else Signed-off-by: Zack Cerza --- diff --git a/teuthology/nuke/__init__.py b/teuthology/nuke/__init__.py index 391f220740..df7766dff4 100644 --- a/teuthology/nuke/__init__.py +++ b/teuthology/nuke/__init__.py @@ -295,6 +295,10 @@ def nuke_helper(ctx, should_unlock): return log.debug('shortname: %s' % shortname) log.debug('{ctx}'.format(ctx=ctx)) + if ctx.check_locks: + # does not check to ensure if the node is 'up' + # we want to be able to nuke a downed node + check_lock(ctx, None, check_up=False) if (not ctx.noipmi and 'ipmi_user' in config and 'vpm' not in shortname): try: @@ -305,10 +309,6 @@ def nuke_helper(ctx, should_unlock): remote = Remote(host) remote.connect() - if ctx.check_locks: - # does not check to ensure if the node is 'up' - # we want to be able to nuke a downed node - check_lock(ctx, None, check_up=False) add_remotes(ctx, None) connect(ctx, None)