|
@@ -2,44 +2,46 @@
|
|
|
# PREREQ Node service is ready to run static pods
|
|
|
|
|
|
# INPUT r_etcd_upgrade_version
|
|
|
+
|
|
|
+- include_tasks: runtime.yml
|
|
|
+
|
|
|
- name: Verify cluster is healthy pre-upgrade
|
|
|
command: "{{ etcdctlv2 }} cluster-health"
|
|
|
|
|
|
-- name: Remove old etcd service files
|
|
|
- file:
|
|
|
- path: "{{ item }}"
|
|
|
- state: absent
|
|
|
- with_items:
|
|
|
- - "/etc/systemd/system/etcd.service"
|
|
|
- - "/etc/systemd/system/etcd_container.service"
|
|
|
-
|
|
|
# We removed the ability to detect what was previously 'containerized'
|
|
|
# Need to stop and disable this service, but might not be present.
|
|
|
-- name: Stop, disable old etcd services
|
|
|
+- name: Stop, disable and mask old etcd service
|
|
|
systemd:
|
|
|
name: "{{ item }}"
|
|
|
state: stopped
|
|
|
enabled: no
|
|
|
- failed_when: False
|
|
|
+ masked: yes
|
|
|
+ daemon_reload: yes
|
|
|
with_items:
|
|
|
- etcd
|
|
|
- etcd_container
|
|
|
+ failed_when: False
|
|
|
|
|
|
-- name: Mask old etcd services
|
|
|
- command: "systemctl mask {{ etcd_service }}"
|
|
|
+- name: Remove old etcd service files
|
|
|
+ file:
|
|
|
+ path: "{{ item }}"
|
|
|
+ state: absent
|
|
|
with_items:
|
|
|
- - etcd
|
|
|
- - etcd_container
|
|
|
+ - "/etc/systemd/system/etcd.service"
|
|
|
+ - "/etc/systemd/system/etcd_container.service"
|
|
|
|
|
|
-- name: Reload systemd daemon
|
|
|
- command: "systemctl daemon-reload"
|
|
|
+- name: Remove nonexistent services
|
|
|
+ command: "systemctl reset-failed"
|
|
|
|
|
|
- name: Configure static definition
|
|
|
import_tasks: static.yml
|
|
|
|
|
|
+- set_fact:
|
|
|
+ r_etcd_common_etcd_runtime: static_pod
|
|
|
+
|
|
|
- name: Verify cluster is healthy
|
|
|
command: "{{ etcdctlv2 }} cluster-health"
|
|
|
register: etcdctl
|
|
|
- until: etcdctl.rc == 0
|
|
|
+ until: etcdctl.rc == 0 and 'stopped' not in etcdctl.stderr
|
|
|
retries: 30
|
|
|
delay: 10
|