From 6467451a867147d3f224b6e52a1b15ef1f208df0 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Wed, 24 Aug 2016 12:28:18 +0200 Subject: [PATCH] Add wait for etcd for flannel network plugin Signed-off-by: Bogdan Dobrelya --- roles/network_plugin/flannel/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/network_plugin/flannel/tasks/main.yml b/roles/network_plugin/flannel/tasks/main.yml index 9588559f6..9b982df04 100644 --- a/roles/network_plugin/flannel/tasks/main.yml +++ b/roles/network_plugin/flannel/tasks/main.yml @@ -11,6 +11,14 @@ dest: /etc/kubernetes/manifests/flannel-pod.manifest notify: delete default docker bridge +- name: Flannel | wait for etcd + uri: url=http://localhost:2379/health + register: result + until: result.status == 200 + retries: 10 + delay: 5 + when: inventory_hostname in groups['kube-master'] + - name: Flannel | Wait for flannel subnet.env file presence wait_for: path: /run/flannel/subnet.env