summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-cinder_git.bb
diff options
context:
space:
mode:
authorVu Tran <vu.tran@windriver.com>2014-02-28 09:11:12 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-03-17 14:24:31 -0400
commit2c14cdfb9c34c541a1b3a180ad2a625514300977 (patch)
treec4ff7eed6df633a503b9a1c5a7884ca85f3c4534 /meta-openstack/recipes-devtools/python/python-cinder_git.bb
parentb7527a3c0b5ab0849a0c669cb345c6494628da8f (diff)
downloadmeta-cloud-services-2c14cdfb9c34c541a1b3a180ad2a625514300977.tar.gz
cinder: enable glusterfs backend
This patch adds glusterfs backend into multi-backend cinder support (total of lvm-iscsi, nfs, and glusterfs). This including changing cinder.conf, creating missing glusterfs_shares config file, and adding glusterfs-client into compute/controller node and gluster-server into controller node. Also meta-filesystems is included to pickup fuse filesytem which is needed by glusterfs. Signed-off-by: Vu Tran <vu.tran@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-cinder_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
index e9cc27d..6fb27f8 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
13 file://cinder-volume \ 13 file://cinder-volume \
14 file://0001-run_tests-respect-tools-dir.patch \ 14 file://0001-run_tests-respect-tools-dir.patch \
15 file://nfs_setup.sh \ 15 file://nfs_setup.sh \
16 file://glusterfs_setup.sh \
16 " 17 "
17 18
18SRCREV="8b5fb8409322f61d8b610c97c109a61bf48a940e" 19SRCREV="8b5fb8409322f61d8b610c97c109a61bf48a940e"
@@ -41,6 +42,7 @@ do_install_append() {
41 42
42 install -d ${CINDER_CONF_DIR}/drivers 43 install -d ${CINDER_CONF_DIR}/drivers
43 install -m 600 ${WORKDIR}/nfs_setup.sh ${CINDER_CONF_DIR}/drivers/ 44 install -m 600 ${WORKDIR}/nfs_setup.sh ${CINDER_CONF_DIR}/drivers/
45 install -m 600 ${WORKDIR}/glusterfs_setup.sh ${CINDER_CONF_DIR}/drivers/
44 46
45 install -d ${D}${localstatedir}/log/${SRCNAME} 47 install -d ${D}${localstatedir}/log/${SRCNAME}
46 48
@@ -61,6 +63,8 @@ do_install_append() {
61CINDER_LVM_VOLUME_BACKING_FILE_SIZE ?= "2G" 63CINDER_LVM_VOLUME_BACKING_FILE_SIZE ?= "2G"
62CINDER_NFS_VOLUME_SERVERS_DEFAULT = "controller:/etc/cinder/nfs_volumes" 64CINDER_NFS_VOLUME_SERVERS_DEFAULT = "controller:/etc/cinder/nfs_volumes"
63CINDER_NFS_VOLUME_SERVERS ?= "${CINDER_NFS_VOLUME_SERVERS_DEFAULT}" 65CINDER_NFS_VOLUME_SERVERS ?= "${CINDER_NFS_VOLUME_SERVERS_DEFAULT}"
66CINDER_GLUSTERFS_VOLUME_SERVERS_DEFAULT = "controller:/glusterfs_volumes"
67CINDER_GLUSTERFS_VOLUME_SERVERS ?= "${CINDER_GLUSTERFS_VOLUME_SERVERS_DEFAULT}"
64 68
65pkg_postinst_${SRCNAME}-setup () { 69pkg_postinst_${SRCNAME}-setup () {
66 if [ "x$D" != "x" ]; then 70 if [ "x$D" != "x" ]; then
@@ -87,6 +91,14 @@ pkg_postinst_${SRCNAME}-setup () {
87 [[ "x${CINDER_NFS_VOLUME_SERVERS}" == "x${CINDER_NFS_VOLUME_SERVERS_DEFAULT}" ]] && is_default="1" || is_default="0" 91 [[ "x${CINDER_NFS_VOLUME_SERVERS}" == "x${CINDER_NFS_VOLUME_SERVERS_DEFAULT}" ]] && is_default="1" || is_default="0"
88 /bin/bash /etc/cinder/drivers/nfs_setup.sh ${is_default} 92 /bin/bash /etc/cinder/drivers/nfs_setup.sh ${is_default}
89 fi 93 fi
94
95 # Create Cinder glusterfs_share config file with default glusterfs server
96 if [ ! -f /etc/cinder/glusterfs_shares ] && [ -f /usr/sbin/glusterfsd ]; then
97 echo "${CINDER_GLUSTERFS_VOLUME_SERVERS}" > /etc/cinder/glusterfs_shares
98 sed 's/\s\+/\n/g' -i /etc/cinder/glusterfs_shares
99 [[ "x${CINDER_GLUSTERFS_VOLUME_SERVERS}" == "x${CINDER_GLUSTERFS_VOLUME_SERVERS_DEFAULT}" ]] && is_default="1" || is_default="0"
100 /bin/bash /etc/cinder/drivers/glusterfs_setup.sh ${is_default}
101 fi
90} 102}
91 103
92PACKAGES += "${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-volume ${SRCNAME}-scheduler" 104PACKAGES += "${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-volume ${SRCNAME}-scheduler"