One should have an ability to set up max_stacks_per_tenant option
Customer requires from us to set up max_stacks_per_tenant in
heat.conf.
This option is not enabled and has value of 100 by default.
We need to enable this option in templates so customer would be
able to set it to a desired value.
Customer-Found
PROD-15877
Change-Id: If324c8b65c6df36a614139ac75b2667d1c874284
diff --git a/README.rst b/README.rst
index a2f4dbe..fc9691a 100644
--- a/README.rst
+++ b/README.rst
@@ -66,6 +66,7 @@
password: password
virtual_host: '/openstack'
ha_queues: True
+ max_stacks_per_tenant: 150
Define server clients keystone parameter
diff --git a/heat/files/juno/heat.conf.Debian b/heat/files/juno/heat.conf.Debian
index 24d48ad..08cab0e 100644
--- a/heat/files/juno/heat.conf.Debian
+++ b/heat/files/juno/heat.conf.Debian
@@ -54,6 +54,9 @@
# Maximum number of stacks any one tenant may have active at
# one time. (integer value)
#max_stacks_per_tenant=100
+{%- if server.max_stacks_per_tenant is defined %}
+max_stacks_per_tenant = {{ server.max_stacks_per_tenant }}
+{%- endif %}
# Number of times to retry to bring a resource to a non-error
# state. Set to 0 to disable retries. (integer value)
diff --git a/heat/files/kilo/heat.conf.Debian b/heat/files/kilo/heat.conf.Debian
index a198e42..4e8147d 100644
--- a/heat/files/kilo/heat.conf.Debian
+++ b/heat/files/kilo/heat.conf.Debian
@@ -194,6 +194,9 @@
# The default exchange under which topics are scoped. May be overridden by an
# exchange name specified in the transport_url option. (string value)
#control_exchange = openstack
+{%- if server.max_stacks_per_tenant is defined %}
+max_stacks_per_tenant = {{ server.max_stacks_per_tenant }}
+{%- endif %}
[heat_api]
diff --git a/heat/files/liberty/heat.conf.Debian b/heat/files/liberty/heat.conf.Debian
index f764987..68f47d5 100644
--- a/heat/files/liberty/heat.conf.Debian
+++ b/heat/files/liberty/heat.conf.Debian
@@ -201,6 +201,9 @@
# The default exchange under which topics are scoped. May be overridden by an
# exchange name specified in the transport_url option. (string value)
#control_exchange = openstack
+{%- if server.max_stacks_per_tenant is defined %}
+max_stacks_per_tenant = {{ server.max_stacks_per_tenant }}
+{%- endif %}
[heat_api]
diff --git a/heat/files/mitaka/heat.conf.Debian b/heat/files/mitaka/heat.conf.Debian
index 88a7ffa..8ba4eb7 100644
--- a/heat/files/mitaka/heat.conf.Debian
+++ b/heat/files/mitaka/heat.conf.Debian
@@ -206,6 +206,9 @@
max_resources_per_stack=20000
max_json_body_size=10880000
max_template_size=5440000
+{%- if server.max_stacks_per_tenant is defined %}
+max_stacks_per_tenant = {{ server.max_stacks_per_tenant }}
+{%- endif %}
[heat_api]
diff --git a/heat/files/mitaka/heat.conf.RedHat b/heat/files/mitaka/heat.conf.RedHat
index 59ecd5c..768eb72 100644
--- a/heat/files/mitaka/heat.conf.RedHat
+++ b/heat/files/mitaka/heat.conf.RedHat
@@ -194,6 +194,9 @@
# The default exchange under which topics are scoped. May be overridden by an
# exchange name specified in the transport_url option. (string value)
#control_exchange = openstack
+{%- if server.max_stacks_per_tenant is defined %}
+max_stacks_per_tenant = {{ server.max_stacks_per_tenant }}
+{%- endif %}
[heat_api]
@@ -735,4 +738,4 @@
api_server={{ client.api.host }}
api_port={{ client.api.port }}
-{%- endif %}
\ No newline at end of file
+{%- endif %}
diff --git a/heat/files/newton/heat.conf.Debian b/heat/files/newton/heat.conf.Debian
index bc05929..1f97cd8 100644
--- a/heat/files/newton/heat.conf.Debian
+++ b/heat/files/newton/heat.conf.Debian
@@ -216,6 +216,9 @@
max_resources_per_stack=20000
max_json_body_size=10880000
max_template_size=5440000
+{%- if server.max_stacks_per_tenant is defined %}
+max_stacks_per_tenant = {{ server.max_stacks_per_tenant }}
+{%- endif %}
[heat_api]
diff --git a/heat/files/ocata/heat.conf.Debian b/heat/files/ocata/heat.conf.Debian
index 9e7f4e4..048fc3f 100644
--- a/heat/files/ocata/heat.conf.Debian
+++ b/heat/files/ocata/heat.conf.Debian
@@ -57,6 +57,9 @@
# Maximum number of stacks any one tenant may have active at one time. (integer
# value)
#max_stacks_per_tenant = 100
+{%- if server.max_stacks_per_tenant is defined %}
+max_stacks_per_tenant = {{ server.max_stacks_per_tenant }}
+{%- endif %}
# Number of times to retry to bring a resource to a non-error state. Set to 0
# to disable retries. (integer value)
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
index 8a7e6df..0c5f303 100644
--- a/tests/pillar/server_cluster.sls
+++ b/tests/pillar/server_cluster.sls
@@ -58,3 +58,4 @@
deny_stack_user: 'not role:heat_stack_user'
'cloudformation:ValidateTemplate': 'rule:deny_stack_user'
'cloudformation:DescribeStackResource':
+ max_stacks_per_tenant: 150