Use async/poll on drain tasks to prevent SSH connection timeouts (#13081)

This commit is contained in:
NoNE
2026-03-17 10:01:36 +01:00
committed by GitHub
parent 3c6d368397
commit 39b97464be
2 changed files with 6 additions and 0 deletions

View File

@@ -59,6 +59,8 @@
--timeout {{ drain_timeout }}
--delete-emptydir-data {{ kube_override_hostname | default(inventory_hostname) }}
{% if drain_pod_selector %}--pod-selector '{{ drain_pod_selector }}'{% endif %}
async: "{{ (drain_timeout | regex_replace('s$', '') | int) + 120 }}"
poll: 15
when: drain_nodes
register: result
failed_when:
@@ -82,6 +84,8 @@
--delete-emptydir-data {{ kube_override_hostname | default(inventory_hostname) }}
{% if drain_pod_selector %}--pod-selector '{{ drain_pod_selector }}'{% endif %}
--disable-eviction
async: "{{ (drain_fallback_timeout | regex_replace('s$', '') | int) + 120 }}"
poll: 15
register: drain_fallback_result
until: drain_fallback_result.rc == 0
retries: "{{ drain_fallback_retries }}"