From b4bba2f2c817dd5c7594e8c7950021969704db5d Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 4 Feb 2021 23:24:17 +0000 Subject: [PATCH] Increase volumes quota for service project If we are backing glance with cinder, we will use more volumes and if timing is right, we will clash with other tests and be unable to create what we need. If we are backing glance with cinder, we should increase the volumes quota, which this patch does (to 50 from a default of 10). Closes-Bug: #1914665 Change-Id: I2ad1c4d21f996ee1a9ce29ba4f1a4b8f5720f8fb --- lib/cinder | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cinder b/lib/cinder index 6c97e114a6..33deff61f2 100644 --- a/lib/cinder +++ b/lib/cinder @@ -539,6 +539,14 @@ function create_volume_types { OS_USER_ID=$OS_USERNAME OS_PROJECT_ID=$OS_PROJECT_NAME cinder --os-auth-type noauth --os-endpoint=$cinder_url type-key ${be_name} set volume_backend_name=${be_name} fi done + + # Increase quota for the service project if glance is using cinder, + # since it's likely to occasionally go above the default 10 in parallel + # test execution. + if [[ "$USE_CINDER_FOR_GLANCE" == "True" ]]; then + openstack --os-region-name="$REGION_NAME" \ + quota set --volumes 50 "$SERVICE_PROJECT_NAME" + fi fi }