Fix image_name retrieval in custom-image jobs

And use a 'file://' url for the custom manila image.

See also https://review.openstack.org/#/c/623330.  These
are interdependent patches but no harm is done by merging
this one first and having 623330 depend on it since retrieval
of the image name is not working correctly anyways.

Partial-Bug: #1807969

Change-Id: Ib3a74d170f159dfbc38b5302f00800f3530f4921
This commit is contained in:
Tom Barron 2018-12-07 12:10:15 -05:00
parent a724e3c276
commit 6299ed5ed0
9 changed files with 26 additions and 144 deletions

View File

@ -168,6 +168,10 @@ elif [[ "$DRIVER" == "container"* ]]; then
fi
echo "MANILA_SERVICE_IMAGE_ENABLED=$MANILA_SERVICE_IMAGE_ENABLED" >> $localconf
if [[ "$MANILA_SERVICE_IMAGE_ENABLED" == True ]]; then
echo "MANILA_SERVICE_IMAGE_URL=$MANILA_SERVICE_IMAGE_URL" >> $localconf
echo "MANILA_SERVICE_IMAGE_NAME=$MANILA_SERVICE_IMAGE_NAME" >> $localconf
fi
echo "MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS=$DEFAULT_EXTRA_SPECS" >> $localconf
echo "MANILA_CONFIGURE_DEFAULT_TYPES=${MANILA_CONFIGURE_DEFAULT_TYPES:-True}" >> $localconf

View File

@ -47,9 +47,8 @@
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ container_with_custom_image == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export PROJECTS="openstack/manila-image-elements $PROJECTS"
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -57,20 +56,17 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ container_with_custom_image == *"_with_custom_image" ]]; then
current_dir=$(pwd)
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images container_with_custom_image True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images container_with_custom_image
image_name=$(cat ./IMAGE_NAME)
export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# Return back to execution dir
cd $current_dir
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -46,10 +46,6 @@
export DEVSTACK_GATE_POSTGRES=0
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ generic == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -57,21 +53,6 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ generic == *"_with_custom_image" ]]; then
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images generic True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.
# 'driver' - codename of a share driver to configure.

View File

@ -47,9 +47,8 @@
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ generic_with_custom_image == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export PROJECTS="openstack/manila-image-elements $PROJECTS"
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -57,20 +56,17 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ generic_with_custom_image == *"_with_custom_image" ]]; then
current_dir=$(pwd)
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images generic_with_custom_image True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images generic_with_custom_image
image_name=$(cat ./IMAGE_NAME)
export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# Return back to execution dir
cd $current_dir
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -45,10 +45,6 @@
export DEVSTACK_GATE_POSTGRES=0
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ generic == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -56,21 +52,6 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ generic == *"_with_custom_image" ]]; then
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images generic True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.
# 'driver' - codename of a share driver to configure.

View File

@ -46,10 +46,6 @@
export DEVSTACK_GATE_POSTGRES=1
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ container == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -57,21 +53,6 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ container == *"_with_custom_image" ]]; then
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images container True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.
# 'driver' - codename of a share driver to configure.

View File

@ -46,10 +46,6 @@
export DEVSTACK_GATE_POSTGRES=1
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ generic == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -57,21 +53,6 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ generic == *"_with_custom_image" ]]; then
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images generic True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.
# 'driver' - codename of a share driver to configure.

View File

@ -46,10 +46,6 @@
export DEVSTACK_GATE_POSTGRES=1
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ zfsonlinux == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -57,21 +53,6 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ zfsonlinux == *"_with_custom_image" ]]; then
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images zfsonlinux True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.
# 'driver' - codename of a share driver to configure.

View File

@ -45,10 +45,6 @@
export DEVSTACK_GATE_POSTGRES=0
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
if [[ generic == *"_with_custom_image" ]]; then
export PROJECTS="openstack/manila-image-elements $PROJECTS"
fi
export ENABLED_SERVICES=tempest
# Keep localrc to be able to set some vars in pre_test_hook
@ -56,21 +52,6 @@
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# Build custom image if needed
if [[ generic == *"_with_custom_image" ]]; then
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images generic True
image_name=$(git ls-files --others --exclude-standard)
export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
fi
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.
# 'driver' - codename of a share driver to configure.