rbd: add var for inuse and enable setting secret

This patch refactors a variable to determine if we RBD is in
use (either directly or via cinder-volume).
It also uses this to make sure to always set rbd_user and the
rbd_secret_uuid both are set so booting from Cinder with local
storage works.
Change-Id: I052f50cd527ea222e74fdc3684613499f2b55d8e
This commit is contained in:
Mohammed Naser
2019年07月30日 12:32:33 -04:00
parent cb53967f85
commit 12a5bc7a9f

View File

@@ -393,6 +393,9 @@ nova_ceph_client_uuid: 517a4663-3927-44bc-9ea7-4a90e1cd4c66
# ceph be deployed on the nova compute hosts to enable volume backed instances.
nova_cinder_rbd_inuse:False
# Used to determine if we need a Ceph client
nova_rbd_inuse:"(nova_libvirt_images_rbd_pool is defined) or (nova_cinder_rbd_inuse | bool)"
## General Nova configuration
# If ``nova_osapi_compute_workers`` is unset the system will use half the number of available VCPUS to
# compute the number of api workers to use.

View File

@@ -232,9 +232,8 @@
openstack_service_venv_bin:"{{ nova_bin }}"
when:
- nova_virt_type != 'ironic'
- "nova_services['nova-compute']['group'] in group_names"
- "(nova_libvirt_images_rbd_pool is defined) or
(nova_cinder_rbd_inuse | bool)"
- nova_services['nova-compute']['group'] in group_names
- nova_rbd_inuse | bool
tags:
- ceph

View File

@@ -250,10 +250,12 @@ cpu_model_extra_flags = {{ nova_cpu_model_extra_flags | join(',') }}
{% endif %}
{% endif %}
{% if nova_libvirt_images_rbd_pool is defined %}
{% if nova_rbd_inuse %}
# ceph rbd support
rbd_user = {{ nova_ceph_client }}
rbd_secret_uuid = {{ nova_ceph_client_uuid }}
{% endif %}
{% if nova_libvirt_images_rbd_pool is defined %}
images_type = rbd
images_rbd_pool = {{ nova_libvirt_images_rbd_pool }}
images_rbd_ceph_conf = /etc/ceph/ceph.conf
Reference in New Issue
openstack/openstack-ansible-os_nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.