diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-06-28 08:07:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 08:07:55 -0400 |
commit | 646c4a93ed6405c80bc634fa64081950e1bf8e0a (patch) | |
tree | b241b89752dcca1c8482330876b4739a6588b54e /roles/etcd_migrate/tasks/check_cluster_status.yml | |
parent | 2230e46276b004a1124dc06552a947b9023b8d4c (diff) | |
parent | 2b521c8ae6c468fd2bb98362221483eced103696 (diff) | |
download | openshift-646c4a93ed6405c80bc634fa64081950e1bf8e0a.tar.gz openshift-646c4a93ed6405c80bc634fa64081950e1bf8e0a.tar.bz2 openshift-646c4a93ed6405c80bc634fa64081950e1bf8e0a.tar.xz openshift-646c4a93ed6405c80bc634fa64081950e1bf8e0a.zip |
Merge pull request #4623 from ingvagabund/run-ttl-migration-only-one-on-the-first-master
attach leases via the first master only and only once
Diffstat (limited to 'roles/etcd_migrate/tasks/check_cluster_status.yml')
-rw-r--r-- | roles/etcd_migrate/tasks/check_cluster_status.yml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/etcd_migrate/tasks/check_cluster_status.yml b/roles/etcd_migrate/tasks/check_cluster_status.yml index 90fe385c1..b69fb5a52 100644 --- a/roles/etcd_migrate/tasks/check_cluster_status.yml +++ b/roles/etcd_migrate/tasks/check_cluster_status.yml @@ -2,7 +2,7 @@ # etcd_ip originates from etcd_common role - name: Check cluster status command: > - etcdctl --cert /etc/etcd/peer.crt --key /etc/etcd/peer.key --cacert /etc/etcd/ca.crt --endpoints 'https://{{ etcd_peer }}:2379' -w json endpoint status + etcdctl --cert {{ etcd_peer_cert_file }} --key {{ etcd_peer_key_file }} --cacert {{ etcd_peer_ca_file }} --endpoints 'https://{{ etcd_peer }}:{{ etcd_client_port }}' -w json endpoint status environment: ETCDCTL_API: 3 register: l_etcd_cluster_status @@ -15,7 +15,7 @@ # http://docs.ansible.com/ansible/playbooks_filters.html#extracting-values-from-containers - name: Group all raftIndices into a list set_fact: - etcd_members_raft_indices: "{{ groups['oo_etcd_to_config'] | map('extract', hostvars, 'etcd_member_raft_index') | list | unique }}" + etcd_members_raft_indices: "{{ groups['oo_etcd_to_migrate'] | map('extract', hostvars, 'etcd_member_raft_index') | list | unique }}" - name: Check the minimum and the maximum of raftIndices is at most 1 set_fact: @@ -24,9 +24,9 @@ - debug: msg: "Raft indices difference: {{ etcd_members_raft_indices_diff }}" - when: inventory_hostname in groups.oo_etcd_to_config[0] + when: inventory_hostname in groups.oo_etcd_to_migrate[0] # The cluster raft status is ok if the difference of the max and min raft index is at most 1 - name: capture the status set_fact: - l_etcd_cluster_status_ok: "{{ hostvars[groups.oo_etcd_to_config[0]]['etcd_members_raft_indices_diff'] | int < 2 }}" + l_etcd_cluster_status_ok: "{{ hostvars[groups.oo_etcd_to_migrate[0]]['etcd_members_raft_indices_diff'] | int < 2 }}" |