Check volume group exists for Cinder in prechecks

Add a service check for Cinder when using iscsi/LVM, that the
appropriate volume group exists.

TrivialFix

Change-Id: I54e01911709db73549334760498b4246fe6271d7
Co-Authored-By: Vladislav Belogrudov <vladislav.belogrudov@oracle.com>
This commit is contained in:
Paul Bourke 2016-08-11 15:18:01 +00:00
parent 7db277b145
commit 233090300e
5 changed files with 18 additions and 5 deletions

View File

@ -73,3 +73,5 @@ cinder_backends:
enabled: "{{ enable_cinder_backend_lvm | bool }}"
cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}"
cinder_volume_group: "cinder-volumes"

View File

@ -79,7 +79,7 @@ lock_path = /var/lib/cinder/tmp
{% if enable_cinder_backend_lvm | bool %}
[lvm-1]
volume_group = cinder-volumes
volume_group = {{ cinder_volume_group }}
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = lvm-1
iscsi_helper = tgtadm

View File

@ -64,3 +64,13 @@
- enable_ceilometer | bool
- not enable_mongodb | bool
- ceilometer_database_type == "mongodb"
- name: Checking LVM volume group exists for Cinder
command: "vgs {{ cinder_volume_group }}"
register: result
changed_when: false
failed_when: result | failed
when:
- inventory_hostname in groups['cinder-volume']
- enable_cinder | bool
- enable_cinder_backend_lvm | bool

View File

@ -187,10 +187,7 @@ kolla_internal_vip_address: "10.10.10.254"
# Enable / disable Cinder backends
#cinder_backend_ceph: "{{ enable_ceph }}"
# Cinder's iSCSI backend !!!REQUIRES!!! two parameters:
# 1 - IP address of the server hosting LVM Volume group
# 2 - The name of Volume group which Cinder will use.
#cinder_volume_group:
#cinder_volume_group: "cinder-volumes"
#######################

View File

@ -0,0 +1,4 @@
---
features:
- When Cinder, iSCSI and the LVM driver are enabled, check that the
appropriate volume group exists on the target nodes.