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 neutron will return a 413 Entity Too Large and not log anything to neutron.log. Change-Id: I0834578df444671bbf86b4d08e6b719ece16c661 Closes-Bug: #1835161
This commit is contained in:
parent
b576983343
commit
380ed979d4
manifests
releasenotes/notes
spec/classes
@ -239,6 +239,10 @@
|
|||||||
# HTTPProxyToWSGI middleware.
|
# HTTPProxyToWSGI middleware.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# [*max_request_body_size*]
|
||||||
|
# (Optional) Set max request body size
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# [*ovs_integration_bridge*]
|
# [*ovs_integration_bridge*]
|
||||||
# (Optional) Name of Open vSwitch bridge to use
|
# (Optional) Name of Open vSwitch bridge to use
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@ -286,6 +290,7 @@ class neutron::server (
|
|||||||
$service_providers = $::os_service_default,
|
$service_providers = $::os_service_default,
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$enable_proxy_headers_parsing = $::os_service_default,
|
$enable_proxy_headers_parsing = $::os_service_default,
|
||||||
|
$max_request_body_size = $::os_service_default,
|
||||||
$ovs_integration_bridge = $::os_service_default,
|
$ovs_integration_bridge = $::os_service_default,
|
||||||
) inherits ::neutron::params {
|
) inherits ::neutron::params {
|
||||||
|
|
||||||
@ -426,6 +431,7 @@ class neutron::server (
|
|||||||
|
|
||||||
oslo::middleware { 'neutron_config':
|
oslo::middleware { 'neutron_config':
|
||||||
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
|
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
|
||||||
|
max_request_body_size => $max_request_body_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $manage_service {
|
if $manage_service {
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Add support to configure `[oslo_middleware]/max_request_body_size` with
|
||||||
|
`$max_request_body_size`.
|
@ -74,6 +74,7 @@ describe 'neutron::server' do
|
|||||||
should contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver])
|
should contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver])
|
||||||
should contain_oslo__middleware('neutron_config').with(
|
should contain_oslo__middleware('neutron_config').with(
|
||||||
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
||||||
|
:max_request_body_size => '<SERVICE DEFAULT>',
|
||||||
)
|
)
|
||||||
should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('<SERVICE DEFAULT>')
|
should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
@ -211,6 +212,16 @@ describe 'neutron::server' do
|
|||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with max_request_body_size' do
|
||||||
|
before :each do
|
||||||
|
params.merge!( :max_request_body_size => '102400' )
|
||||||
|
end
|
||||||
|
|
||||||
|
it { should contain_oslo__middleware('neutron_config').with(
|
||||||
|
:max_request_body_size => '102400',
|
||||||
|
)}
|
||||||
|
end
|
||||||
|
|
||||||
context 'when running neutron-api in wsgi' do
|
context 'when running neutron-api in wsgi' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!( :service_name => 'httpd' )
|
params.merge!( :service_name => 'httpd' )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user