Fix grenade test related to encrypt volume/image

DevStack Ocata version and master use different default images
(Ocata:uec and master:qcow2), this will lead to tempest encrypt test
failure in grenade gate.

This patch hard-code default images in base version and will be
removed if devstack master and ocata patches are proposed.

Change-Id: I997c759fc026366fe48de9ac7e8c58941622c9cd
Co-Authored-By: Nam Nguyen Hoai <namnh@vn.fujitsu.com>
This commit is contained in:
Hieu LE 2017-06-07 10:24:27 +07:00 committed by Nam Nguyen Hoai
parent 5f411632e3
commit f6489d8355
2 changed files with 31 additions and 0 deletions

View File

@ -1,6 +1,28 @@
register_project_for_upgrade barbican
register_db_to_save barbican
# NOTE(hieulq): devstack ocata and master use different default image (ocata-uec, master-qcow2), thus the grenade test will fail
# We should config the same image for base and target devstack, and remove this config when devstack fixes are proposed
DOWNLOAD_DEFAULT_IMAGES=False
CIRROS_VERSION=$(set +o xtrace &&
source $BASE_DEVSTACK_DIR/stackrc &&
echo $CIRROS_VERSION)
CIRROS_ARCH=$(set +o xtrace &&
source $BASE_DEVSTACK_DIR/stackrc &&
echo $CIRROS_ARCH)
DEFAULT_IMAGE_FILE_NAME=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img
devstack_localrc base DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_FILE_NAME}
devstack_localrc base IMAGE_URLS="http://download.cirros-cloud.net/${CIRROS_VERSION}/${DEFAULT_IMAGE_FILE_NAME}"
devstack_localrc base DOWNLOAD_DEFAULT_IMAGES=False
devstack_localrc base SCENARIO_IMAGE_DIR="$BASE_DEVSTACK_DIR/files"
devstack_localrc base DEFAULT_IMAGE_NAME=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk
devstack_localrc target DEFAULT_IMAGE_NAME=cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk
devstack_localrc base """
[[test-config|\$TEMPEST_CONFIG]]
[image-feature-enabled]
api_v1=False"""
devstack_localrc base enable_plugin barbican https://git.openstack.org/openstack/barbican
devstack_localrc target enable_plugin barbican https://git.openstack.org/openstack/barbican

View File

@ -21,9 +21,18 @@ source $BASE_DEVSTACK_DIR/functions
source $BASE_DEVSTACK_DIR/stackrc # needed for status directory
source $BASE_DEVSTACK_DIR/lib/tls
source $BASE_DEVSTACK_DIR/lib/apache
source $BASE_DEVSTACK_DIR/lib/nova
BARBICAN_DEVSTACK_DIR=$(dirname "$0")/..
source $BARBICAN_DEVSTACK_DIR/lib/barbican
set -o xtrace
stop_barbican
# After shutdown barbican service, it needs to add an1 option to nova.conf
# The option will useful for running barbican tempest test
echo "Update nova.conf file with this option"
echo "enable image signature verification in Nova in target version only"
echo "[glance]"
echo "verify_glance_signatures = True"
iniset $NOVA_CONF glance verify_glance_signatures "True"