Merge "Apply Zun configuration for Docker based on inventory"

This commit is contained in:
Zuul 2021-04-21 13:09:13 +00:00 committed by Gerrit Code Review
commit 058dd6828d
4 changed files with 14 additions and 6 deletions

View File

@ -6,5 +6,6 @@
- import_tasks: post-install.yml - import_tasks: post-install.yml
- include_tasks: configure-containerd-for-zun.yml - include_tasks: configure-containerd-for-zun.yml
when: containerd_configure_for_zun|bool and when:
inventory_hostname in groups['zun-cni-daemon'] - containerd_configure_for_zun|bool
- "'zun-cni-daemon' in group_names"

View File

@ -66,6 +66,7 @@
docker_config: "{{ docker_config | combine(docker_zun_config) }}" docker_config: "{{ docker_config | combine(docker_zun_config) }}"
when: when:
- docker_configure_for_zun | bool - docker_configure_for_zun | bool
- "'zun-compute' in group_names"
- name: Warn about deprecations - name: Warn about deprecations
debug: debug:
@ -136,7 +137,7 @@
state: absent state: absent
when: when:
- not docker_custom_option - not docker_custom_option
- not docker_configure_for_zun | bool - not docker_configure_for_zun | bool or 'zun-compute' not in group_names
- not docker_http_proxy - not docker_http_proxy
- not docker_https_proxy - not docker_https_proxy
- not docker_no_proxy - not docker_no_proxy
@ -149,7 +150,7 @@
recurse: yes recurse: yes
when: > when: >
docker_custom_option | length > 0 or docker_custom_option | length > 0 or
docker_configure_for_zun | bool or (docker_configure_for_zun | bool and 'zun-compute' in group_names) or
docker_http_proxy | length > 0 or docker_http_proxy | length > 0 or
docker_https_proxy | length > 0 or docker_https_proxy | length > 0 or
docker_no_proxy | length > 0 docker_no_proxy | length > 0
@ -161,7 +162,7 @@
dest: /etc/systemd/system/docker.service.d/kolla.conf dest: /etc/systemd/system/docker.service.d/kolla.conf
when: > when: >
docker_custom_option | length > 0 or docker_custom_option | length > 0 or
docker_configure_for_zun | bool or (docker_configure_for_zun | bool and 'zun-compute' in group_names) or
docker_http_proxy | length > 0 or docker_http_proxy | length > 0 or
docker_https_proxy | length > 0 or docker_https_proxy | length > 0 or
docker_no_proxy | length > 0 docker_no_proxy | length > 0

View File

@ -10,4 +10,4 @@ Environment="NO_PROXY={{ docker_no_proxy }}"
{% endif %} {% endif %}
ExecStart= ExecStart=
# ExecStart commandline copied from 'docker-ce' package. Same on CentOS/Debian/Ubuntu systems. # ExecStart commandline copied from 'docker-ce' package. Same on CentOS/Debian/Ubuntu systems.
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock{% if docker_custom_option %} {{ docker_custom_option }}{% endif %}{% if docker_configure_for_zun|bool %} {{ docker_zun_options }}{% endif %} ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock{% if docker_custom_option %} {{ docker_custom_option }}{% endif %}{% if docker_configure_for_zun|bool and 'zun-compute' in group_names %} {{ docker_zun_options }}{% endif %}

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue with ``kolla-ansible bootstrap-servers`` if Zun is enabled
where Zun-specific configuration for Docker was applied to all nodes.
`LP#1914378 <https://bugs.launchpad.net/kolla-ansible/+bug/1914378>`__