tempest/tempest/common
Slawek Kaplonski e3405ba808 Check VM's console log before trying to SSH to it.
Due to issue described in related bug report, it seems that it may
happen sometimes that tempest will start trying to ssh to the instance
before ssh key will be really configured in the instance and in such
case it may happened that there will be AuthenticationFailure error
always there. Even if ssh key will be configured properly later during
the test.

To workaround that issue and avoid failures of tests, this patch adds
check if the vm is really booted and ready to ssh. It is done by
checking console log of the VM and looking for specific string "login:"
which appears at least in case of Cirros and Ubuntu images used in our
CI jobs.
In case when such string will not be found, test will continue to run
and will still try to ssh to the instance. So in worst case it may slow
ssh to the instance a bit but shouldn't really have any bad impact on
test as before this patch it would probably also wait similar amount of
time but on trying to SSH to the instance.

Similar workaround was introduced in the neutron-tempest-plugin with
[1]. After it was merged number of failed jobs due to ssh "Authentication
failure" issues lower down significantly.

[1] https://review.opendev.org/#/c/758968/

Change-Id: I84a7c2fc389d181388ef821848ffad4bc67f1213
Related-Bug: #1892861
2020-11-16 15:29:07 +01:00
..
utils New list config option to list network features without API extension 2020-11-03 07:06:24 +01:00
__init__.py Changes the namespace from storm to tempest, as well as adding addition tests and improvements 2011-12-06 16:48:03 -06:00
compute.py Check VM's console log before trying to SSH to it. 2020-11-16 15:29:07 +01:00
credentials_factory.py Mark raw strings as such 2018-07-06 14:01:28 +01:00
custom_matchers.py Remove checking of Accept-Range header 2020-07-08 08:55:18 +00:00
identity.py Add autopep8 to tox.ini 2019-03-08 16:04:05 +01:00
image.py Replace six.iteritems with dict.items 2017-01-03 23:17:34 +00:00
tempest_fixtures.py Update all Oslo module use 2015-03-11 21:07:56 +00:00
waiters.py Check VM's console log before trying to SSH to it. 2020-11-16 15:29:07 +01:00