Allow custom ubuntu is_reachable_timeout

Default timeout of 900 seconds which is suitable for upstream CI
is too long for downstream CI. This patch allows configuring a custom
value for ubuntu is_reachable_timeout.

Change-Id: If33991b0b932d7615f7072a4c2121fde4d5bcdc8
This commit is contained in:
Roman Safronov
2023-01-15 19:04:04 +02:00
parent 5da052f7e5
commit fd0a6abaf3
2 changed files with 7 additions and 2 deletions

View File

@@ -28,6 +28,9 @@ OPTIONS = [
cfg.StrOpt('key_type',
default=DEFAULT_KEY_TYPE,
help="Default SSH key type to login to server instances"),
cfg.FloatOpt('ubuntu_is_reachable_timeout',
default=900.0,
help="Timeout (in seconds) till ubuntu server is reachable")
]

View File

@@ -46,6 +46,7 @@ class UbuntuMinimalImageFixture(glance.URLGlanceImageFixture):
password = CONF.tobiko.ubuntu.password or 'ununtu'
connection_timeout = CONF.tobiko.ubuntu.connection_timeout or 1500.
disabled_algorithms = CONF.tobiko.ubuntu.disabled_algorithms
is_reachable_timeout = CONF.tobiko.nova.ubuntu_is_reachable_timeout
IPERF3_SERVICE_FILE = """
@@ -208,8 +209,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) -> float:
return self.image_fixture.is_reachable_timeout
# port of running HTTP server
@property