From 87323f794f3218f40bb3f5411912fb75b1d984d7 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 17 Aug 2016 09:43:55 -0600 Subject: [PATCH] Check locks before doing anything else Signed-off-by: Zack Cerza --- teuthology/nuke/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.39.5