kolla-ansible/ansible/roles/cinder/tasks/reload.yml
Mark Goddard 80a32c3c74 cinder: restart services after upgrade
This patch is roughly an adaptation of
Ia6fc9011ee6f5461f40a1307b72709d769814a79 for cinder.

During an upgrade, cinder pins the version of RPC calls to the minimum
seen across all services. This ensures that old services do not receive
data they cannot handle. After the upgrade is complete, all cinder
services are supposed to be reloaded to cause them to check again the
RPC versions of services and use the new latest version which should now
be supported by all running services.

There is a second issue in that it takes some time for the upgraded
services to update the cinder services database table with their new
version. We need to wait until all cinder services have done this
before the restart is performed, otherwise the RPC version cap will
remain in place. There is currently no interface in cinder available for
checking these versions, so as a workaround we use a configurable
delay with a default duration of 30 seconds, as we do for nova.

This change restarts all cinder services after an upgrade, after a 30
second delay.

Closes-Bug: #1954932
Related-Bug: #1833069

Change-Id: I9164dc589386d2c2d4daf1bf84061b806ba9988d
2021-12-18 09:42:24 +00:00

11 lines
337 B
YAML

---
- name: Reload cinder services to remove RPC version pin
vars:
service: "{{ item.value }}"
become: true
kolla_docker:
action: "restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}"