Merge "Simplify the Cinder LVM backend"
This commit is contained in:
commit
06c93471ae
@ -218,10 +218,10 @@ enable_central_logging: "no"
|
||||
enable_ceph: "no"
|
||||
enable_ceph_rgw: "no"
|
||||
enable_cinder: "no"
|
||||
enable_cinder_backend_lvm: "no"
|
||||
enable_heat: "yes"
|
||||
enable_horizon: "yes"
|
||||
enable_ironic: "no"
|
||||
enable_iscsi: "no"
|
||||
enable_magnum: "no"
|
||||
enable_manila: "no"
|
||||
enable_mistral: "no"
|
||||
@ -284,13 +284,8 @@ glance_backend_ceph: "{{ enable_ceph }}"
|
||||
#################################
|
||||
# Cinder options
|
||||
#################################
|
||||
cinder_backend_iscsi: "{{ enable_iscsi }}"
|
||||
cinder_backend_ceph: "{{ enable_ceph }}"
|
||||
cinder_volume_driver: "{{ 'lvm' if cinder_backend_iscsi }}"
|
||||
cinder_volume_group: "{{ 'cinder-volumes' if cinder_backend_iscsi | bool else '' }}"
|
||||
cinder_volume_backend_name: "{{ 'cinder-volumes' if cinder_backend_iscsi | bool else '' }}"
|
||||
cinder_iscsi_helper: "{{ 'tgtadm' if cinder_backend_iscsi | bool else '' }}"
|
||||
cinder_iscsi_protocol: "{{ 'iscsi' if cinder_backend_iscsi | bool else '' }}"
|
||||
|
||||
|
||||
|
||||
#######################
|
||||
|
@ -59,3 +59,17 @@ cinder_logging_debug: "{{ openstack_logging_debug }}"
|
||||
cinder_keystone_user: "cinder"
|
||||
|
||||
openstack_cinder_auth: "{'auth_url':'{{ openstack_auth.auth_url }}','username':'{{ openstack_auth.username }}','password':'{{ openstack_auth.password }}','project_name':'{{ openstack_auth.project_name }}'}"
|
||||
|
||||
|
||||
####################
|
||||
# Cinder
|
||||
####################
|
||||
cinder_backends:
|
||||
- name: "rbd-1"
|
||||
driver: "ceph"
|
||||
enabled: "{{ enable_ceph | bool and cinder_backend_ceph | bool }}"
|
||||
- name: "lvm-1"
|
||||
driver: "lvm"
|
||||
enabled: "{{ enable_cinder_backend_lvm | bool }}"
|
||||
|
||||
cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}"
|
||||
|
@ -39,17 +39,3 @@
|
||||
|
||||
- include: bootstrap_service.yml
|
||||
when: database_created
|
||||
|
||||
- name: Creating cinder targets volume
|
||||
kolla_docker:
|
||||
action: "create_volume"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "cinder"
|
||||
when: "{{ cinder_backend_iscsi | bool }}"
|
||||
|
||||
- name: Creating iscsi info volume
|
||||
kolla_docker:
|
||||
action: "create_volume"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "iscsi_info"
|
||||
when: "{{ cinder_backend_iscsi | bool }}"
|
||||
|
@ -30,8 +30,8 @@
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/dev/:/dev/"
|
||||
- "/run/:/run/"
|
||||
- "{% if cinder_backend_iscsi | bool %}cinder:/var/lib/cinder{% endif %}"
|
||||
- "{% if cinder_backend_iscsi | bool %}iscsi_info:/etc/iscsi{% endif %}"
|
||||
- "{% if enable_cinder_backend_lvm | bool %}cinder:/var/lib/cinder{% endif %}"
|
||||
- "{% if enable_cinder_backend_lvm | bool %}iscsi_info:/etc/iscsi{% endif %}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
|
||||
- name: Starting cinder-volume container
|
||||
|
@ -17,11 +17,8 @@ glance_api_version = 2
|
||||
|
||||
os_region_name = {{ openstack_region_name }}
|
||||
|
||||
{% if enable_ceph | bool and cinder_backend_ceph | bool %}
|
||||
default_volume_type = rbd-1
|
||||
enabled_backends = rbd-1
|
||||
{% elif cinder_backend_iscsi | bool %}
|
||||
enabled_backends = {{ cinder_volume_backend_name }}
|
||||
{% if cinder_enabled_backends %}
|
||||
enabled_backends = {{ cinder_enabled_backends|map(attribute='name')|join(',') }}
|
||||
{% endif %}
|
||||
|
||||
{% if service_name == "cinder-backup" and enable_ceph | bool and cinder_backend_ceph | bool %}
|
||||
@ -77,14 +74,13 @@ rabbit_ha_queues = true
|
||||
rabbit_hosts = {% for host in groups['rabbitmq'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
|
||||
|
||||
|
||||
{% if cinder_backend_iscsi | bool %}
|
||||
[{{ cinder_volume_backend_name }}]
|
||||
volume_group = {{ cinder_volume_group }}
|
||||
{% if enable_cinder_backend_lvm | bool %}
|
||||
[lvm-1]
|
||||
volume_group = cinder-volumes
|
||||
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
|
||||
volume_backend_name = {{ cinder_volume_backend_name }}
|
||||
iscsi_ip_address = {{ hostvars[groups['tgtd'][0]]['ansible_' + hostvars[groups['tgtd'][0]]['storage_interface']]['ipv4']['address'] }}
|
||||
iscsi_helper = {{ cinder_iscsi_helper }}
|
||||
iscsi_protocol = {{ cinder_iscsi_protocol }}
|
||||
volume_backend_name = lvm-1
|
||||
iscsi_helper = tgtadm
|
||||
iscsi_protocol = iscsi
|
||||
|
||||
{% elif enable_ceph | bool and cinder_backend_ceph | bool %}
|
||||
[rbd-1]
|
||||
|
@ -29,7 +29,7 @@
|
||||
- "/run:/run"
|
||||
- "/dev:/dev"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{% if enable_iscsi | bool %}iscsi_info:/etc/iscsi{% endif %}"
|
||||
- "{% if enable_cinder_backend_lvm | bool %}iscsi_info:/etc/iscsi{% endif %}"
|
||||
- "libvirtd:/var/lib/libvirt"
|
||||
- "nova_compute:/var/lib/nova/"
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
roles:
|
||||
- { role: iscsi,
|
||||
tags: iscsi,
|
||||
when: enable_iscsi | bool }
|
||||
when: enable_cinder_backend_lvm | bool }
|
||||
|
||||
- hosts:
|
||||
- multipathd
|
||||
|
@ -95,17 +95,11 @@ tgtd container serves as a bridge between cinder-volume process and a server
|
||||
hosting Logical Volume Groups (LVG). ``iscsid`` container serves as a bridge
|
||||
between nova-compute process and the server hosting LVG.
|
||||
|
||||
In order to use iSCSI as a Cinder's backend, these two parameters must be
|
||||
specified in ``globals.yml``. ::
|
||||
In order to use Cinder's LVM backend, a LVG named ``cinder-volumes`` should
|
||||
exist on the server and following parameter must be specified in
|
||||
``globals.yml``. ::
|
||||
|
||||
enable_iscsi: "yes"
|
||||
|
||||
cinder_volume_group: << lvg_name >>
|
||||
|
||||
|
||||
Where:
|
||||
|
||||
- ``lvg_name`` - is a name of LVG on that server.
|
||||
enable_cinder_backend_lvm: "yes"
|
||||
|
||||
NOTE: For Ubuntu and LVM2/iSCSI
|
||||
|
||||
|
@ -111,10 +111,10 @@ neutron_external_interface: "eth1"
|
||||
#enable_ceph: "no"
|
||||
#enable_ceph_rgw: "no"
|
||||
#enable_cinder: "no"
|
||||
#enable_cinder_backend_lvm: "no"
|
||||
#enable_heat: "yes"
|
||||
#enable_horizon: "yes"
|
||||
#enable_ironic: "no"
|
||||
#enable_iscsi: "no"
|
||||
#enable_magnum: "no"
|
||||
#enable_manila: "no"
|
||||
#enable_mistral: "no"
|
||||
@ -153,8 +153,7 @@ glance_backend_file: "yes"
|
||||
# Cinder options
|
||||
#######################
|
||||
# Enable / disable Cinder backends
|
||||
cinder_backend_iscsi: "{{ enable_iscsi }}"
|
||||
cinder_backend_ceph: "{{ enable_ceph }}"
|
||||
#cinder_backend_ceph: "{{ enable_ceph }}"
|
||||
|
||||
# Cinder's iSCSI backend !!!REQUIRES!!! two parameters:
|
||||
# 1 - IP address of the server hosting LVM Volume group
|
||||
|
Loading…
Reference in New Issue
Block a user