mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Fix quorum check when recovering broken etcd cluster (#8126)
This commit is contained in:
@@ -20,10 +20,9 @@
|
||||
when:
|
||||
- groups['broken_etcd']
|
||||
|
||||
# When there is an error, everything is printed in stderr_lines, even "is healthy" messages.
|
||||
- name: Set has_quorum fact
|
||||
set_fact:
|
||||
has_quorum: "{{ etcd_endpoint_health.stderr_lines | select('match', '.*is healthy.*') | list | length >= etcd_endpoint_health.stderr_lines | select('match', '.*is unhealthy.*') | list | length }}"
|
||||
has_quorum: "{{ etcd_endpoint_health.stdout_lines | select('match', '.*is healthy.*') | list | length >= etcd_endpoint_health.stderr_lines | select('match', '.*is unhealthy.*') | list | length }}"
|
||||
when:
|
||||
- groups['broken_etcd']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user