Skip to content

Commit

Permalink
Skip retry operation with containerd when etcd installed on host VM (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JRaver authored Jan 10, 2023
1 parent bf8c64a commit 6f1352e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
msg: "Reset confirmation failed"
when: reset_confirmation != "yes"

- name: Gather information about installed services
service_facts:

environment: "{{ proxy_disable_env }}"
roles:
- { role: kubespray-defaults}
Expand Down
4 changes: 4 additions & 0 deletions roles/reset/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
when:
- crictl.stat.exists
- container_manager in ["crio", "containerd"]
- ansible_facts.services['containerd.service'] is defined or ansible_facts.services['cri-o.service'] is defined
ignore_errors: true # noqa ignore-errors

- name: reset | force remove all cri containers
Expand All @@ -80,6 +81,7 @@
- crictl.stat.exists
- container_manager in ["crio", "containerd"]
- deploy_container_engine
- ansible_facts.services['containerd.service'] is defined or ansible_facts.services['cri-o.service'] is defined
ignore_errors: true # noqa ignore-errors

- name: reset | stop and disable crio service
Expand Down Expand Up @@ -109,6 +111,7 @@
when:
- crictl.stat.exists
- container_manager == "containerd"
- ansible_facts.services['containerd.service'] is defined or ansible_facts.services['cri-o.service'] is defined
ignore_errors: true # noqa ignore-errors

- block:
Expand All @@ -122,6 +125,7 @@
when:
- crictl.stat.exists
- container_manager == "containerd"
- ansible_facts.services['containerd.service'] is defined or ansible_facts.services['cri-o.service'] is defined

rescue:
- name: reset | force remove all cri pods (rescue)
Expand Down

0 comments on commit 6f1352e

Please sign in to comment.