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:
parent
cb53967f85
commit
12a5bc7a9f
@ -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.
|
# ceph be deployed on the nova compute hosts to enable volume backed instances.
|
||||||
nova_cinder_rbd_inuse: False
|
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
|
## General Nova configuration
|
||||||
# If ``nova_osapi_compute_workers`` is unset the system will use half the number of available VCPUS to
|
# 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.
|
# compute the number of api workers to use.
|
||||||
|
@ -232,9 +232,8 @@
|
|||||||
openstack_service_venv_bin: "{{ nova_bin }}"
|
openstack_service_venv_bin: "{{ nova_bin }}"
|
||||||
when:
|
when:
|
||||||
- nova_virt_type != 'ironic'
|
- nova_virt_type != 'ironic'
|
||||||
- "nova_services['nova-compute']['group'] in group_names"
|
- nova_services['nova-compute']['group'] in group_names
|
||||||
- "(nova_libvirt_images_rbd_pool is defined) or
|
- nova_rbd_inuse | bool
|
||||||
(nova_cinder_rbd_inuse | bool)"
|
|
||||||
tags:
|
tags:
|
||||||
- ceph
|
- ceph
|
||||||
|
|
||||||
|
@ -250,10 +250,12 @@ cpu_model_extra_flags = {{ nova_cpu_model_extra_flags | join(',') }}
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if nova_libvirt_images_rbd_pool is defined %}
|
{% if nova_rbd_inuse %}
|
||||||
# ceph rbd support
|
# ceph rbd support
|
||||||
rbd_user = {{ nova_ceph_client }}
|
rbd_user = {{ nova_ceph_client }}
|
||||||
rbd_secret_uuid = {{ nova_ceph_client_uuid }}
|
rbd_secret_uuid = {{ nova_ceph_client_uuid }}
|
||||||
|
{% endif %}
|
||||||
|
{% if nova_libvirt_images_rbd_pool is defined %}
|
||||||
images_type = rbd
|
images_type = rbd
|
||||||
images_rbd_pool = {{ nova_libvirt_images_rbd_pool }}
|
images_rbd_pool = {{ nova_libvirt_images_rbd_pool }}
|
||||||
images_rbd_ceph_conf = /etc/ceph/ceph.conf
|
images_rbd_ceph_conf = /etc/ceph/ceph.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user