Browse Source

Add retry to avoid 'unknown' state for calicoctl (#9633)

Signed-off-by: tu1h <lihai.tu@daocloud.io>

Signed-off-by: tu1h <lihai.tu@daocloud.io>
pull/9644/head
tu1h 1 year ago
committed by GitHub
parent
commit
a8cef962e2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. 4
      roles/network_plugin/calico/tasks/check.yml

4
roles/network_plugin/calico/tasks/check.yml

@ -51,6 +51,9 @@
async: 10
poll: 3
run_once: True
until: calico_version_on_server.stdout != 'unknown'
retries: 5
delay: "{{ retry_stagger | random + 3 }}"
delegate_to: "{{ groups['kube_control_plane'][0] }}"
changed_when: false
failed_when: false
@ -62,6 +65,7 @@
msg: >
Your version of calico is not fresh enough for upgrade.
Minimum version is {{ calico_min_version_required }} supported by the previous kubespray release.
But current version is {{ calico_version_on_server.stdout }}.
when:
- 'calico_version_on_server.stdout is defined'
- calico_version_on_server.stdout

Loading…
Cancel
Save