]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
If console access fails, try SSH
authorZack Cerza <zack@redhat.com>
Tue, 16 Aug 2016 20:32:49 +0000 (14:32 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 16 Aug 2016 23:07:33 +0000 (17:07 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/nuke/__init__.py

index c11f0a62b0c056564f58052327f2d59f94ce8f46..391f220740455f0b9dfdd94b94bff7b8116fbed3 100644 (file)
@@ -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'