Manage oslo_middleware/max_request_body_size

So that we can increase it from the default 114688

Useful in case for example the OS-Federation mapping is too large.

If this limit is breached heat will return a 413 Entity Too Large
and not log anything to heat.log.

Change-Id: I90f15091088db67e6d33ef6272e59de69c4fe601
Closes-Bug: #1835161
This commit is contained in:
ZhongShengping 2019-07-04 11:34:43 +08:00
parent 169e0ad3ce
commit 1d6872a856
3 changed files with 12 additions and 0 deletions

View File

@ -239,6 +239,10 @@
# HTTPProxyToWSGI middleware.
# Defaults to $::os_service_default.
#
# [*max_request_body_size*]
# (Optional) Set max request body size
# Defaults to $::os_service_default.
#
# [*heat_clients_url*]
# (optional) Heat url in format like http://0.0.0.0:8004/v1/%(tenant_id)s.
# Defaults to $::os_service_default.
@ -326,6 +330,7 @@ class heat(
$notification_driver = $::os_service_default,
$notification_topics = $::os_service_default,
$enable_proxy_headers_parsing = $::os_service_default,
$max_request_body_size = $::os_service_default,
$heat_clients_url = $::os_service_default,
$heat_clients_endpoint_type = $::os_service_default,
$purge_config = false,
@ -445,6 +450,7 @@ class heat(
oslo::middleware { 'heat_config':
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
max_request_body_size => $max_request_body_size,
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
Add support to configure `[oslo_middleware]/max_request_body_size` with
`$max_request_body_size`.

View File

@ -143,6 +143,7 @@ describe 'heat' do
it 'sets default value for http_proxy_to_wsgi middleware' do
is_expected.to contain_oslo__middleware('heat_config').with(
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
:max_request_body_size => '<SERVICE DEFAULT>',
)
end