cri-o reset all containers and pods (#3856)

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
pull/3889/head
Ganesh Maharaj Mahalingam 2018-12-12 01:59:55 -08:00 committed by Kubernetes Prow Robot
parent e50647d252
commit 1a50a1a733
1 changed files with 30 additions and 0 deletions

View File

@ -67,6 +67,17 @@
tags:
- docker
- name: reset | stop all cri-o containers
shell: "crictl ps -aq | xargs -r crictl stop"
register: remove_all_crio_containers
retries: 4
until: remove_all_crio_containers.rc == 0
delay: 5
tags:
- crio
when: container_manager == 'crio'
- name: reset | remove all cri-o containers
shell: "crictl ps -aq | xargs -r crictl rm"
register: remove_all_crio_containers
@ -77,6 +88,25 @@
- crio
when: container_manager == 'crio' and deploy_container_engine|default(true)
- name: reset | stop all cri-o pods
shell: "crictl pods -q | xargs -r crictl stopp"
register: remove_all_crio_containers
retries: 4
until: remove_all_crio_containers.rc == 0
delay: 5
tags:
- crio
when: container_manager == 'crio'
- name: reset | remove all cri-o pods
shell: "crictl pods -q | xargs -r crictl rmp"
register: remove_all_crio_containers
retries: 4
until: remove_all_crio_containers.rc == 0
delay: 5
tags:
- crio
when: container_manager == 'crio'
- name: reset | gather mounted kubelet dirs
shell: mount | grep /var/lib/kubelet/ | awk '{print $3}' | tac
args: