]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes default cinder.conf as the generator is broken.
authorThomas Goirand <thomas@goirand.fr>
Thu, 1 Oct 2015 16:10:15 +0000 (16:10 +0000)
committerThomas Goirand <thomas@goirand.fr>
Thu, 1 Oct 2015 16:10:15 +0000 (16:10 +0000)
Rewritten-From: 77e528387f1db04d03185e60f7f7668eb4d039b1

xenial/debian/changelog
xenial/debian/gen-fixed-config [new file with mode: 0755]
xenial/debian/rules

index a3788b57c54a744bb89258ab0a57f6e2bc9bf314..261a314a863d9a25f27987f02f790be93994afb4 100644 (file)
@@ -1,4 +1,4 @@
-cinder (2:7.0.0~rc1-2) UNRELEASED; urgency=medium
+cinder (2:7.0.0~rc1-2) experimental; urgency=medium
 
   * cinder-api depends on python-openstackclient.
   * Fixed cinder.conf generation.
diff --git a/xenial/debian/gen-fixed-config b/xenial/debian/gen-fixed-config
new file mode 100755 (executable)
index 0000000..88ed708
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+set -x
+
+#tools/config/generate_sample.sh
+
+SOURCE=etc/cinder/cinder.conf.sample
+DESTIN=debian/cinder-common/usr/share/cinder-common/cinder.conf
+
+TMP_FILE=`mktemp -t build-cinder-XXXXXX`
+TMP_FILE2=`mktemp -t build-cinder-XXXXXX`
+NUM_LINES=`cat ${SOURCE} | wc -l`
+NUM_LINES_MINUS_ONE=$(( ${NUM_LINES} - 1 ))
+tail -n ${NUM_LINES_MINUS_ONE} ${SOURCE} > ${TMP_FILE}
+echo "[DEFAULT]" >${DESTIN}
+
+echo "enabled_backends = lvm" >>${DESTIN}
+
+cat ${TMP_FILE} >>${DESTIN}
+echo "[lvm]
+volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
+volume_group = pkgosvg0
+iscsi_protocol = iscsi
+iscsi_helper = tgtadm  
+" >>${DESTIN}
index 433596cff87d4ec7767d91126906d886739ac3df..5126faffd397cb424946918529e093d32f3809a8 100755 (executable)
@@ -53,7 +53,11 @@ override_dh_install:
 #              --namespace oslo.utils \
 #              --namespace oslo.versionedobjects \
 #              --namespace oslo.vmware
-       cp etc/cinder/cinder.conf.sample $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
+       # The generator is currently missing enabled_backend and the [lvm]
+       # section. This script fixes it until upstream gets smarter.
+       chmod +x debian/gen-fixed-config
+       ./debian/gen-fixed-config
+       #cp etc/cinder/cinder.conf.sample $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf
 
        # Disable https in default setup, as this makes our CI fail
        sed -i 's/^[ \t#]*auth_protocol[ \t]*=[ \t].*/auth_protocol = http/' $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf