From d9a9892c87f3c246b4f851b3a696129bf82feab4 Mon Sep 17 00:00:00 2001 From: Sridhar Ramaswamy Date: Thu, 21 Apr 2016 09:00:36 +0000 Subject: [PATCH] Disable nova quota for dsvm functional test Parallel execution of tacker functional test ends up creating lots of VMs and eventually fails hitting the default max instance of 10. This fix disables quota for tacker functional test suite. However gate VMs still has upper constraint on resources like 8GB max limit. To avoid tripping the actual gate VM resource limit reduce concurrency to a lower number (2). Change-Id: I3fe8c012b85554fa21b5b4b64378d68e3d979cc2 Closes-Bug: #1572420 --- tacker/tests/contrib/post_test_hook.sh | 8 ++++++++ tox.ini | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tacker/tests/contrib/post_test_hook.sh b/tacker/tests/contrib/post_test_hook.sh index 99411b36c..83a76c4cb 100755 --- a/tacker/tests/contrib/post_test_hook.sh +++ b/tacker/tests/contrib/post_test_hook.sh @@ -17,6 +17,7 @@ set -xe TACKER_DIR="$BASE/new/tacker" +DEVSTACK_DIR="$BASE/new/devstack" SCRIPTS_DIR="/usr/os-testr-env/bin/" venv=${1:-"dsvm-functional"} @@ -52,12 +53,19 @@ function generate_testr_results { fi } +function fixup_nova_quota { + echo "Disable nova compute instance & core quota" + source $DEVSTACK_DIR/openrc admin admin + nova quota-class-update --instances -1 --cores -1 default +} if [[ "$venv" == dsvm-functional* ]] then owner=stack sudo_env= log_dir="/tmp/${venv}-logs" + + fixup_nova_quota fi # Set owner permissions according to job's requirements. diff --git a/tox.ini b/tox.ini index 404794c07..9c71ca989 100644 --- a/tox.ini +++ b/tox.ini @@ -33,7 +33,7 @@ setenv = {[testenv]setenv} deps = {[testenv:functional]deps} commands = - {toxinidir}/tools/ostestr_compat_shim.sh {posargs} + {toxinidir}/tools/ostestr_compat_shim.sh --concurrency 2 {posargs} [tox:jenkins] sitepackages = True