diff --git a/roles/network_plugin/calico/tasks/check.yml b/roles/network_plugin/calico/tasks/check.yml index c500f7434..0ea752418 100644 --- a/roles/network_plugin/calico/tasks/check.yml +++ b/roles/network_plugin/calico/tasks/check.yml @@ -50,10 +50,14 @@ run_once: True delegate_to: "{{ groups['kube_control_plane'][0] }}" -- name: Check if calico ClusterInformation exists - command: "{{ bin_dir }}/calicoctl.sh get ClusterInformation" - register: clusterinformation_exists +- name: Check if calico ready + command: "{{ bin_dir }}/calicoctl.sh get ClusterInformation default" + register: calico_ready run_once: True + ignore_errors: True + retries: 5 + delay: 10 + until: calico_ready.rc == 0 delegate_to: "{{ groups['kube_control_plane'][0] }}" when: calicoctl_sh_exists.stat.exists @@ -76,7 +80,7 @@ But current version is {{ calico_version_on_server.stdout }}. run_once: True delegate_to: "{{ groups['kube_control_plane'][0] }}" - when: calicoctl_sh_exists.stat.exists and clusterinformation_exists.rc == 0 + when: calicoctl_sh_exists.stat.exists and calico_ready.rc == 0 - name: "Check that cluster_id is set if calico_rr enabled" assert: