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>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
---
|
|
- name: Master | restart kubelet
|
|
command: /bin/true
|
|
notify:
|
|
- Master | reload systemd
|
|
- Master | reload kubelet
|
|
- Master | wait for master static pods
|
|
|
|
- name: Master | wait for master static pods
|
|
command: /bin/true
|
|
notify:
|
|
- Master | wait for the apiserver to be running
|
|
- Master | wait for kube-scheduler
|
|
- Master | wait for kube-controller-manager
|
|
|
|
- name: Master | reload systemd
|
|
command: systemctl daemon-reload
|
|
when: ansible_service_mgr == "systemd"
|
|
|
|
- name: Master | reload kubelet
|
|
service:
|
|
name: kubelet
|
|
state: restarted
|
|
sleep: "{{ kubelet_start_delay|int }}"
|
|
|
|
- name: Master | wait for kube-scheduler
|
|
uri: url=http://localhost:10251/healthz
|
|
register: scheduler_result
|
|
until: scheduler_result.status == 200
|
|
retries: 15
|
|
delay: 5
|
|
|
|
- name: Master | wait for kube-controller-manager
|
|
uri: url=http://localhost:10252/healthz
|
|
register: controller_manager_result
|
|
until: controller_manager_result.status == 200
|
|
retries: 15
|
|
delay: 5
|
|
|
|
- name: Master | wait for the apiserver to be running
|
|
uri: url=http://localhost:8080/healthz
|
|
register: result
|
|
until: result.status == 200
|
|
retries: 10
|
|
delay: 6
|