summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-cinder_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-cinder_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb15
1 files changed, 15 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 c1ca58c..e9cc27d 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
12 file://cinder.init \ 12 file://cinder.init \
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 " 16 "
16 17
17SRCREV="8b5fb8409322f61d8b610c97c109a61bf48a940e" 18SRCREV="8b5fb8409322f61d8b610c97c109a61bf48a940e"
@@ -38,6 +39,9 @@ do_install_append() {
38 install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/ 39 install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/
39 install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/ 40 install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/
40 41
42 install -d ${CINDER_CONF_DIR}/drivers
43 install -m 600 ${WORKDIR}/nfs_setup.sh ${CINDER_CONF_DIR}/drivers/
44
41 install -d ${D}${localstatedir}/log/${SRCNAME} 45 install -d ${D}${localstatedir}/log/${SRCNAME}
42 46
43 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 47 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
@@ -55,6 +59,8 @@ do_install_append() {
55} 59}
56 60
57CINDER_LVM_VOLUME_BACKING_FILE_SIZE ?= "2G" 61CINDER_LVM_VOLUME_BACKING_FILE_SIZE ?= "2G"
62CINDER_NFS_VOLUME_SERVERS_DEFAULT = "controller:/etc/cinder/nfs_volumes"
63CINDER_NFS_VOLUME_SERVERS ?= "${CINDER_NFS_VOLUME_SERVERS_DEFAULT}"
58 64
59pkg_postinst_${SRCNAME}-setup () { 65pkg_postinst_${SRCNAME}-setup () {
60 if [ "x$D" != "x" ]; then 66 if [ "x$D" != "x" ]; then
@@ -73,6 +79,14 @@ pkg_postinst_${SRCNAME}-setup () {
73 #Create cinder volume group backing file 79 #Create cinder volume group backing file
74 [[ -f /etc/cinder/volumes-backing ]] || truncate -s ${CINDER_LVM_VOLUME_BACKING_FILE_SIZE} /etc/cinder/volumes-backing 80 [[ -f /etc/cinder/volumes-backing ]] || truncate -s ${CINDER_LVM_VOLUME_BACKING_FILE_SIZE} /etc/cinder/volumes-backing
75 echo "include /etc/cinder/data/volumes/*" >> /etc/tgt/targets.conf 81 echo "include /etc/cinder/data/volumes/*" >> /etc/tgt/targets.conf
82
83 # Create Cinder nfs_share config file with default nfs server
84 if [ ! -f /etc/cinder/nfs_shares ]; then
85 echo "${CINDER_NFS_VOLUME_SERVERS}" > /etc/cinder/nfs_shares
86 sed 's/\s\+/\n/g' -i /etc/cinder/nfs_shares
87 [[ "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}
89 fi
76} 90}
77 91
78PACKAGES += "${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-volume ${SRCNAME}-scheduler" 92PACKAGES += "${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-setup ${SRCNAME}-api ${SRCNAME}-volume ${SRCNAME}-scheduler"
@@ -95,6 +109,7 @@ FILES_${SRCNAME}-scheduler = "${bindir}/cinder-scheduler \
95FILES_${SRCNAME} = "${bindir}/* \ 109FILES_${SRCNAME} = "${bindir}/* \
96 ${sysconfdir}/${SRCNAME}/* \ 110 ${sysconfdir}/${SRCNAME}/* \
97 ${localstatedir}/* \ 111 ${localstatedir}/* \
112 ${sysconfdir}/${SRCNAME}/drivers/* \
98 " 113 "
99 114
100DEPENDS += " \ 115DEPENDS += " \