From 309ff37ba410ca31d868d33a51e6fdeb640406ed Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 16 Aug 2016 14:32:49 -0600 Subject: [PATCH] If console access fails, try SSH Signed-off-by: Zack Cerza --- teuthology/nuke/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/teuthology/nuke/__init__.py b/teuthology/nuke/__init__.py index c11f0a62b0..391f220740 100644 --- a/teuthology/nuke/__init__.py +++ b/teuthology/nuke/__init__.py @@ -18,6 +18,7 @@ from ..misc import ( get_user, sh ) from ..openstack import OpenStack, OpenStackInstance, enforce_json_dictionary +from ..orchestra.remote import Remote from ..parallel import parallel from ..task.internal import check_lock, add_remotes, connect @@ -296,7 +297,13 @@ def nuke_helper(ctx, should_unlock): log.debug('{ctx}'.format(ctx=ctx)) if (not ctx.noipmi and 'ipmi_user' in config and 'vpm' not in shortname): - actions.check_console(host) + try: + actions.check_console(host) + except Exception: + log.exception('') + log.info("Will attempt to connect via SSH") + remote = Remote(host) + remote.connect() if ctx.check_locks: # does not check to ensure if the node is 'up' -- 2.39.5