From 1cd28b484fa2ef6c756bacdd001027587507f0d1 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 2 Sep 2021 02:26:33 +0200 Subject: [PATCH] test/openstack: Adjust environment for stack.sh Signed-off-by: Michal Berger Change-Id: If6c972893471fbb504bf2ccac540899ea66a699d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9368 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Karol Latecki --- test/openstack/install_devstack.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/openstack/install_devstack.sh b/test/openstack/install_devstack.sh index 7ad9d76f4..f19791cb4 100755 --- a/test/openstack/install_devstack.sh +++ b/test/openstack/install_devstack.sh @@ -58,10 +58,15 @@ python3 ./setup.py install cp $rootdir/scripts/vagrant/local.conf /opt/stack/devstack/local.conf +# unset PYTHONPATH set by autotest_common.sh - keystone calls to stevedore's caching api and hits sys.path. In +# our case the list includes $rootdir/scripts which stack user can't access due to lack of permissions. +# Setting FORCE=yes allows stack.sh to run under distro versions which are not included in SUPPORTED_DISTROS. +# This allows us to be more relaxed and run under a bit newer|older versions of the same distro (e.g. ubuntu) +# in our CI. cd /opt/stack/devstack ./tools/create-stack-user.sh chown -R stack:stack /opt/stack -su -c "./stack.sh" -s /bin/bash stack +su -c "PYTHONPATH= FORCE=yes ./stack.sh" -s /bin/bash stack source openrc admin admin openstack volume type create SPDK --public