mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-14 12:57:45 -02:30
crictl allow setting grace period for stop containers upon reset (#10651)
* crictl allow setting different grace period for stop containers and pods * correct grace period location
This commit is contained in:
@@ -16,3 +16,6 @@ reset_restart_network_service_name: >-
|
|||||||
{%- elif ansible_os_family == "Debian" -%}
|
{%- elif ansible_os_family == "Debian" -%}
|
||||||
networking
|
networking
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
# crictl stop container grace period
|
||||||
|
cri_stop_containers_grace_period: 0
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
register: crictl
|
register: crictl
|
||||||
|
|
||||||
- name: Reset | stop all cri containers
|
- name: Reset | stop all cri containers
|
||||||
shell: "set -o pipefail && {{ bin_dir }}/crictl ps -q | xargs -r {{ bin_dir }}/crictl -t 60s stop"
|
shell: "set -o pipefail && {{ bin_dir }}/crictl ps -q | xargs -r {{ bin_dir }}/crictl -t 60s stop -t {{ cri_stop_containers_grace_period }}"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: remove_all_cri_containers
|
register: remove_all_cri_containers
|
||||||
|
|||||||
Reference in New Issue
Block a user