diff options
author | Michael Gugino <mgugino@redhat.com> | 2017-10-09 12:58:40 -0400 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2017-10-09 12:58:40 -0400 |
commit | 91892aad5f5225daead96cb9dd8f7263f0212a2b (patch) | |
tree | a60f7d8ecf956e93ba0ab364ba3f3603cadd9834 /roles/docker | |
parent | 3038a601d1d51fdc9f1698d03a54ecac68251c88 (diff) | |
download | openshift-91892aad5f5225daead96cb9dd8f7263f0212a2b.tar.gz openshift-91892aad5f5225daead96cb9dd8f7263f0212a2b.tar.bz2 openshift-91892aad5f5225daead96cb9dd8f7263f0212a2b.tar.xz openshift-91892aad5f5225daead96cb9dd8f7263f0212a2b.zip |
Add PartOf to docker systemd service unit.
Currently, if iptables service is restarted,
existing iptables rules are removed.
Docker adds iptables rules dyanmically upon
startup and container creation. Restarting
the iptables service results in a loss of these
needed iptables rules.
This commit ensures that if iptables service is
restarted by anisble or the user, docker is
also restarted. This ensures the proper dynamic
iptables rules are in place for docker.
Fixes: openshift/origin#16709
Diffstat (limited to 'roles/docker')
-rw-r--r-- | roles/docker/templates/custom.conf.j2 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/docker/templates/custom.conf.j2 b/roles/docker/templates/custom.conf.j2 index 9b47cb6ab..713412473 100644 --- a/roles/docker/templates/custom.conf.j2 +++ b/roles/docker/templates/custom.conf.j2 @@ -3,3 +3,9 @@ [Unit] Wants=iptables.service After=iptables.service + +# The following line is a work-around to ensure docker is restarted whenever +# iptables is restarted. This ensures the proper iptables rules will be in +# place for docker. +# Note: This will also cause docker to be stopped if iptables is stopped. +PartOf=iptables.service |