Merge "cinder: restart services after upgrade"
This commit is contained in:
commit
6c04445c7b
ansible/roles/cinder
releasenotes/notes
@ -199,6 +199,15 @@ cinder_logging_debug: "{{ openstack_logging_debug }}"
|
||||
|
||||
openstack_cinder_auth: "{{ openstack_auth }}"
|
||||
|
||||
# After upgrading cinder, services will have an RPC version cap in place. We
|
||||
# need to restart all services in order to allow them to use the latest RPC
|
||||
# version. Ideally, there would be a way to check whether all cinder services
|
||||
# are using the latest version, but currently there is not. Instead, wait a
|
||||
# short time for all cinder services to update the version of their service in
|
||||
# the database. This seems to take around 10 seconds, but the default is 30 to
|
||||
# allow room for slowness.
|
||||
cinder_rpc_version_startup_delay: 30
|
||||
|
||||
|
||||
####################
|
||||
# Cinder
|
||||
|
@ -66,3 +66,23 @@
|
||||
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
|
||||
# NOTE(mgoddard): After upgrading cinder, services will have an RPC version cap
|
||||
# in place. We need to restart all services in order to allow them to use the
|
||||
# latest RPC version. Ideally, there would be a way to check whether all cinder
|
||||
# services are using the latest version, but currently there is not. Instead,
|
||||
# wait a short time for all cinder services to update the version of their
|
||||
# service in the database. This seems to take around 10 seconds, but the
|
||||
# default is 30 to allow room for slowness.
|
||||
|
||||
- name: Wait for cinder services to update service versions
|
||||
pause:
|
||||
seconds: "{{ cinder_rpc_version_startup_delay }}"
|
||||
run_once: true
|
||||
when:
|
||||
- kolla_action == 'upgrade'
|
||||
listen:
|
||||
- Restart cinder-api container
|
||||
- Restart cinder-scheduler container
|
||||
- Restart cinder-volume container
|
||||
- Restart cinder-backup container
|
||||
|
10
ansible/roles/cinder/tasks/reload.yml
Normal file
10
ansible/roles/cinder/tasks/reload.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
- 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 }}"
|
@ -13,6 +13,8 @@
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- import_tasks: reload.yml
|
||||
|
||||
- name: Running Cinder online schema migration
|
||||
vars:
|
||||
cinder_api: "{{ cinder_services['cinder-api'] }}"
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes an issue with Cinder upgrade where Cinder services would remain
|
||||
pinned to the previous release's RPC & object versions. `LP#1954932
|
||||
<https://bugs.launchpad.net/kolla-ansible/+bug/1954932>`__
|
Loading…
x
Reference in New Issue
Block a user