diff options
author | Jan Chaloupka <jchaloup@redhat.com> | 2017-06-23 12:14:24 +0200 |
---|---|---|
committer | Jan Chaloupka <jchaloup@redhat.com> | 2017-06-28 13:46:55 +0200 |
commit | 2b521c8ae6c468fd2bb98362221483eced103696 (patch) | |
tree | 24c34c7cbfc39e91d510d87de9099f3f96fca759 /roles/etcd_migrate/tasks/check_cluster_status.yml | |
parent | 002ceeb5bf17efe27880b1a17a342efabf9dbc30 (diff) | |
download | openshift-2b521c8ae6c468fd2bb98362221483eced103696.tar.gz openshift-2b521c8ae6c468fd2bb98362221483eced103696.tar.bz2 openshift-2b521c8ae6c468fd2bb98362221483eced103696.tar.xz openshift-2b521c8ae6c468fd2bb98362221483eced103696.zip |
attach leases via the first master only and only once
- move openshift-etcd/migrate.yml from byo to common and keep just the entry point
- replace std_include with essential plays (e.g. no need to detect openshift version)
- delegate the ttl re-attaching to the first master
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 }}" |