mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-19 23:07:47 -02:30
Allow etcd member join by checking cluster health only on first etcd (#5032)
Change-Id: I9cc01cef3a437893225e2d9f58495826bbce7be9
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
0d0b1fdf82
commit
7abf6a6958
@@ -64,7 +64,7 @@
|
|||||||
when: is_etcd_master and etcd_events_cluster_setup
|
when: is_etcd_master and etcd_events_cluster_setup
|
||||||
|
|
||||||
- name: Configure | Check if etcd cluster is healthy
|
- name: Configure | Check if etcd cluster is healthy
|
||||||
shell: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
|
shell: "{{ bin_dir }}/etcdctl --no-sync --endpoints={{ etcd_client_url }} cluster-health | grep -q 'cluster is healthy'"
|
||||||
register: etcd_cluster_is_healthy
|
register: etcd_cluster_is_healthy
|
||||||
until: etcd_cluster_is_healthy.rc == 0
|
until: etcd_cluster_is_healthy.rc == 0
|
||||||
retries: 4
|
retries: 4
|
||||||
@@ -72,7 +72,11 @@
|
|||||||
ignore_errors: false
|
ignore_errors: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
check_mode: no
|
check_mode: no
|
||||||
when: is_etcd_master and etcd_cluster_setup
|
delegate_to: "{{ groups['etcd'][0] }}"
|
||||||
|
run_once: yes
|
||||||
|
when:
|
||||||
|
- is_etcd_master
|
||||||
|
- etcd_cluster_setup
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
environment:
|
environment:
|
||||||
@@ -81,7 +85,7 @@
|
|||||||
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.pem"
|
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.pem"
|
||||||
|
|
||||||
- name: Configure | Check if etcd-events cluster is healthy
|
- name: Configure | Check if etcd-events cluster is healthy
|
||||||
shell: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_events_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
|
shell: "{{ bin_dir }}/etcdctl --no-sync --endpoints={{ etcd_events_client_url }} cluster-health | grep -q 'cluster is healthy'"
|
||||||
register: etcd_events_cluster_is_healthy
|
register: etcd_events_cluster_is_healthy
|
||||||
until: etcd_events_cluster_is_healthy.rc == 0
|
until: etcd_events_cluster_is_healthy.rc == 0
|
||||||
retries: 4
|
retries: 4
|
||||||
@@ -89,7 +93,12 @@
|
|||||||
ignore_errors: false
|
ignore_errors: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
check_mode: no
|
check_mode: no
|
||||||
when: is_etcd_master and etcd_events_cluster_setup
|
delegate_to: "{{ groups['etcd'][0] }}"
|
||||||
|
run_once: yes
|
||||||
|
when:
|
||||||
|
- is_etcd_master
|
||||||
|
- etcd_events_cluster_setup
|
||||||
|
- etcd_cluster_setup
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user