summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Barron <tpb@dyncloud.net>2018-12-07 12:10:15 -0500
committerTom Barron <tpb@dyncloud.net>2018-12-19 15:00:51 -0500
commit6299ed5ed001ae2768ed2b954730b526b4053b2c (patch)
tree8ded341340b9039b3bbb4180b2a9178347c3b51a
parenta724e3c27644715779b2ea1b8969894c4a94b8f3 (diff)
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
Notes
Notes (review): Code-Review+2: Goutham Pacha Ravi <gouthampravi@gmail.com> Code-Review+2: Ben Swartzlander <ben@swartzlander.org> Workflow+1: Ben Swartzlander <ben@swartzlander.org> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 20 Dec 2018 04:20:05 +0000 Reviewed-on: https://review.openstack.org/623551 Project: openstack/manila Branch: refs/heads/master
-rwxr-xr-xcontrib/ci/pre_test_hook.sh4
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml26
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml19
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml26
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml19
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml19
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml19
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml19
-rw-r--r--playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml19
9 files changed, 26 insertions, 144 deletions
diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh
index 1ae53e1..55dd3d0 100755
--- a/contrib/ci/pre_test_hook.sh
+++ b/contrib/ci/pre_test_hook.sh
@@ -168,6 +168,10 @@ elif [[ "$DRIVER" == "container"* ]]; then
168fi 168fi
169 169
170echo "MANILA_SERVICE_IMAGE_ENABLED=$MANILA_SERVICE_IMAGE_ENABLED" >> $localconf 170echo "MANILA_SERVICE_IMAGE_ENABLED=$MANILA_SERVICE_IMAGE_ENABLED" >> $localconf
171if [[ "$MANILA_SERVICE_IMAGE_ENABLED" == True ]]; then
172 echo "MANILA_SERVICE_IMAGE_URL=$MANILA_SERVICE_IMAGE_URL" >> $localconf
173 echo "MANILA_SERVICE_IMAGE_NAME=$MANILA_SERVICE_IMAGE_NAME" >> $localconf
174fi
171echo "MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS=$DEFAULT_EXTRA_SPECS" >> $localconf 175echo "MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS=$DEFAULT_EXTRA_SPECS" >> $localconf
172echo "MANILA_CONFIGURE_DEFAULT_TYPES=${MANILA_CONFIGURE_DEFAULT_TYPES:-True}" >> $localconf 176echo "MANILA_CONFIGURE_DEFAULT_TYPES=${MANILA_CONFIGURE_DEFAULT_TYPES:-True}" >> $localconf
173 177
diff --git a/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml b/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml
index 08c931e..4af2ce3 100644
--- a/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-container-scenario-custom-image/run.yaml
@@ -47,9 +47,8 @@
47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
48 48
49 # Install manila-image-elements project for building custom image 49 # Install manila-image-elements project for building custom image
50 if [[ container_with_custom_image == *"_with_custom_image" ]]; then 50 export PROJECTS="openstack/manila-image-elements $PROJECTS"
51 export PROJECTS="openstack/manila-image-elements $PROJECTS" 51
52 fi
53 export ENABLED_SERVICES=tempest 52 export ENABLED_SERVICES=tempest
54 53
55 # Keep localrc to be able to set some vars in pre_test_hook 54 # Keep localrc to be able to set some vars in pre_test_hook
@@ -57,20 +56,17 @@
57 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 56 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
58 57
59 function pre_test_hook { 58 function pre_test_hook {
60 # Build custom image if needed 59 current_dir=$(pwd)
61 if [[ container_with_custom_image == *"_with_custom_image" ]]; then
62 current_dir=$(pwd)
63 60
64 # Go to 'manila-image-elements' dir, build image and get its name 61 # Go to 'manila-image-elements' dir, build image and get its name
65 cd /opt/stack/new/manila-image-elements 62 cd /opt/stack/new/manila-image-elements
66 ./tools/gate/build-images container_with_custom_image True 63 ./tools/gate/build-images container_with_custom_image
67 image_name=$(git ls-files --others --exclude-standard) 64 image_name=$(cat ./IMAGE_NAME)
68 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" 65 export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name"
69 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) 66 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
70 67
71 # Return back to execution dir 68 # Return back to execution dir
72 cd $current_dir 69 cd $current_dir
73 fi
74 70
75 # 'dhss' - acronym for 'Driver Handles Share Servers', 71 # 'dhss' - acronym for 'Driver Handles Share Servers',
76 # defines mode of a share driver. Boolean-like. 72 # defines mode of a share driver. Boolean-like.
diff --git a/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml b/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml
index b2be8cc..074def0 100644
--- a/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml
@@ -46,10 +46,6 @@
46 export DEVSTACK_GATE_POSTGRES=0 46 export DEVSTACK_GATE_POSTGRES=0
47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
48 48
49 # Install manila-image-elements project for building custom image
50 if [[ generic == *"_with_custom_image" ]]; then
51 export PROJECTS="openstack/manila-image-elements $PROJECTS"
52 fi
53 export ENABLED_SERVICES=tempest 49 export ENABLED_SERVICES=tempest
54 50
55 # Keep localrc to be able to set some vars in pre_test_hook 51 # Keep localrc to be able to set some vars in pre_test_hook
@@ -57,21 +53,6 @@
57 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 53 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
58 54
59 function pre_test_hook { 55 function pre_test_hook {
60 # Build custom image if needed
61 if [[ generic == *"_with_custom_image" ]]; then
62 current_dir=$(pwd)
63
64 # Go to 'manila-image-elements' dir, build image and get its name
65 cd /opt/stack/new/manila-image-elements
66 ./tools/gate/build-images generic True
67 image_name=$(git ls-files --others --exclude-standard)
68 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
69 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
70
71 # Return back to execution dir
72 cd $current_dir
73 fi
74
75 # 'dhss' - acronym for 'Driver Handles Share Servers', 56 # 'dhss' - acronym for 'Driver Handles Share Servers',
76 # defines mode of a share driver. Boolean-like. 57 # defines mode of a share driver. Boolean-like.
77 # 'driver' - codename of a share driver to configure. 58 # 'driver' - codename of a share driver to configure.
diff --git a/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml b/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml
index 0f287d2..4214252 100644
--- a/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-generic-scenario-custom-image/run.yaml
@@ -47,9 +47,8 @@
47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
48 48
49 # Install manila-image-elements project for building custom image 49 # Install manila-image-elements project for building custom image
50 if [[ generic_with_custom_image == *"_with_custom_image" ]]; then 50 export PROJECTS="openstack/manila-image-elements $PROJECTS"
51 export PROJECTS="openstack/manila-image-elements $PROJECTS" 51
52 fi
53 export ENABLED_SERVICES=tempest 52 export ENABLED_SERVICES=tempest
54 53
55 # Keep localrc to be able to set some vars in pre_test_hook 54 # Keep localrc to be able to set some vars in pre_test_hook
@@ -57,20 +56,17 @@
57 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 56 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
58 57
59 function pre_test_hook { 58 function pre_test_hook {
60 # Build custom image if needed 59 current_dir=$(pwd)
61 if [[ generic_with_custom_image == *"_with_custom_image" ]]; then
62 current_dir=$(pwd)
63 60
64 # Go to 'manila-image-elements' dir, build image and get its name 61 # Go to 'manila-image-elements' dir, build image and get its name
65 cd /opt/stack/new/manila-image-elements 62 cd /opt/stack/new/manila-image-elements
66 ./tools/gate/build-images generic_with_custom_image True 63 ./tools/gate/build-images generic_with_custom_image
67 image_name=$(git ls-files --others --exclude-standard) 64 image_name=$(cat ./IMAGE_NAME)
68 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name" 65 export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name"
69 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name)) 66 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
70 67
71 # Return back to execution dir 68 # Return back to execution dir
72 cd $current_dir 69 cd $current_dir
73 fi
74 70
75 # 'dhss' - acronym for 'Driver Handles Share Servers', 71 # 'dhss' - acronym for 'Driver Handles Share Servers',
76 # defines mode of a share driver. Boolean-like. 72 # defines mode of a share driver. Boolean-like.
diff --git a/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml b/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml
index 87b2f84..092d8ce 100644
--- a/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml
@@ -45,10 +45,6 @@
45 export DEVSTACK_GATE_POSTGRES=0 45 export DEVSTACK_GATE_POSTGRES=0
46 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 46 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
47 47
48 # Install manila-image-elements project for building custom image
49 if [[ generic == *"_with_custom_image" ]]; then
50 export PROJECTS="openstack/manila-image-elements $PROJECTS"
51 fi
52 export ENABLED_SERVICES=tempest 48 export ENABLED_SERVICES=tempest
53 49
54 # Keep localrc to be able to set some vars in pre_test_hook 50 # Keep localrc to be able to set some vars in pre_test_hook
@@ -56,21 +52,6 @@
56 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 52 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
57 53
58 function pre_test_hook { 54 function pre_test_hook {
59 # Build custom image if needed
60 if [[ generic == *"_with_custom_image" ]]; then
61 current_dir=$(pwd)
62
63 # Go to 'manila-image-elements' dir, build image and get its name
64 cd /opt/stack/new/manila-image-elements
65 ./tools/gate/build-images generic True
66 image_name=$(git ls-files --others --exclude-standard)
67 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
68 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
69
70 # Return back to execution dir
71 cd $current_dir
72 fi
73
74 # 'dhss' - acronym for 'Driver Handles Share Servers', 55 # 'dhss' - acronym for 'Driver Handles Share Servers',
75 # defines mode of a share driver. Boolean-like. 56 # defines mode of a share driver. Boolean-like.
76 # 'driver' - codename of a share driver to configure. 57 # 'driver' - codename of a share driver to configure.
diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml
index c503bff..7960cdd 100644
--- a/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml
@@ -46,10 +46,6 @@
46 export DEVSTACK_GATE_POSTGRES=1 46 export DEVSTACK_GATE_POSTGRES=1
47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
48 48
49 # Install manila-image-elements project for building custom image
50 if [[ container == *"_with_custom_image" ]]; then
51 export PROJECTS="openstack/manila-image-elements $PROJECTS"
52 fi
53 export ENABLED_SERVICES=tempest 49 export ENABLED_SERVICES=tempest
54 50
55 # Keep localrc to be able to set some vars in pre_test_hook 51 # Keep localrc to be able to set some vars in pre_test_hook
@@ -57,21 +53,6 @@
57 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 53 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
58 54
59 function pre_test_hook { 55 function pre_test_hook {
60 # Build custom image if needed
61 if [[ container == *"_with_custom_image" ]]; then
62 current_dir=$(pwd)
63
64 # Go to 'manila-image-elements' dir, build image and get its name
65 cd /opt/stack/new/manila-image-elements
66 ./tools/gate/build-images container True
67 image_name=$(git ls-files --others --exclude-standard)
68 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
69 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
70
71 # Return back to execution dir
72 cd $current_dir
73 fi
74
75 # 'dhss' - acronym for 'Driver Handles Share Servers', 56 # 'dhss' - acronym for 'Driver Handles Share Servers',
76 # defines mode of a share driver. Boolean-like. 57 # defines mode of a share driver. Boolean-like.
77 # 'driver' - codename of a share driver to configure. 58 # 'driver' - codename of a share driver to configure.
diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml
index 5922c1e..0fed596 100644
--- a/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml
@@ -46,10 +46,6 @@
46 export DEVSTACK_GATE_POSTGRES=1 46 export DEVSTACK_GATE_POSTGRES=1
47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
48 48
49 # Install manila-image-elements project for building custom image
50 if [[ generic == *"_with_custom_image" ]]; then
51 export PROJECTS="openstack/manila-image-elements $PROJECTS"
52 fi
53 export ENABLED_SERVICES=tempest 49 export ENABLED_SERVICES=tempest
54 50
55 # Keep localrc to be able to set some vars in pre_test_hook 51 # Keep localrc to be able to set some vars in pre_test_hook
@@ -57,21 +53,6 @@
57 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 53 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
58 54
59 function pre_test_hook { 55 function pre_test_hook {
60 # Build custom image if needed
61 if [[ generic == *"_with_custom_image" ]]; then
62 current_dir=$(pwd)
63
64 # Go to 'manila-image-elements' dir, build image and get its name
65 cd /opt/stack/new/manila-image-elements
66 ./tools/gate/build-images generic True
67 image_name=$(git ls-files --others --exclude-standard)
68 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
69 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
70
71 # Return back to execution dir
72 cd $current_dir
73 fi
74
75 # 'dhss' - acronym for 'Driver Handles Share Servers', 56 # 'dhss' - acronym for 'Driver Handles Share Servers',
76 # defines mode of a share driver. Boolean-like. 57 # defines mode of a share driver. Boolean-like.
77 # 'driver' - codename of a share driver to configure. 58 # 'driver' - codename of a share driver to configure.
diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml
index ffd078d..8153557 100644
--- a/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml
@@ -46,10 +46,6 @@
46 export DEVSTACK_GATE_POSTGRES=1 46 export DEVSTACK_GATE_POSTGRES=1
47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 47 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
48 48
49 # Install manila-image-elements project for building custom image
50 if [[ zfsonlinux == *"_with_custom_image" ]]; then
51 export PROJECTS="openstack/manila-image-elements $PROJECTS"
52 fi
53 export ENABLED_SERVICES=tempest 49 export ENABLED_SERVICES=tempest
54 50
55 # Keep localrc to be able to set some vars in pre_test_hook 51 # Keep localrc to be able to set some vars in pre_test_hook
@@ -57,21 +53,6 @@
57 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 53 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
58 54
59 function pre_test_hook { 55 function pre_test_hook {
60 # Build custom image if needed
61 if [[ zfsonlinux == *"_with_custom_image" ]]; then
62 current_dir=$(pwd)
63
64 # Go to 'manila-image-elements' dir, build image and get its name
65 cd /opt/stack/new/manila-image-elements
66 ./tools/gate/build-images zfsonlinux True
67 image_name=$(git ls-files --others --exclude-standard)
68 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
69 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
70
71 # Return back to execution dir
72 cd $current_dir
73 fi
74
75 # 'dhss' - acronym for 'Driver Handles Share Servers', 56 # 'dhss' - acronym for 'Driver Handles Share Servers',
76 # defines mode of a share driver. Boolean-like. 57 # defines mode of a share driver. Boolean-like.
77 # 'driver' - codename of a share driver to configure. 58 # 'driver' - codename of a share driver to configure.
diff --git a/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml b/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml
index eb687c6..73e6310 100644
--- a/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml
+++ b/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml
@@ -45,10 +45,6 @@
45 export DEVSTACK_GATE_POSTGRES=0 45 export DEVSTACK_GATE_POSTGRES=0
46 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" 46 export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
47 47
48 # Install manila-image-elements project for building custom image
49 if [[ generic == *"_with_custom_image" ]]; then
50 export PROJECTS="openstack/manila-image-elements $PROJECTS"
51 fi
52 export ENABLED_SERVICES=tempest 48 export ENABLED_SERVICES=tempest
53 49
54 # Keep localrc to be able to set some vars in pre_test_hook 50 # Keep localrc to be able to set some vars in pre_test_hook
@@ -56,21 +52,6 @@
56 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" 52 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
57 53
58 function pre_test_hook { 54 function pre_test_hook {
59 # Build custom image if needed
60 if [[ generic == *"_with_custom_image" ]]; then
61 current_dir=$(pwd)
62
63 # Go to 'manila-image-elements' dir, build image and get its name
64 cd /opt/stack/new/manila-image-elements
65 ./tools/gate/build-images generic True
66 image_name=$(git ls-files --others --exclude-standard)
67 export MANILA_SERVICE_IMAGE_URL="http://localhost:80/public_html/$image_name"
68 export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
69
70 # Return back to execution dir
71 cd $current_dir
72 fi
73
74 # 'dhss' - acronym for 'Driver Handles Share Servers', 55 # 'dhss' - acronym for 'Driver Handles Share Servers',
75 # defines mode of a share driver. Boolean-like. 56 # defines mode of a share driver. Boolean-like.
76 # 'driver' - codename of a share driver to configure. 57 # 'driver' - codename of a share driver to configure.