From 5e9f27f95b55c15a4d8557a75c87fd5bd5382fcf Mon Sep 17 00:00:00 2001 From: Josh Lothian Date: Fri, 31 Mar 2017 07:46:21 -0500 Subject: [PATCH] Update handler names and explanation --- roles/network_plugin/flannel/handlers/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/network_plugin/flannel/handlers/main.yml b/roles/network_plugin/flannel/handlers/main.yml index e3e937a1f..412563394 100644 --- a/roles/network_plugin/flannel/handlers/main.yml +++ b/roles/network_plugin/flannel/handlers/main.yml @@ -4,14 +4,18 @@ failed_when: false notify: Flannel | restart docker +# special cases for atomic because it defaults to live-restore: true +# So we disable live-restore to pickup the new flannel IP. After +# we enable it, we have to restart docker again to pickup the new +# setting and restore the original behavior - name: Flannel | restart docker command: /bin/true notify: - Flannel | reload systemd - Flannel | reload docker.socket - - Flannel | reconfigure docker restart behavior (atomic) + - Flannel | configure docker live-restore true (atomic) - Flannel | reload docker - - Flannel | restore docker restart behavior (atomic) + - Flannel | configure docker live-restore false (atomic) - Flannel | reload docker (atomic) - Flannel | pause while Docker restarts - Flannel | wait for docker @@ -25,7 +29,7 @@ state: restarted when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] -- name: Flannel | reconfigure docker restart behavior (atomic) +- name: Flannel | configure docker live-restore true (atomic) replace: name: /etc/docker/daemon.json regexp: '"live-restore":.*true' @@ -37,7 +41,7 @@ name: docker state: restarted -- name: Flannel | restore docker restart behavior (atomic) +- name: Flannel | configure docker live-restore false (atomic) replace: name: /etc/docker/daemon.json regexp: '"live-restore": false'