Skip to content
Snippets Groups Projects
Unverified Commit ed2b4b80 authored by Etienne Champetier's avatar Etienne Champetier Committed by GitHub
Browse files

Fix reset when using containerd (#7308)

parent 8375aa72
No related branches found
No related tags found
No related merge requests found
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
- container_manager == "containerd" - container_manager == "containerd"
ignore_errors: true ignore_errors: true
- block:
- name: reset | force remove all cri pods - name: reset | force remove all cri pods
command: "{{ bin_dir }}/crictl rmp -a -f" command: "{{ bin_dir }}/crictl rmp -a -f"
register: remove_all_cri_containers register: remove_all_cri_containers
...@@ -143,6 +144,10 @@ ...@@ -143,6 +144,10 @@
- crictl.stat.exists - crictl.stat.exists
- container_manager == "containerd" - container_manager == "containerd"
rescue:
- name: reset | force remove all cri pods (rescue)
shell: "ip netns list | cut -d' ' -f 1 | xargs -n1 ip netns delete && {{ bin_dir }}/crictl rmp -a -f"
- name: reset | stop etcd services - name: reset | stop etcd services
service: service:
name: "{{ item }}" name: "{{ item }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment