fix(upgrade-cluster): retry other masters upgrade (#9768)

Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
pull/9850/head
Maxime Leroy 2023-03-03 14:44:58 +01:00 committed by GitHub
parent 6769bb32b1
commit fd8260b930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -42,10 +42,11 @@
--etcd-upgrade={{ (etcd_deployment_type == "kubeadm") | bool | lower }} --etcd-upgrade={{ (etcd_deployment_type == "kubeadm") | bool | lower }}
--force --force
register: kubeadm_upgrade register: kubeadm_upgrade
# Retry is because upload config sometimes fails
retries: 3
until: kubeadm_upgrade.rc == 0
when: inventory_hostname != first_kube_control_plane when: inventory_hostname != first_kube_control_plane
failed_when: failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr
- kubeadm_upgrade.rc != 0
- '"field is immutable" not in kubeadm_upgrade.stderr'
environment: environment:
PATH: "{{ bin_dir }}:{{ ansible_env.PATH }}" PATH: "{{ bin_dir }}:{{ ansible_env.PATH }}"
notify: Master | restart kubelet notify: Master | restart kubelet
@ -68,7 +69,7 @@
retries: 6 retries: 6
delay: 5 delay: 5
until: scale_down_coredns is succeeded until: scale_down_coredns is succeeded
run_once: yes run_once: true
when: when:
- kubeadm_scale_down_coredns_enabled - kubeadm_scale_down_coredns_enabled
- dns_mode not in ['coredns', 'coredns_dual'] - dns_mode not in ['coredns', 'coredns_dual']