kolla-ansible/ansible/roles/etcd/handlers/main.yml
Jan Gutter ccfa2a6c16 etcd: update to v3.4
* Updates etcd to v3.4
* Updated the config to use v3.4's logging mechanism
* Deprecated etcd CA parameters aren't used, so we are not affected
  by their removal.
* Note that we are not currently guarding against skip-version updates for
  etcd.

Notable non-voting jobs exercising some of this:
* kolla-ansible-ubuntu-upgrade-cephadm (cinder->tooz->etcd3gw->etcd)
* kolla-ansible-ubuntu-zun (see
  https://review.opendev.org/c/openstack/openstack-ansible/+/883194 )

Depends-On: https://review.opendev.org/c/openstack/kolla/+/890464
Change-Id: I086e7bbc7db64421445731a533265e7056fbdb43
2023-11-29 17:43:33 +00:00

73 lines
1.9 KiB
YAML

---
- name: Bootstrap etcd on new cluster
include_tasks: 'bootstrap_cluster.yml'
when:
- kolla_action != "config"
listen:
- Bootstrap etcd cluster
- name: Look up the cluster leader
include_tasks: 'lookup_leader.yml'
when:
- kolla_action != "config"
listen:
- Restart etcd container
- Bootstrap etcd services
- Bootstrap etcd cluster
- Check for deleted members
- name: Bootstrap etcd on new services
include_tasks: 'bootstrap_services.yml'
when:
- groups.etcd_had_volume_False is defined
- inventory_hostname in groups.etcd_had_volume_False
- kolla_action != "config"
listen:
- Bootstrap etcd services
# When upgrading an etcd cluster we have to do it one by one
- name: Upgrade etcd non-leaders
include_tasks: 'restart_services.yml'
when:
- inventory_hostname not in (groups.etcd_is_leader_True | default([]))
- kolla_action == "upgrade"
listen:
- Restart etcd container
loop: "{{ groups.etcd }}"
# When there is no upgrade we can restart 25% of the services without
# losing quorum.
- name: Rolling restart of etcd non-leaders
include_tasks: 'restart_services.yml'
when:
- inventory_hostname not in (groups.etcd_is_leader_True | default([]))
- groups.etcd.index(inventory_hostname) % 4 == item
- kolla_action != "config"
- kolla_action != "upgrade"
listen:
- Restart etcd container
- Bootstrap etcd services
- Bootstrap etcd cluster
loop:
- 0
- 1
- 2
- 3
- name: Restart etcd leader
include_tasks: 'restart_services.yml'
when:
- inventory_hostname in (groups.etcd_is_leader_True | default([]))
- kolla_action != "config"
listen:
- Restart etcd container
- Bootstrap etcd services
- Bootstrap etcd cluster
- name: Remove deleted members
include_tasks: 'remove_deleted_members.yml'
when:
- kolla_action != "config"
listen:
- Check for deleted members