Enable weave upgrade from previous versions
Raise readiness probe initial time to 60 (was 30)pull/1006/head
parent
0a7c6eb9dc
commit
29fd957352
|
@ -30,8 +30,8 @@
|
|||
return_content: yes
|
||||
run_once: true
|
||||
register: weave_status
|
||||
retries: 10
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
retries: 12
|
||||
delay: 10
|
||||
until: "{{ weave_status.status == 200 and
|
||||
'Status: ready' in weave_status.content }}"
|
||||
delegate_to: "{{groups['kube-master'][0]}}"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
- include: pre-upgrade.yml
|
||||
|
||||
- name: Weave | Copy cni plugins from hyperkube
|
||||
command: "{{ docker_bin_dir }}/docker run --rm -v /opt/cni/bin:/cnibindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp -r /opt/cni/bin/. /cnibindir/"
|
||||
register: cni_task_result
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
- name: Weave pre-upgrade | Stop legacy weave
|
||||
command: weave stop
|
||||
failed_when: false
|
||||
|
||||
- name: Weave pre-upgrade | Stop legacy systemd weave services
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
enabled: no
|
||||
state: stopped
|
||||
with_items:
|
||||
- weaveexpose
|
||||
- weaveproxy
|
||||
- weave
|
||||
failed_when: false
|
||||
|
||||
- name: Weave pre-upgrade | Purge legacy systemd weave systemd unit files
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
register: purged_weave_systemd_units
|
||||
with_items:
|
||||
- "/etc/systemd/system/weaveexpose.service"
|
||||
- "/etc/systemd/system/weaveproxy.service"
|
||||
- "/etc/systemd/system/weave.service"
|
||||
|
||||
- name: Weave pre-upgrade | Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
when: ansible_service_mgr == "systemd" and purged_weave_systemd_units.changed
|
||||
|
||||
- name: Weave pre-upgrade | Purge legacy weave configs and binary
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- "{{ bin_dir }}/weave"
|
||||
- "/etc/weave.env"
|
||||
|
||||
- name: Weave pre-upgrade | Purge legacy weave docker containers
|
||||
shell: "docker ps -af 'name=^/weave.*' -q | xargs --no-run-if-empty docker rm -f"
|
|
@ -54,7 +54,7 @@ spec:
|
|||
value: {{ weave_expose_ip }}
|
||||
{% endif %}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 30
|
||||
initialDelaySeconds: 60
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /status
|
||||
|
|
Loading…
Reference in New Issue