diff options
author | Zuul <zuul@review.opendev.org> | 2021-03-15 14:05:32 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2021-03-15 14:05:32 +0000 |
commit | c7babfd3c2047cfebe3b064554233fc971b05b1f (patch) | |
tree | 00bf6ccd905a40495b0e1ab1083ef05bc9fa6a49 | |
parent | 439d42f90200b8e88dd33e2db47e6c1605f0ce52 (diff) | |
parent | c5fdc088493622a3a8ebfb38c6311bb4ef836477 (diff) | |
download | heat-c7babfd3c2047cfebe3b064554233fc971b05b1f.tar.gz |
Merge "Allow turning off max_stacks limit"
-rw-r--r-- | heat/common/config.py | 6 | ||||
-rw-r--r-- | heat/engine/service.py | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/heat/common/config.py b/heat/common/config.py index d0f46b721..1c03b6f1b 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -154,9 +154,9 @@ engine_opts = [ help=_('Maximum resources allowed per top-level stack. ' '-1 stands for unlimited.')), cfg.IntOpt('max_stacks_per_tenant', - default=100, - help=_('Maximum number of stacks any one tenant may have' - ' active at one time.')), + default=512, + help=_('Maximum number of stacks any one tenant may have ' + 'active at one time. -1 stands for unlimited.')), cfg.IntOpt('action_retry_limit', default=5, help=_('Number of times to retry to bring a ' diff --git a/heat/engine/service.py b/heat/engine/service.py index d16699f3e..00c7f2c61 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -682,7 +682,8 @@ class EngineService(service.ServiceBase): # Do not stack limit check for admin since admin can see all stacks. if not cnxt.is_admin: tenant_limit = cfg.CONF.max_stacks_per_tenant - if stack_object.Stack.count_all(cnxt) >= tenant_limit: + if (tenant_limit >= 0 and + stack_object.Stack.count_all(cnxt) >= tenant_limit): message = _("You have reached the maximum stacks per tenant, " "%d. Please delete some stacks.") % tenant_limit raise exception.RequestLimitExceeded(message=message) |