Ensure that etcd health checks always pass
in the etcd handler, the reload etcd action was called after ansible waits for etcd to be up, this means that the health checks which are called immediately after fail (resulting in the etcd role always failing and never finishing) This patch changes the order to move the 'wait for etcd up' resource after the 'reload etcd resource', ensuring that the service is up before the health check is called.
This commit is contained in:
parent
6a398724b6
commit
ff675d40f9
1 changed files with 6 additions and 6 deletions
|
@ -10,6 +10,12 @@
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
when: ansible_service_mgr == "systemd"
|
when: ansible_service_mgr == "systemd"
|
||||||
|
|
||||||
|
- name: reload etcd
|
||||||
|
service:
|
||||||
|
name: etcd
|
||||||
|
state: restarted
|
||||||
|
when: is_etcd_master
|
||||||
|
|
||||||
- name: wait for etcd up
|
- name: wait for etcd up
|
||||||
uri: url="https://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/health" validate_certs=no
|
uri: url="https://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/health" validate_certs=no
|
||||||
register: result
|
register: result
|
||||||
|
@ -17,12 +23,6 @@
|
||||||
retries: 10
|
retries: 10
|
||||||
delay: 5
|
delay: 5
|
||||||
|
|
||||||
- name: reload etcd
|
|
||||||
service:
|
|
||||||
name: etcd
|
|
||||||
state: restarted
|
|
||||||
when: is_etcd_master
|
|
||||||
|
|
||||||
- name: set etcd_secret_changed
|
- name: set etcd_secret_changed
|
||||||
set_fact:
|
set_fact:
|
||||||
etcd_secret_changed: true
|
etcd_secret_changed: true
|
||||||
|
|
Loading…
Reference in a new issue