Merge "Allow turning off max_stacks limit"
This commit is contained in:
commit
c7babfd3c2
|
@ -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 '
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue