From 148c4dbfcbb5f53adafe4b0e1bd3de0b98d3a641 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Fri, 23 May 2014 22:10:37 -0400 Subject: cinder controller test config Change cinder config to remove nfsdriver. For example testcase tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTest.test_snapshot_create_get_list_update_delete fail because nfs volume doesn't support snapshot functions. If "cinder create" without providing volume type, cinder-scheduler will based on filter to pick out the most appropriate backend storage (which is the storage with most free space) and in our case nfs backend is chosen, and therefore this test will fail. Also to have startup script to make sure that the cinder volume types are added into Cinder Signed-off-by: Vu Tran --- .../python/python-cinder/cinder-test-config.init | 34 ++++++++++++++++++++++ .../python/python-cinder_git.bbappend | 21 +++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init create mode 100644 meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend (limited to 'meta-openstack-controller-test-config') diff --git a/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init new file mode 100644 index 0000000..1c6936f --- /dev/null +++ b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init @@ -0,0 +1,34 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $network $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Cinder Test Config +# Description: OpenStack Cinder Test Config +### END INIT INFO + + +start() +{ + sleep 2 + source /etc/nova/openrc + /etc/cinder/add-cinder-volume-types.sh > /dev/null 2>&1 +} + +case "$1" in + start) + start + ;; + stop|force-reload|restart|reload|status) + echo "WARNING: command $1 is not supported" + ;; + *) + echo "Usage: $0 {start|stop|force-reload|restart|reload|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend new file mode 100644 index 0000000..5003336 --- /dev/null +++ b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " file://cinder-test-config.init" + +do_install_prepend() { + # Remove nfs cinder-volume backend driver + sed -e "s/nfsdriver,//" -i ${WORKDIR}/cinder.conf +} + +do_install_append() { + install -m 0755 ${WORKDIR}/cinder-test-config.init ${D}${sysconfdir}/init.d/cinder-test-config +} + +PACKAGES += " ${SRCNAME}-test-config" +FILES_${SRCNAME}-test-config = "${sysconfdir}/init.d/cinder-test-config" + +RDEPENDS_${SRCNAME}-tests += " ${SRCNAME}-test-config" + +INITSCRIPT_PACKAGES += " ${SRCNAME}-test-config" +INITSCRIPT_NAME_${SRCNAME}-test-config = "cinder-test-config" +INITSCRIPT_PARAMS_${SRCNAME}-test-config = "defaults 95 10" -- cgit v1.2.3-54-g00ecf