From f44aa0c55a81e24a8ad321c0c741939e86705e09 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Wed, 4 Aug 2021 18:27:48 -0400 Subject: [PATCH] Allow cinder default quotas configuration The default cinder quotas for volumes, backups, or snapshots may be too low for highly concurrent testing, so make these configurable in devstack. Change-Id: Ie3cf3239b48f9905f5760ad0166eea954ecf5eed --- doc/source/configuration.rst | 6 ++++++ lib/cinder | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 67456142de..8244525075 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -642,6 +642,12 @@ with ``VOLUME_BACKING_FILE_SIZE``. VOLUME_NAME_PREFIX="volume-" VOLUME_BACKING_FILE_SIZE=24G +When running highly concurrent tests, the default per-project quotas +for volumes, backups, or snapshots may be too small. These can be +adjusted by setting ``CINDER_QUOTA_VOLUMES``, ``CINDER_QUOTA_BACKUPS``, +or ``CINDER_QUOTA_SNAPSHOTS`` to the desired value. (The default for +each is 10.) + Keystone ~~~~~~~~ diff --git a/lib/cinder b/lib/cinder index 7f2f29f892..9235428335 100644 --- a/lib/cinder +++ b/lib/cinder @@ -267,6 +267,11 @@ function configure_cinder { iniset $CINDER_CONF key_manager backend cinder.keymgr.conf_key_mgr.ConfKeyManager iniset $CINDER_CONF key_manager fixed_key $(openssl rand -hex 16) + # set default quotas + iniset $CINDER_CONF DEFAULT quota_volumes ${CINDER_QUOTA_VOLUMES:-10} + iniset $CINDER_CONF DEFAULT quota_backups ${CINDER_QUOTA_BACKUPS:-10} + iniset $CINDER_CONF DEFAULT quota_snapshots ${CINDER_QUOTA_SNAPSHOTS:-10} + # Avoid RPC timeouts in slow CI and test environments by doubling the # default response timeout set by RPC clients. See bug #1873234 for more # details and example failures.