integration tests: restructure ssh timeout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
# Summary
During the integration tests, currently if SSH to instance times out it holds up testing for over an hour in an attempt to SSH to an instance; note the timestamp jump on: https:/
The _ssh_connect function was originally written for the nocloud_kvm platform and used as a method for determining if an instance was up and accessible. As such, the function is doing double duty and not correctly focused on SSH'ing to an up and running instance and has a bug in it as it is waiting far too long.
# Action plan
1. For the nocloud_kvm platform when when starting and before _wait_for_system, there should be a check if an instance is accessible during the is_running check. This could be done again by SSH with a number of retries, but should be taken care of inside the nocloud_kvm platform itself and not in the SSH connect function.
2. Update the _ssh_connect to timeout quickly, reduce wait on banner, and only retry up to 3 times.
# Noted Files
tests/cloud_
tests/cloud_
Related branches
- Chad Smith: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 95 lines (+30/-11)2 files modifiedtests/cloud_tests/collect.py (+1/-1)
tests/cloud_tests/platforms/instances.py (+29/-10)
Changed in cloud-init: | |
status: | New → Fix Released |
#1 is handled already by the retry logic in instances. py:_wait_ for_system, so I am only going to update _ssh_connect to not wait as long.
Running through full set of tests on all platforms on local system and test system before submitting merge proposal.