Merge "Support configuration of Docker client timeout"
This commit is contained in:
commit
a46292f6b6
@ -96,6 +96,8 @@ docker_namespace: "kolla"
|
|||||||
docker_registry_username:
|
docker_registry_username:
|
||||||
docker_registry_insecure: "{{ 'yes' if docker_registry else 'no' }}"
|
docker_registry_insecure: "{{ 'yes' if docker_registry else 'no' }}"
|
||||||
docker_runtime_directory: ""
|
docker_runtime_directory: ""
|
||||||
|
# Docker client timeout in seconds.
|
||||||
|
docker_client_timeout: 120
|
||||||
|
|
||||||
# Retention settings for Docker logs
|
# Retention settings for Docker logs
|
||||||
docker_log_max_file: "5"
|
docker_log_max_file: "5"
|
||||||
@ -127,6 +129,7 @@ docker_common_options:
|
|||||||
restart_policy: "{{ docker_restart_policy }}"
|
restart_policy: "{{ docker_restart_policy }}"
|
||||||
restart_retries: "{{ docker_restart_policy_retry }}"
|
restart_retries: "{{ docker_restart_policy_retry }}"
|
||||||
graceful_timeout: "{{ docker_graceful_timeout }}"
|
graceful_timeout: "{{ docker_graceful_timeout }}"
|
||||||
|
client_timeout: "{{ docker_client_timeout }}"
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Dimensions options
|
# Dimensions options
|
||||||
|
@ -201,6 +201,12 @@ options:
|
|||||||
required: False
|
required: False
|
||||||
default: False
|
default: False
|
||||||
type: bool
|
type: bool
|
||||||
|
client_timeout:
|
||||||
|
description:
|
||||||
|
- Docker client timeout in seconds
|
||||||
|
required: False
|
||||||
|
default: 120
|
||||||
|
type: int
|
||||||
author: Sam Yaple
|
author: Sam Yaple
|
||||||
'''
|
'''
|
||||||
|
|
||||||
@ -252,7 +258,8 @@ class DockerWorker(object):
|
|||||||
# tls_config = self.generate_tls()
|
# tls_config = self.generate_tls()
|
||||||
|
|
||||||
options = {
|
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)
|
self.dc = get_docker_client()(**options)
|
||||||
@ -957,6 +964,7 @@ def generate_module():
|
|||||||
volumes_from=dict(required=False, type='list'),
|
volumes_from=dict(required=False, type='list'),
|
||||||
dimensions=dict(required=False, type='dict', default=dict()),
|
dimensions=dict(required=False, type='dict', default=dict()),
|
||||||
tty=dict(required=False, type='bool', default=False),
|
tty=dict(required=False, type='bool', default=False),
|
||||||
|
client_timeout=dict(required=False, type='int', default=120),
|
||||||
)
|
)
|
||||||
required_if = [
|
required_if = [
|
||||||
['action', 'pull_image', ['image']],
|
['action', 'pull_image', ['image']],
|
||||||
|
@ -57,6 +57,8 @@
|
|||||||
#docker_registry_insecure: "yes"
|
#docker_registry_insecure: "yes"
|
||||||
#docker_registry_username: "sam"
|
#docker_registry_username: "sam"
|
||||||
#docker_registry_password: "correcthorsebatterystaple"
|
#docker_registry_password: "correcthorsebatterystaple"
|
||||||
|
# Docker client timeout in seconds.
|
||||||
|
#docker_client_timeout: 120
|
||||||
|
|
||||||
#docker_configure_for_zun: "no"
|
#docker_configure_for_zun: "no"
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes an issue with Docker client timeouts where Docker reports 'Read
|
||||||
|
timed out'. The client timeout may be configured via
|
||||||
|
``docker_client_timeout``. The default timeout has been increased to 120
|
||||||
|
seconds. See `bug
|
||||||
|
<https://bugs.launchpad.net/kolla-ansible/+bug/1809844>`__ for details.
|
@ -98,6 +98,7 @@ class ModuleArgsTest(base.BaseTestCase):
|
|||||||
volumes_from=dict(required=False, type='list'),
|
volumes_from=dict(required=False, type='list'),
|
||||||
dimensions=dict(required=False, type='dict', default=dict()),
|
dimensions=dict(required=False, type='dict', default=dict()),
|
||||||
tty=dict(required=False, type='bool', default=False),
|
tty=dict(required=False, type='bool', default=False),
|
||||||
|
client_timeout=dict(required=False, type='int', default=120),
|
||||||
)
|
)
|
||||||
required_if = [
|
required_if = [
|
||||||
['action', 'pull_image', ['image']],
|
['action', 'pull_image', ['image']],
|
||||||
|
Loading…
Reference in New Issue
Block a user