diff --git a/contextualization/ctxt_agent_dist.py b/contextualization/ctxt_agent_dist.py index ec56f01fd..aa967d301 100755 --- a/contextualization/ctxt_agent_dist.py +++ b/contextualization/ctxt_agent_dist.py @@ -138,6 +138,10 @@ def wait_ssh_access(vm, delay=10, max_wait=None, quiet=False): res = "new" except AuthenticationException: try_ansible_key = True + except: + if not quiet: + CtxtAgent.logger.exception("Error connecting with SSH with: " + vm_ip) + success = False if try_ansible_key: # In some very special cases the last two cases fail, so check @@ -150,8 +154,13 @@ def wait_ssh_access(vm, delay=10, max_wait=None, quiet=False): success = ssh_client.test_connectivity() res = 'pk_file' except: - CtxtAgent.logger.exception("Error connecting with SSH with: " + vm_ip) + if not quiet: + CtxtAgent.logger.exception("Error connecting with SSH with: " + vm_ip) success = False + except: + if not quiet: + CtxtAgent.logger.exception("Error connecting with SSH with: " + vm_ip) + success = False if success: vm['ctxt_ip'] = vm_ip