Skip to content

Commit

Permalink
fix(upgrade-cluster): retry other masters upgrade (kubernetes-sigs#9768)
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
  • Loading branch information
maxime1907 authored and HoKim98 committed Mar 8, 2023
1 parent 6a23247 commit 7ad326f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions roles/kubernetes/control-plane/tasks/kubeadm-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@
--etcd-upgrade={{ (etcd_deployment_type == "kubeadm") | bool | lower }}
--force
register: kubeadm_upgrade
# Retry is because upload config sometimes fails
retries: 3
until: kubeadm_upgrade.rc == 0
when: inventory_hostname != first_kube_control_plane
failed_when:
- kubeadm_upgrade.rc != 0
- '"field is immutable" not in kubeadm_upgrade.stderr'
failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr
environment:
PATH: "{{ bin_dir }}:{{ ansible_env.PATH }}"
notify: Master | restart kubelet
Expand All @@ -68,7 +69,7 @@
retries: 6
delay: 5
until: scale_down_coredns is succeeded
run_once: yes
run_once: true
when:
- kubeadm_scale_down_coredns_enabled
- dns_mode not in ['coredns', 'coredns_dual']
Expand Down

0 comments on commit 7ad326f

Please sign in to comment.