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 mistral will return a 413 Entity Too Large and not log anything to mistral.log. Change-Id: I3a658d4426689ba09188b0889082b63a744065fc Closes-Bug: #1835161
This commit is contained in:
parent
030a4fe27e
commit
8a28a993c9
|
@ -50,6 +50,10 @@
|
|||
# HTTPProxyToWSGI middleware.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*max_request_body_size*]
|
||||
# (Optional) Set max request body size
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*auth_strategy*]
|
||||
# (optional) Type of authentication to be used.
|
||||
# Defaults to 'keystone'
|
||||
|
@ -64,6 +68,7 @@ class mistral::api (
|
|||
$package_ensure = present,
|
||||
$service_name = $::mistral::params::api_service_name,
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
$max_request_body_size = $::os_service_default,
|
||||
$auth_strategy = 'keystone',
|
||||
) inherits mistral::params {
|
||||
|
||||
|
@ -124,6 +129,7 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||
|
||||
oslo::middleware { 'mistral_config':
|
||||
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
|
||||
max_request_body_size => $max_request_body_size,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add support to configure `[oslo_middleware]/max_request_body_size` with
|
||||
`$max_request_body_size`.
|
|
@ -9,6 +9,7 @@ describe 'mistral::api' do
|
|||
:bind_host => '127.0.0.1',
|
||||
:bind_port => '1234',
|
||||
:enable_proxy_headers_parsing => false,
|
||||
:max_request_body_size => '102400',
|
||||
:allow_action_execution_deletion => false
|
||||
}
|
||||
end
|
||||
|
@ -30,6 +31,7 @@ describe 'mistral::api' do
|
|||
it { is_expected.to contain_mistral_config('api/port').with_value( params[:bind_port] ) }
|
||||
it { is_expected.to contain_oslo__middleware('mistral_config').with(
|
||||
:enable_proxy_headers_parsing => params[:enable_proxy_headers_parsing],
|
||||
:max_request_body_size => params[:max_request_body_size],
|
||||
)}
|
||||
it { is_expected.to contain_mistral_config('api/allow_action_execution_deletion').with_value( params[:allow_action_execution_deletion] ) }
|
||||
|
||||
|
@ -65,6 +67,16 @@ describe 'mistral::api' do
|
|||
)}
|
||||
end
|
||||
|
||||
context 'with max_request_body_size' do
|
||||
before do
|
||||
params.merge!({:max_request_body_size => '102400' })
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__middleware('mistral_config').with(
|
||||
:max_request_body_size => params[:max_request_body_size],
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with disabled service managing' do
|
||||
before do
|
||||
params.merge!({
|
||||
|
|
Loading…
Reference in New Issue