oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)

* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.
This commit is contained in:
Felix Fontein 2019-05-05 12:13:55 +02:00 committed by ansibot
parent 59d20e004e
commit f692261ea0
3 changed files with 3 additions and 20 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - ``oom_killer`` and ``oom_score_adj`` options are available since docker-py 1.8.0, not 2.0.0 as assumed by the version check."

View file

@ -2844,8 +2844,7 @@ class AnsibleDockerClientContainer(AnsibleDockerClient):
dns_opts=dict(docker_api_version='1.21', docker_py_version='1.10.0'),
ipc_mode=dict(docker_api_version='1.25'),
mac_address=dict(docker_api_version='1.25'),
oom_killer=dict(docker_py_version='2.0.0'),
oom_score_adj=dict(docker_api_version='1.22', docker_py_version='2.0.0'),
oom_score_adj=dict(docker_api_version='1.22'),
shm_size=dict(docker_api_version='1.22'),
stop_signal=dict(docker_api_version='1.21'),
tmpfs=dict(docker_api_version='1.22'),

View file

@ -2438,7 +2438,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
oom_killer: yes
state: started
register: oom_killer_1
ignore_errors: yes
- name: oom_killer (idempotency)
docker_container:
@ -2448,7 +2447,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
oom_killer: yes
state: started
register: oom_killer_2
ignore_errors: yes
- name: oom_killer (change)
docker_container:
@ -2459,7 +2457,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
state: started
force_kill: yes
register: oom_killer_3
ignore_errors: yes
- name: cleanup
docker_container:
@ -2473,12 +2470,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
- oom_killer_1 is changed
- oom_killer_2 is not changed
- oom_killer_3 is changed
when: docker_py_version is version('2.0.0', '>=')
- assert:
that:
- oom_killer_1 is failed
- "('version is ' ~ docker_py_version ~'. Minimum version required is 2.0.0') in oom_killer_1.msg"
when: docker_py_version is version('2.0.0', '<')
####################################################################
## oom_score_adj ###################################################
@ -2492,7 +2483,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
oom_score_adj: 5
state: started
register: oom_score_adj_1
ignore_errors: yes
- name: oom_score_adj (idempotency)
docker_container:
@ -2502,7 +2492,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
oom_score_adj: 5
state: started
register: oom_score_adj_2
ignore_errors: yes
- name: oom_score_adj (change)
docker_container:
@ -2513,7 +2502,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
state: started
force_kill: yes
register: oom_score_adj_3
ignore_errors: yes
- name: cleanup
docker_container:
@ -2527,12 +2515,6 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
- oom_score_adj_1 is changed
- oom_score_adj_2 is not changed
- oom_score_adj_3 is changed
when: docker_py_version is version('2.0.0', '>=')
- assert:
that:
- oom_score_adj_1 is failed
- "('version is ' ~ docker_py_version ~'. Minimum version required is 2.0.0') in oom_score_adj_1.msg"
when: docker_py_version is version('2.0.0', '<')
####################################################################
## output_logs #####################################################