Factor out tgt-specific parts of cinder element

RHEL is only going to support the lio iscsi helper, so the tgt
parts of the element are not going to work there.  A subsequent
change will add a corresponding cinder-lio element to support that.

When this merges, the corresponding change to tripleo-incubator in
I1e33af0cb78fa9477bc5a0b9b89b06b907b81fae must merge as well to
prevent breakage of devtest.

Change-Id: Ic032204076adfa0d30b09423f2a46b587e07400d
This commit is contained in:
Ben Nemec
2014-03-05 15:51:40 -06:00
parent c403c50a89
commit 484e87efba
8 changed files with 25 additions and 5 deletions

View File

@@ -0,0 +1,4 @@
Use tgtd as the iscsi helper for cinder.
The cinder.iscsi-target configuration option must be set to "tgtadm". See the cinder
element readme for details.

View File

@@ -0,0 +1 @@
cinder

View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -eux
install-packages tgt
mkdir -p /etc/tgt/conf.d
echo 'include /mnt/state/var/lib/cinder/volumes/*' > /etc/tgt/conf.d/cinder.conf

View File

@@ -0,0 +1,5 @@
#!/bin/bash
set -eu
os-svc-restart -n tgt

View File

@@ -2,5 +2,4 @@
set -eu
os-svc-enable -n cinder-volume
os-svc-restart -n tgt
os-svc-restart -n cinder-volume

View File

@@ -1,5 +1,8 @@
Install cinder service from git.
An appropriate target element (such as cinder-tgt or cinder-lio) must be included
in images that use cinder.
Configuration
-------------
@@ -7,4 +10,6 @@ cinder:
verbose: False
- Print more verbose output (set logging level to INFO instead of default WARNING level).
debug: False
- Print debugging output (set logging level to DEBUG instead of default WARNING level).
- Print debugging output (set logging level to DEBUG instead of default WARNING level).
iscsi-helper: tgtadm
- Specifies the iSCSI helper to use. Must match the target element included in the image.

View File

@@ -2,8 +2,6 @@
set -eux
mkdir -p /etc/tgt/conf.d
install -d -o root -g cinder -m 0770 /var/lib/cinder/volumes
install -d -o root -g cinder -m 0770 /var/lib/cinder/nfs
register-state-path /var/lib/cinder
echo 'include /mnt/state/var/lib/cinder/volumes/*' > /etc/tgt/conf.d/cinder.conf

View File

@@ -1,7 +1,7 @@
#!/bin/bash
set -eux
install-packages lvm2 libssl-dev tgt libffi-dev nfs-common
install-packages lvm2 libssl-dev libffi-dev nfs-common
echo "qpid-python" | tee -a /opt/stack/cinder/requirements.txt
os-svc-install -i "$CINDER_VENV_DIR" -u cinder -r /opt/stack/cinder