Increase timeout for kolla_toolbox module.

This patch increases the default timeout for
the kolla_toolbox ansible module when talking
with the docker API from the default 60 to 180 secs.

This is required on slower deployments,
specially when bootstraping an environment and fernet
tokes are in usage. For faster deployments this will
be harmless, but for slower deployments this would be
beneficial.

Bug: #1767136
Change-Id: I0391715b16cf86d6c27fecf8a666de64f2735a7d
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@linaro.org>
This commit is contained in:
Jorge Niedbalski 2018-04-26 12:55:07 -03:00
parent bf9ceb406b
commit 044e82ccfe

View File

@ -44,6 +44,12 @@ options:
required: False
type: str
default: auto
timeout:
description:
- The default timeout for docker-py client when contacting Docker API
required: False
type: int
default: 180
author: Jeffrey Zhang
'''
@ -117,11 +123,13 @@ def main():
module_name=dict(type='str'),
module_args=dict(type='str'),
module_extra_vars=dict(type='json'),
api_version=dict(required=False, type='str', default='auto')
api_version=dict(required=False, type='str', default='auto'),
timeout=dict(required=False, type='int', default=180),
)
module = AnsibleModule(argument_spec=specs, bypass_checks=True)
client = get_docker_client()(
version=module.params.get('api_version'))
version=module.params.get('api_version'),
timeout=module.params.get('timeout'))
command_line = gen_commandline(module.params)
kolla_toolbox = client.containers(filters=dict(name='kolla_toolbox',
status='running'))