Bug 1897139

Summary: If paramiko SSH client connection fails because of authentication, cannot reconnect
Product: Red Hat OpenStack Reporter: Slawek Kaplonski <skaplons>
Component: python-neutron-tests-tempestAssignee: Slawek Kaplonski <skaplons>
Status: CLOSED ERRATA QA Contact: Candido Campos <ccamposr>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: eran.yo, mgarciac
Target Milestone: ---Keywords: AutomationBlocker, Triaged
Target Release: ---Flags: skaplons: needinfo-
skaplons: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-neutron-tests-tempest-0.9.0-1.20201113201944.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-17 15:35:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Slawek Kaplonski 2020-11-12 12:19:26 UTC
In the VM boot process, cloud-init copies the SSH keys.

If the tempest test tries to connect to the VM before the SSH keys are copied, the SSH client will raise a paramiko.ssh_exception.AuthenticationException. From this point, even when the SSH keys are copied into the VM, the SSH client cannot reconnect anymore into the VM using the pkey.

If a bigger sleep time is added manually (to avoid this race condition: try to connect when the IP is available in the port but the SSH keys are still not present in the VM), the SSH client connects without any problem.

[1]http://paste.openstack.org/show/797127/

Comment 17 errata-xmlrpc 2021-03-17 15:35:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.4 director bug fix advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:0817