Skip to content
Snippets Groups Projects
Unverified Commit 83c3ce7f authored by 蒋航's avatar 蒋航 Committed by GitHub
Browse files

Add Retry for Checking calico exists (#9883)

parent 309aaee4
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment