summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-08-30 08:30:34 -0400
committerGitHub <noreply@github.com>2017-08-30 08:30:34 -0400
commit9c3d1e0f8eb246c5e9a25f33af13ce01fec9024f (patch)
tree2c1bca01ed2ac0b6f3c0456e8114fad3c5fe434d /roles
parent6598350bc87d74a0b330cfdffc3ef956d96c7987 (diff)
parentfbe3e47283e4ffc5966f707531dad00966803061 (diff)
downloadopenshift-9c3d1e0f8eb246c5e9a25f33af13ce01fec9024f.tar.gz
openshift-9c3d1e0f8eb246c5e9a25f33af13ce01fec9024f.tar.bz2
openshift-9c3d1e0f8eb246c5e9a25f33af13ce01fec9024f.tar.xz
openshift-9c3d1e0f8eb246c5e9a25f33af13ce01fec9024f.zip
Merge pull request #5229 from sdodson/fix-containerized-etcdv3-migration
Fix scaleup on containerized installations
Diffstat (limited to 'roles')
-rw-r--r--roles/etcd_migrate/tasks/migrate.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/roles/etcd_migrate/tasks/migrate.yml b/roles/etcd_migrate/tasks/migrate.yml
index 173de77f4..54a9c74ff 100644
--- a/roles/etcd_migrate/tasks/migrate.yml
+++ b/roles/etcd_migrate/tasks/migrate.yml
@@ -21,15 +21,24 @@
lineinfile:
line: "ETCD_FORCE_NEW_CLUSTER=true"
dest: /etc/etcd/etcd.conf
+ backup: true
- name: Start etcd
systemd:
name: "{{ l_etcd_service }}"
state: started
+- name: Wait for cluster to become healthy after bringing up first member
+ command: >
+ etcdctl --cert-file {{ etcd_peer_cert_file }} --key-file {{ etcd_peer_key_file }} --ca-file {{ etcd_peer_ca_file }} --endpoint https://{{ etcd_peer }}:{{ etcd_client_port }} cluster-health
+ register: l_etcd_migrate_health
+ until: l_etcd_migrate_health.rc == 0
+ retries: 3
+ delay: 30
- name: Unset ETCD_FORCE_NEW_CLUSTER=true on first etcd host
lineinfile:
line: "ETCD_FORCE_NEW_CLUSTER=true"
dest: /etc/etcd/etcd.conf
state: absent
+ backup: true
- name: Restart first etcd host
systemd:
name: "{{ l_etcd_service }}"