Conditional LVM storage setup for cinder-volume

Set up the LVM storage only if we're using iSCSI backend.

Change-Id: I62e8f9cc38b201aebd1799e05ffc1398d13a9aa0
This commit is contained in:
Jiri Stransky 2017-06-13 12:25:32 +02:00
parent 54c31f664f
commit 8fc970a12a

View File

@ -130,10 +130,12 @@ outputs:
with_items:
- /var/log/containers/cinder
- /var/lib/cinder
#FIXME: all of this should be conditional on the CinderEnableIscsiBackend value being set to true
- name: cinder_enable_iscsi_backend fact
set_fact:
cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
- name: cinder create LVM volume group dd
command:
list_join:
list_join:
- ''
- - 'dd if=/dev/zero of=/var/lib/cinder/cinder-volumes bs=1 count=0 seek='
- str_replace:
@ -143,6 +145,7 @@ outputs:
- 'M'
args:
creates: /var/lib/cinder/cinder-volumes
when: cinder_enable_iscsi_backend
- name: cinder create LVM volume group
shell: |
if ! losetup /dev/loop2; then
@ -157,6 +160,7 @@ outputs:
args:
executable: /bin/bash
creates: /dev/loop2
when: cinder_enable_iscsi_backend
upgrade_tasks:
- name: Stop and disable cinder_volume service
tags: step2