From 69d472ab35273bc1ee6c2f6fd5086c0c9eb2dbb7 Mon Sep 17 00:00:00 2001 From: Vitaly Gridnev Date: Fri, 4 Sep 2015 12:28:42 +0300 Subject: [PATCH] Use custom flavor in gate Recent builds of gate were failed because of error during creating instances: 'Flavor's disk is too small for requested image.'. That is why we should use custom sahara flavor in gate. Closes-bug: 1493403 Change-Id: I0b074ada2375edc6c80c332cc71caa9bec1053fd --- tools/gate/scenario/commons | 5 +++++ tools/gate/scenario/post_test_hook.sh | 5 ++++- tools/gate/scenario/settings | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/gate/scenario/commons b/tools/gate/scenario/commons index a296c8b0..6420ff5d 100644 --- a/tools/gate/scenario/commons +++ b/tools/gate/scenario/commons @@ -41,3 +41,8 @@ function sahara_register_fake_plugin_image { openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image set \ $SAHARA_FAKE_PLUGIN_IMAGE_NAME $props } + +function sahara_register_flavor { + nova flavor-create $SAHARA_FLAVOR_NAME $SAHARA_FLAVOR_ID $SAHARA_FLAVOR_RAM \ + $SAHARA_FLAVOR_DISK $SAHARA_FLAVOR_VCPUS +} diff --git a/tools/gate/scenario/post_test_hook.sh b/tools/gate/scenario/post_test_hook.sh index 506c5c8a..90d15d7f 100755 --- a/tools/gate/scenario/post_test_hook.sh +++ b/tools/gate/scenario/post_test_hook.sh @@ -29,6 +29,9 @@ set -x # Make public and register in Sahara as admin sahara_register_fake_plugin_image +# Register sahara specific flavor for gate +sahara_register_flavor + # Use demo user for running scenario tests set +x source $DEVSTACK_DIR/openrc demo demo @@ -48,7 +51,7 @@ network_type: ${NETWORK} network_private_name: ${PRIVATE_NETWORK_NAME} network_public_name: ${PUBLIC_NETWORK_NAME} fake_plugin_image: ${SAHARA_FAKE_PLUGIN_IMAGE_NAME} -ci_flavor_id: '1' +ci_flavor_id: '${SAHARA_FLAVOR_ID}' cluster_name: fake-cluster EOF diff --git a/tools/gate/scenario/settings b/tools/gate/scenario/settings index ec829464..58f9944d 100644 --- a/tools/gate/scenario/settings +++ b/tools/gate/scenario/settings @@ -19,3 +19,8 @@ export SAHARA_FAKE_PLUGIN_IMAGE=http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2 export SAHARA_FAKE_PLUGIN_IMAGE_NAME=$(basename $SAHARA_FAKE_PLUGIN_IMAGE .qcow2) export SAHARA_FAKE_PLUGIN_IMAGE_USERNAME=fedora +export SAHARA_FLAVOR_NAME=sahara-flavor +export SAHARA_FLAVOR_ID=20 +export SAHARA_FLAVOR_RAM=512 +export SAHARA_FLAVOR_DISK=4 +export SAHARA_FLAVOR_VCPUS=1