Allow custom ubuntu timeouts
Default timeouts of 900 and 1500 seconds which are suitable for upstream CI are too long for downstream CI causing redundant 15 minutes retries while 2-3 minutes are enough to make a decision that something went wrong. This patch allows configuring custom values for ubuntu vm connectivity timeouts. Change-Id: If33991b0b932d7615f7072a4c2121fde4d5bcdc8
This commit is contained in:
parent
38e7f70acc
commit
6bc9c6eff7
@ -250,6 +250,19 @@ subparsers:
|
|||||||
help: Skip Swift containers healthchecks when CephAdm is deployed
|
help: Skip Swift containers healthchecks when CephAdm is deployed
|
||||||
ansible_variable: ceph_rgw
|
ansible_variable: ceph_rgw
|
||||||
default: False
|
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
|
- title: Cleanup stage
|
||||||
options:
|
options:
|
||||||
|
@ -17,6 +17,10 @@ test_default_conf:
|
|||||||
has_external_load_balancer: "{{ has_external_load_balancer }}"
|
has_external_load_balancer: "{{ has_external_load_balancer }}"
|
||||||
ceph_rgw: "{{ ceph_rgw }}"
|
ceph_rgw: "{{ ceph_rgw }}"
|
||||||
|
|
||||||
|
nova:
|
||||||
|
ubuntu_connection_timeout: "{{ ubuntu_connection_timeout }}"
|
||||||
|
ubuntu_is_reachable_timeout: "{{ ubuntu_is_reachable_timeout }}"
|
||||||
|
|
||||||
test_log_debug: ''
|
test_log_debug: ''
|
||||||
|
|
||||||
test_case_timeout: 1800.
|
test_case_timeout: 1800.
|
||||||
@ -33,3 +37,6 @@ has_external_load_balancer: ''
|
|||||||
overcloud_ssh_username: ''
|
overcloud_ssh_username: ''
|
||||||
|
|
||||||
ceph_rgw: ''
|
ceph_rgw: ''
|
||||||
|
|
||||||
|
ubuntu_connection_timeout: ''
|
||||||
|
ubuntu_is_reachable_timeout: ''
|
||||||
|
@ -28,6 +28,17 @@ OPTIONS = [
|
|||||||
cfg.StrOpt('key_type',
|
cfg.StrOpt('key_type',
|
||||||
default=DEFAULT_KEY_TYPE,
|
default=DEFAULT_KEY_TYPE,
|
||||||
help="Default SSH key type to login to server instances"),
|
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")
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -388,7 +388,9 @@ class ServerStackFixture(heat.HeatStackFixture, abc.ABC):
|
|||||||
requirements['port'] += 1
|
requirements['port'] += 1
|
||||||
return requirements
|
return requirements
|
||||||
|
|
||||||
is_reachable_timeout: tobiko.Seconds = None
|
@property
|
||||||
|
def is_reachable_timeout(self) -> tobiko.Seconds:
|
||||||
|
return None
|
||||||
|
|
||||||
def assert_is_reachable(self,
|
def assert_is_reachable(self,
|
||||||
ssh_client: ssh.SSHClientType = None,
|
ssh_client: ssh.SSHClientType = None,
|
||||||
@ -422,8 +424,10 @@ class CloudInitServerStackFixture(ServerStackFixture, ABC):
|
|||||||
#: nax SWAP file size in bytes
|
#: nax SWAP file size in bytes
|
||||||
swap_maxsize: typing.Optional[int] = None
|
swap_maxsize: typing.Optional[int] = None
|
||||||
|
|
||||||
# I expect cloud-init based servers to be slow to boot
|
@property
|
||||||
is_reachable_timeout: tobiko.Seconds = 600.
|
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
|
@property
|
||||||
def user_data(self):
|
def user_data(self):
|
||||||
|
@ -34,8 +34,9 @@ class UbuntuMinimalImageFixture(glance.FileGlanceImageFixture):
|
|||||||
container_format = CONF.tobiko.ubuntu.container_format or "bare"
|
container_format = CONF.tobiko.ubuntu.container_format or "bare"
|
||||||
username = CONF.tobiko.ubuntu.username or 'ubuntu'
|
username = CONF.tobiko.ubuntu.username or 'ubuntu'
|
||||||
password = CONF.tobiko.ubuntu.password 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
|
disabled_algorithms = CONF.tobiko.ubuntu.disabled_algorithms
|
||||||
|
is_reachable_timeout = CONF.tobiko.nova.ubuntu_is_reachable_timeout
|
||||||
|
|
||||||
|
|
||||||
IPERF3_SERVICE_FILE = """
|
IPERF3_SERVICE_FILE = """
|
||||||
@ -199,8 +200,9 @@ class UbuntuServerStackFixture(UbuntuMinimalServerStackFixture,
|
|||||||
#: Glance image used to create a Nova server instance
|
#: Glance image used to create a Nova server instance
|
||||||
image_fixture = tobiko.required_fixture(UbuntuImageFixture)
|
image_fixture = tobiko.required_fixture(UbuntuImageFixture)
|
||||||
|
|
||||||
# I expect Ubuntu based servers to be slow to boot
|
@property
|
||||||
is_reachable_timeout = 900.
|
def is_reachable_timeout(self) -> tobiko.Seconds:
|
||||||
|
return self.image_fixture.is_reachable_timeout
|
||||||
|
|
||||||
# port of running HTTP server
|
# port of running HTTP server
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user