13f5217d88
In order to mitigate sporadic data races in etcd (publish error: etcdserver: request timed out"): - Add etcd_start_delay and kubelet_start_delay (defaults to a 5 sec.) - Increase default start sleep times to foo_start_delay from a 1 sec. - Add restart sleeping as well. - Add missing start sleep commands as appropriate. Closes: https://github.com/kubespray/kargo/issues/342 Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
39 lines
843 B
YAML
39 lines
843 B
YAML
---
|
|
- name: restart etcd
|
|
command: /bin/true
|
|
notify:
|
|
- etcd | reload systemd
|
|
- reload etcd
|
|
- wait for etcd up
|
|
|
|
- name: restart etcd-proxy
|
|
command: /bin/true
|
|
notify:
|
|
- etcd | reload systemd
|
|
- reload etcd-proxy
|
|
- wait for etcd up
|
|
|
|
- name: etcd | reload systemd
|
|
command: systemctl daemon-reload
|
|
when: ansible_service_mgr == "systemd"
|
|
|
|
- name: wait for etcd up
|
|
uri: url="http://{% if is_etcd_master %}{{ etcd_address }}{% else %}127.0.0.1{% endif %}:2379/health"
|
|
register: result
|
|
until: result.status == 200
|
|
retries: 10
|
|
delay: 5
|
|
|
|
- name: reload etcd
|
|
service:
|
|
name: etcd
|
|
state: restarted
|
|
sleep: "{{ etcd_start_delay|int }}"
|
|
when: is_etcd_master
|
|
|
|
- name: reload etcd-proxy
|
|
service:
|
|
name: etcd-proxy
|
|
state: restarted
|
|
sleep: "{{ etcd_start_delay|int }}"
|
|
when: is_etcd_proxy
|