Merge pull request #2068 from chadswen/remove-container-retries

Retry kube container removal during upgrade
This commit is contained in:
Spencer Smith 2018-01-09 15:03:50 -05:00 committed by GitHub
commit ef96123482
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -41,12 +41,24 @@
- name: Master | Remove apiserver container
shell: "docker ps -af name=k8s_kube-apiserver* -q | xargs --no-run-if-empty docker rm -f"
register: remove_apiserver_container
retries: 4
until: remove_apiserver_container.rc == 0
delay: 5
- name: Master | Remove scheduler container
shell: "docker ps -af name=k8s_kube-scheduler* -q | xargs --no-run-if-empty docker rm -f"
register: remove_scheduler_container
retries: 4
until: remove_scheduler_container.rc == 0
delay: 5
- name: Master | Remove controller manager container
shell: "docker ps -af name=k8s_kube-controller-manager* -q | xargs --no-run-if-empty docker rm -f"
register: remove_cm_container
retries: 4
until: remove_cm_container.rc == 0
delay: 5
- name: Master | wait for kube-scheduler
uri:

View file

@ -22,4 +22,8 @@
command: docker rm -fv kubelet
failed_when: false
changed_when: false
register: remove_kubelet_container
retries: 4
until: remove_kubelet_container.rc == 0
delay: 5
when: kubelet_deployment_type == 'host' and kubelet_container_check.rc == 0