diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-09-14 14:50:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 14:50:58 -0400 |
commit | 4b728ee84b2c0b52a9c8dbf96d04f1bccc5c51e3 (patch) | |
tree | 8ca882f2ef72ffb9784fffecdfba0cbd4415cd1f /playbooks/common/openshift-etcd | |
parent | c14ba0d9fb0c1249eac0c034feef1cc428f0704b (diff) | |
parent | 833c18bf8efa3c0988975138f1b7ddb95cd25f12 (diff) | |
download | openshift-4b728ee84b2c0b52a9c8dbf96d04f1bccc5c51e3.tar.gz openshift-4b728ee84b2c0b52a9c8dbf96d04f1bccc5c51e3.tar.bz2 openshift-4b728ee84b2c0b52a9c8dbf96d04f1bccc5c51e3.tar.xz openshift-4b728ee84b2c0b52a9c8dbf96d04f1bccc5c51e3.zip |
Merge pull request #5367 from abutcher/etcd-scaleup-master-client-urls
Bug 1490304: Etcd scale-up playbook should add new member to etcdClientInfo of master-config.yaml
Diffstat (limited to 'playbooks/common/openshift-etcd')
-rw-r--r-- | playbooks/common/openshift-etcd/scaleup.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/playbooks/common/openshift-etcd/scaleup.yml b/playbooks/common/openshift-etcd/scaleup.yml index 5f8bb1c7a..d3fa48bad 100644 --- a/playbooks/common/openshift-etcd/scaleup.yml +++ b/playbooks/common/openshift-etcd/scaleup.yml @@ -23,6 +23,9 @@ -C {{ etcd_peer_url_scheme }}://{{ hostvars[etcd_ca_host].etcd_hostname }}:{{ etcd_client_port }} member add {{ etcd_hostname }} {{ etcd_peer_url_scheme }}://{{ etcd_ip }}:{{ etcd_peer_port }} delegate_to: "{{ etcd_ca_host }}" + failed_when: + - etcd_add_check.rc == 1 + - ("peerURL exists" not in etcd_add_check.stderr) register: etcd_add_check retries: 3 delay: 10 @@ -53,3 +56,19 @@ retries: 3 delay: 30 until: scaleup_health.rc == 0 + +- name: Update master etcd client urls + hosts: oo_masters_to_config + serial: 1 + tasks: + - include_role: + name: openshift_master + tasks_from: update_etcd_client_urls + vars: + etcd_ca_host: "{{ groups.oo_etcd_to_config.0 }}" + openshift_ca_host: "{{ groups.oo_first_master.0 }}" + openshift_master_etcd_hosts: "{{ hostvars + | oo_select_keys(groups['oo_etcd_to_config'] | union(groups['oo_new_etcd_to_config'])) + | oo_collect('openshift.common.hostname') + | default(none, true) }}" + openshift_master_etcd_port: "{{ (etcd_client_port | default('2379')) if (groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config) else none }}" |