Merge "Properly detect RBD in use on Cinder backends" into stable/ocata
This commit is contained in:
commit
22b87ced86
@ -22,6 +22,18 @@
|
||||
tags:
|
||||
- cinder
|
||||
pre_tasks:
|
||||
# Switch to glance api v2 if cinder uses RBD backends
|
||||
- name: Set cinder RBD inuse fact
|
||||
set_fact:
|
||||
cinder_backends_rbd_inuse: "{{ True in groups['cinder_volume'] | map('extract', hostvars, 'cinder_backend_rbd_inuse') }}"
|
||||
delegate_to: localhost
|
||||
delegate_facts: True
|
||||
when:
|
||||
- "'cinder_all' in group_names"
|
||||
- "inventory_hostname == ((groups['cinder_all'] | intersect(ansible_play_hosts)) | list)[0]"
|
||||
- "hostvars['localhost']['cinder_backends_rbd_inuse'] is not defined"
|
||||
tags:
|
||||
- always
|
||||
|
||||
# In order to ensure that any container, software or
|
||||
# config file changes which causes a container/service
|
||||
|
@ -24,6 +24,20 @@
|
||||
tags:
|
||||
- nova
|
||||
pre_tasks:
|
||||
# Enable execution of ceph_client on the nova compute hosts if cinder RBD
|
||||
# backends are used. This is necessary to ensure that volume-backed Nova
|
||||
# instances can function when RBD is the volume backend.
|
||||
- name: Set cinder RBD inuse fact
|
||||
set_fact:
|
||||
nova_cinder_rbd_inuse: "{{ True in groups['cinder_volume'] | map('extract', hostvars, 'cinder_backend_rbd_inuse') }}"
|
||||
delegate_to: localhost
|
||||
delegate_facts: True
|
||||
when:
|
||||
- "'nova_compute' in group_names"
|
||||
- "inventory_hostname == ((groups['nova_compute'] | intersect(ansible_play_hosts)) | list)[0]"
|
||||
- "hostvars['localhost']['nova_cinder_rbd_inuse'] is not defined"
|
||||
tags:
|
||||
- always
|
||||
|
||||
# In order to ensure that any container, software or
|
||||
# config file changes which causes a container/service
|
||||
@ -122,7 +136,6 @@
|
||||
nova_spicehtml5_git_repo: "{{ openstack_repo_git_url }}/spice-html5"
|
||||
nova_spicehtml5_git_install_branch: "{{ spicehtml5_git_install_branch }}"
|
||||
nova_management_address: "{{ management_address }}"
|
||||
nova_cinder_rbd_inuse: "{{ hostvars['localhost']['cinder_backends_rbd_inuse'] }}"
|
||||
|
||||
- role: "openstack_openrc"
|
||||
tags:
|
||||
|
@ -14,7 +14,3 @@
|
||||
# limitations under the License.
|
||||
|
||||
ansible_python_interpreter: /usr/bin/python
|
||||
|
||||
# cinder_backends_rbd_inuse: true if at least 1 cinder_backend on any
|
||||
# cinder_volume host uses Ceph RBD
|
||||
cinder_backends_rbd_inuse: "{{ True in groups['cinder_volume'] | map('extract', hostvars, 'cinder_backend_rbd_inuse') }}"
|
||||
|
Loading…
Reference in New Issue
Block a user