summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-10-05 16:30:29 -0400
committerMichael Gugino <mgugino@redhat.com>2017-10-06 10:03:57 -0400
commit3d0ffb6edbd42d8b663bb268374101f44b6d2e36 (patch)
tree5b4e18dbced20735ffcbbe36645d0bb8955286b1 /roles
parent68358320f1f077d50f28c41bbe45700676302910 (diff)
downloadopenshift-3d0ffb6edbd42d8b663bb268374101f44b6d2e36.tar.gz
openshift-3d0ffb6edbd42d8b663bb268374101f44b6d2e36.tar.bz2
openshift-3d0ffb6edbd42d8b663bb268374101f44b6d2e36.tar.xz
openshift-3d0ffb6edbd42d8b663bb268374101f44b6d2e36.zip
Ensure docker is restarted when iptables is restarted
Currently, os_firewall role may run after docker role, and iptables.service may be restarted. When restarted, this negatively impacts docker's iptables rules. This commit ensures that if iptables is restarted, docker is restarted as well (by systemd) Fixes: https://github.com/openshift/origin/issues/16709
Diffstat (limited to 'roles')
-rw-r--r--roles/docker/handlers/main.yml1
-rw-r--r--roles/docker/tasks/package_docker.yml4
2 files changed, 4 insertions, 1 deletions
diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml
index 591367467..866ed0452 100644
--- a/roles/docker/handlers/main.yml
+++ b/roles/docker/handlers/main.yml
@@ -4,6 +4,7 @@
systemd:
name: "{{ openshift.docker.service_name }}"
state: restarted
+ daemon_reload: yes
register: r_docker_restart_docker_result
until: not r_docker_restart_docker_result | failed
retries: 3
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml
index eab5c3bb1..dbe0b0d28 100644
--- a/roles/docker/tasks/package_docker.yml
+++ b/roles/docker/tasks/package_docker.yml
@@ -48,7 +48,9 @@
template:
dest: "{{ docker_systemd_dir }}/custom.conf"
src: custom.conf.j2
- when: not os_firewall_use_firewalld | default(False) | bool
+ notify:
+ - restart docker
+ when: not (os_firewall_use_firewalld | default(False)) | bool
- name: Add enterprise registry, if necessary
set_fact: