Merge "[docker] Added a new flag to disable default iptables rules"

This commit is contained in:
Zuul 2020-08-04 09:11:28 +00:00 committed by Gerrit Code Review
commit c58a824e88
3 changed files with 28 additions and 0 deletions

View File

@ -99,6 +99,9 @@ docker_runtime_directory: ""
# Docker client timeout in seconds.
docker_client_timeout: 120
# Docker networking options
docker_disable_default_iptables_rules: "no"
# Retention settings for Docker logs
docker_log_max_file: "5"
docker_log_max_size: "50m"

View File

@ -90,6 +90,19 @@
docker_config: "{{ docker_config | combine({'data-root': docker_runtime_directory}) }}"
when: docker_runtime_directory | length > 0
- name: Warn about docker default iptables
debug:
msg: >-
Docker default iptables rules will be disabled by default from the Victoria 11.0.0
release. If you have any non-Kolla containers that need this functionality, you should
plan a migration for this change, or set docker_disable_default_iptables_rules to false.
when: not docker_disable_default_iptables_rules | bool
- name: Disable docker default iptables rules
set_fact:
docker_config: "{{ docker_config | combine({'iptables': false}) }}"
when: docker_disable_default_iptables_rules | bool
- name: Merge custom docker config
set_fact:
docker_config: "{{ docker_config | combine(docker_custom_config) }}"

View File

@ -0,0 +1,12 @@
---
features:
- |
Adds a new flag, ``docker_disable_default_iptables_rules``, which
defaults to ``no``. Docker is manipulating iptables rules by
default to provide network isolation, and this might cause
problems if the host already has an iptables based firewall.
A common problem is that Docker sets the default policy of the
``FORWARD`` chain in the ``filter`` to ``DROP``.
Setting ``docker_disable_default_iptables_rules`` to ``yes``
will disable Docker's iptables manipulation. This feature will be
enabled by default from the Victoria 11.0.0 release.