Merge "Allow custom ubuntu timeouts"

This commit is contained in:
Zuul 2023-05-19 21:28:30 +00:00 committed by Gerrit Code Review
commit a260031555
5 changed files with 43 additions and 6 deletions

View File

@ -250,6 +250,19 @@ subparsers:
help: Skip Swift containers healthchecks when CephAdm is deployed
ansible_variable: ceph_rgw
default: False
ubuntu-connection-timeout:
type: Value
help: |
Timeout error is raised if a connection to an ubuntu instance
is not successful before it expires
ansible_variable: ubuntu_connection_timeout
ubuntu-is-reachable-timeout:
type: Value
help: |
Timeout error is raised if an ubuntu instance is not reachable
before it expires
ansible_variable: ubuntu_is_reachable_timeout
- title: Cleanup stage
options:

View File

@ -17,6 +17,10 @@ test_default_conf:
has_external_load_balancer: "{{ has_external_load_balancer }}"
ceph_rgw: "{{ ceph_rgw }}"
nova:
ubuntu_connection_timeout: "{{ ubuntu_connection_timeout }}"
ubuntu_is_reachable_timeout: "{{ ubuntu_is_reachable_timeout }}"
test_log_debug: ''
test_case_timeout: 1800.
@ -33,3 +37,6 @@ has_external_load_balancer: ''
overcloud_ssh_username: ''
ceph_rgw: ''
ubuntu_connection_timeout: ''
ubuntu_is_reachable_timeout: ''

View File

@ -28,6 +28,17 @@ OPTIONS = [
cfg.StrOpt('key_type',
default=DEFAULT_KEY_TYPE,
help="Default SSH key type to login to server instances"),
cfg.FloatOpt('ubuntu_connection_timeout',
default=1500.,
help="Timeout (in seconds) for establishing connection "
"to ubuntu"),
cfg.FloatOpt('ubuntu_is_reachable_timeout',
default=900.,
help="Timeout (in seconds) till ubuntu server is reachable"),
cfg.FloatOpt('cloudinit_is_reachable_timeout',
default=600.,
help="Timeout (in seconds) till cloud-init based server is "
"reachable")
]

View File

@ -388,7 +388,9 @@ class ServerStackFixture(heat.HeatStackFixture, abc.ABC):
requirements['port'] += 1
return requirements
is_reachable_timeout: tobiko.Seconds = None
@property
def is_reachable_timeout(self) -> tobiko.Seconds:
return None
def assert_is_reachable(self,
ssh_client: ssh.SSHClientType = None,
@ -422,8 +424,10 @@ class CloudInitServerStackFixture(ServerStackFixture, ABC):
#: nax SWAP file size in bytes
swap_maxsize: typing.Optional[int] = None
# I expect cloud-init based servers to be slow to boot
is_reachable_timeout: tobiko.Seconds = 600.
@property
def is_reachable_timeout(self) -> tobiko.Seconds:
# I expect cloud-init based servers to be slow to boot
return CONF.tobiko.nova.cloudinit_is_reachable_timeout
@property
def user_data(self):

View File

@ -34,8 +34,9 @@ class UbuntuMinimalImageFixture(glance.FileGlanceImageFixture):
container_format = CONF.tobiko.ubuntu.container_format or "bare"
username = CONF.tobiko.ubuntu.username or 'ubuntu'
password = CONF.tobiko.ubuntu.password or 'ubuntu'
connection_timeout = CONF.tobiko.ubuntu.connection_timeout or 1500.
connection_timeout = CONF.tobiko.nova.ubuntu_connection_timeout
disabled_algorithms = CONF.tobiko.ubuntu.disabled_algorithms
is_reachable_timeout = CONF.tobiko.nova.ubuntu_is_reachable_timeout
IPERF3_SERVICE_FILE = """
@ -199,8 +200,9 @@ class UbuntuServerStackFixture(UbuntuMinimalServerStackFixture,
#: Glance image used to create a Nova server instance
image_fixture = tobiko.required_fixture(UbuntuImageFixture)
# I expect Ubuntu based servers to be slow to boot
is_reachable_timeout = 900.
@property
def is_reachable_timeout(self) -> tobiko.Seconds:
return self.image_fixture.is_reachable_timeout
# port of running HTTP server
@property