Skip to content

Commit

Permalink
Retry cleaning up calico-node container (kubernetes-sigs#5302)
Browse files Browse the repository at this point in the history
Change-Id: Iad27b107860213759c7ae51f0891d7e5e7c6d96b
  • Loading branch information
mattymo authored and k8s-ci-robot committed Oct 28, 2019
1 parent 81da231 commit 94d4ce5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/network_plugin/calico/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@

- name: docker | delete calico-node containers
shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f"
register: docker_calico_node_remove
until: docker_calico_node_remove is succeeded
retries: 5
when: container_manager in ["docker"]

- name: containerd | delete calico-node containers
shell: 'crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "crictl stopp % && crictl rmp %"'
register: crictl_calico_node_remove
until: crictl_calico_node_remove is succeeded
retries: 5
when: container_manager in ["crio", "containerd"]

- name: Calico | Reload NetworkManager
Expand Down

0 comments on commit 94d4ce5

Please sign in to comment.