Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make reset work for crio #6812

Merged
merged 1 commit into from
Oct 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions roles/reset/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@
- containerd
when: container_manager in ["crio", "containerd"] and deploy_container_engine|default(true)

- name: reset | stop and disable crio service
service:
name: crio
state: stopped
enabled: false
failed_when: false
tags: [ crio ]
when: container_manager == "crio"

- name: reset | forcefully wipe CRI-O's container and image storage
command: "crio wipe -f"
failed_when: false
tags: [ crio ]
when: container_manager == "crio"

- name: reset | stop all cri pods
shell: "set -o pipefail && crictl pods -q | xargs -r crictl -t 60s stopp"
args:
Expand All @@ -100,10 +115,8 @@
retries: 5
until: remove_all_cri_containers.rc == 0
delay: 5
tags:
- crio
- containerd
when: container_manager in ["crio", "containerd"]
tags: [ containerd ]
when: container_manager == "containerd"

- name: reset | remove all cri pods
shell: "set -o pipefail && crictl pods -q | xargs -r crictl -t 60s rmp"
Expand All @@ -113,10 +126,8 @@
retries: 5
until: remove_all_cri_containers.rc == 0
delay: 5
tags:
- crio
- containerd
when: container_manager in ["crio", "containerd"]
tags: [ containerd ]
when: container_manager == "containerd"

- name: reset | stop etcd services
service:
Expand Down