diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-02-02 09:08:16 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-02-02 09:08:16 -0500 |
commit | 1cfafd5e34d7ad442b9a1ecc50bc72bac28cc32d (patch) | |
tree | 894e3acf9f68f9ecc4a29fe2e082628c2e6106b3 | |
parent | 66ba7e2c3a576700a0d201ba3ba2db360e652617 (diff) | |
parent | bee65e693b56a89e709d2125e08bcddb13310c9f (diff) | |
download | openshift-1cfafd5e34d7ad442b9a1ecc50bc72bac28cc32d.tar.gz openshift-1cfafd5e34d7ad442b9a1ecc50bc72bac28cc32d.tar.bz2 openshift-1cfafd5e34d7ad442b9a1ecc50bc72bac28cc32d.tar.xz openshift-1cfafd5e34d7ad442b9a1ecc50bc72bac28cc32d.zip |
Merge pull request #1019 from dgoodwin/etcd-serial
Install and start one etcd server before the others.
-rw-r--r-- | playbooks/common/openshift-etcd/config.yml | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/playbooks/common/openshift-etcd/config.yml b/playbooks/common/openshift-etcd/config.yml index d23a54511..93eb157cb 100644 --- a/playbooks/common/openshift-etcd/config.yml +++ b/playbooks/common/openshift-etcd/config.yml @@ -69,8 +69,32 @@ validate_checksum: yes with_items: etcd_needing_server_certs -- name: Configure etcd hosts - hosts: oo_etcd_to_config +# Configure a first etcd host to avoid conflicts in choosing a leader +# if other members come online too quickly. +- name: Configure first etcd host + hosts: oo_first_etcd + vars: + sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}" + etcd_url_scheme: https + etcd_peer_url_scheme: https + etcd_peers_group: oo_etcd_to_config + pre_tasks: + - name: Ensure certificate directory exists + file: + path: "{{ etcd_cert_config_dir }}" + state: directory + - name: Unarchive the tarball on the etcd host + unarchive: + src: "{{ sync_tmpdir }}/{{ etcd_cert_subdir }}.tgz" + dest: "{{ etcd_cert_config_dir }}" + when: etcd_server_certs_missing + roles: + - etcd + - role: nickhammond.logrotate + +# Configure the remaining etcd hosts, skipping the first one we dealt with above. +- name: Configure remaining etcd hosts + hosts: oo_etcd_to_config:!oo_first_etcd vars: sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}" etcd_url_scheme: https |