aboutsummaryrefslogtreecommitdiff
path: root/ansible/library
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2019-11-27 14:52:03 +0000
committerMark Goddard <mark@stackhpc.com>2019-11-28 10:10:00 +0000
commit01050dc01fa8558eb453c48faa2a8efd398c5367 (patch)
tree9900beee1dc9ad00575adae6bfd44a069f160548 /ansible/library
parent692d176cd5e716ad24e6f4fe57f2c345417c0793 (diff)
downloadkolla-ansible-01050dc01fa8558eb453c48faa2a8efd398c5367.tar.gz
kolla-ansible-01050dc01fa8558eb453c48faa2a8efd398c5367.zip
Support configuration of Docker client timeout
Adds support for configuration of the Docker client timeout via 'docker_client_timeout'. This change also increases the default timeout to 120 seconds, as we sometimes see timeouts in CI and heavily loaded or underpowered environments. Increasing 'docker_client_timeout' further may be helpful in cases where Docker reports 'Read timed out'. Change-Id: I73745771078cb2c0ebae2b1d87ba2c4c12958d82 Closes-Bug: #1809844
Diffstat (limited to 'ansible/library')
-rw-r--r--ansible/library/kolla_docker.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py
index 249a3477f..fe0264c38 100644
--- a/ansible/library/kolla_docker.py
+++ b/ansible/library/kolla_docker.py
@@ -201,6 +201,12 @@ options:
required: False
default: False
type: bool
+ client_timeout:
+ description:
+ - Docker client timeout in seconds
+ required: False
+ default: 120
+ type: int
author: Sam Yaple
'''
@@ -252,7 +258,8 @@ class DockerWorker(object):
# tls_config = self.generate_tls()
options = {
- 'version': self.params.get('api_version')
+ 'version': self.params.get('api_version'),
+ 'timeout': self.params.get('client_timeout'),
}
self.dc = get_docker_client()(**options)
@@ -957,6 +964,7 @@ def generate_module():
volumes_from=dict(required=False, type='list'),
dimensions=dict(required=False, type='dict', default=dict()),
tty=dict(required=False, type='bool', default=False),
+ client_timeout=dict(required=False, type='int', default=120),
)
required_if = [
['action', 'pull_image', ['image']],