Add Retry for Checking calico exists (#9883)
Signed-off-by: hang.jiang <hang.jiang@daocloud.io>pull/9911/head
parent
309aaee427
commit
83c3ce7f8f
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue