Browse Source

etcd should not fail when adding an already existing member (#6587)

pull/6571/head
Florian Ruynat 4 years ago
committed by GitHub
parent
commit
706c7cb4f1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. 3
      roles/etcd/tasks/join_etcd_member.yml

3
roles/etcd/tasks/join_etcd_member.yml

@ -2,7 +2,8 @@
- name: Join Member | Add member to etcd cluster # noqa 301 305
shell: "{{ bin_dir }}/etcdctl member add {{ etcd_member_name }} --peer-urls={{ etcd_peer_url }}"
register: member_add_result
until: member_add_result.rc == 0
until: member_add_result.rc == 0 or 'Peer URLs already exists' in member_add_result.stderr
failed_when: member_add_result.rc != 0 and 'Peer URLs already exists' not in member_add_result.stderr
retries: "{{ etcd_retries }}"
delay: "{{ retry_stagger | random + 3 }}"
environment:

Loading…
Cancel
Save