From a8be9e71a64c4d108a1685fe930aa1bda6a75f57 Mon Sep 17 00:00:00 2001 From: Tom Barron Date: Sat, 5 Jan 2019 13:49:04 -0500 Subject: [PATCH] Support manila with python3 Use python3 compatible tempest test discovery and install the relevant python3 libraries. Change-Id: Iabd1952ddaba85316dec5cf60c89122dc3825912 --- devstack/lib/ceph | 6 ++++++ manila/post_test_hook.sh | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/devstack/lib/ceph b/devstack/lib/ceph index 3909600..79e97c4 100644 --- a/devstack/lib/ceph +++ b/devstack/lib/ceph @@ -928,6 +928,9 @@ function setup_packages_for_manila_on_ubuntu { configure_repo_ceph "apt" "luminous" "ubuntu" "$os_CODENAME" configure_repo_nfsganesha "apt" "ceph_luminous" "ubuntu" "$os_CODENAME" fi + if python3_enabled; then + CEPH_PACKAGES="${CEPH_PACKAGES} python3-cephfs" + fi else # Native driver if ! [[ $os_CODENAME =~ (bionic|xenial|trusty) ]]; then die $LINENO "Need Ubuntu trusty or newer to setup Manila with CephFS native driver" @@ -942,6 +945,9 @@ function setup_packages_for_manila_on_ubuntu { else # bionic repos are already there in the distro CEPH_PACKAGES="${CEPH_PACKAGES} ceph-mds libcephfs2" fi + if python3_enabled; then + CEPH_PACKAGES="${CEPH_PACKAGES} python3-cephfs" + fi fi } diff --git a/manila/post_test_hook.sh b/manila/post_test_hook.sh index e80b80f..056d9d1 100644 --- a/manila/post_test_hook.sh +++ b/manila/post_test_hook.sh @@ -109,9 +109,6 @@ set +o errexit cd $BASE/new/tempest -# Check whether tempest plugin was installed correctly. -echo 'import pkg_resources; print list(pkg_resources.iter_entry_points("tempest.test_plugins"))' | python - # Workaround for Tempest architectural changes # See bugs: # 1) https://bugs.launchpad.net/manila/+bug/1531049 @@ -140,4 +137,5 @@ elif [[ $MANILA_TEST_TYPE == 'scenario' ]]; then fi export MANILA_TEMPEST_CONCURRENCY=${MANILA_TEMPEST_CONCURRENCY:-12} +sudo -H -u $USER tempest list-plugins sudo -H -u $USER tempest run -r $MANILA_TESTS --concurrency=$MANILA_TEMPEST_CONCURRENCY