diff --git a/manifests/init.pp b/manifests/init.pp index 02959e5f6..cbab16e08 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -71,7 +71,7 @@ # This enables redundant DHCP agents for configured networks. # Defaults to $::os_service_default # -# [*network_device_mtu*] +# [*global_physnet_mtu*] # (optional) The MTU size for the interfaces managed by neutron # Defaults to $::os_service_default # @@ -263,6 +263,7 @@ # [*qpid_reconnect_interval*] # [*qpid_reconnect_interval_min*] # [*qpid_reconnect_interval_max*] +# [*network_device_mtu*] # class neutron ( $enabled = true, @@ -279,7 +280,7 @@ class neutron ( $dhcp_lease_duration = $::os_service_default, $dns_domain = $::os_service_default, $dhcp_agents_per_network = $::os_service_default, - $network_device_mtu = $::os_service_default, + $global_physnet_mtu = $::os_service_default, $dhcp_agent_notification = $::os_service_default, $advertise_mtu = $::os_service_default, $allow_bulk = $::os_service_default, @@ -334,6 +335,7 @@ class neutron ( $qpid_reconnect_interval_min = undef, $qpid_reconnect_interval_max = undef, $qpid_reconnect_interval = undef, + $network_device_mtu = undef, ) { include ::neutron::params @@ -407,7 +409,7 @@ class neutron ( 'DEFAULT/api_extensions_path': value => $api_extensions_path; 'DEFAULT/state_path': value => $state_path; 'DEFAULT/rpc_response_timeout': value => $rpc_response_timeout; - 'DEFAULT/network_device_mtu': value => $network_device_mtu; + 'DEFAULT/global_physnet_mtu': value => pick($network_device_mtu, $global_physnet_mtu); 'oslo_concurrency/lock_path': value => $lock_path; 'agent/root_helper': value => $root_helper; 'agent/report_interval': value => $report_interval; @@ -507,6 +509,10 @@ class neutron ( warning('Qpid driver is removed from Oslo.messaging in the Mitaka release') } + if $network_device_mtu { + warning('The neutron::network_device_mtu parameter is deprecated, use neutron::global_physnet_mtu instead.') + } + # SSL Options neutron_config { 'DEFAULT/use_ssl': value => $use_ssl; diff --git a/releasenotes/notes/deprecate_network_device_mtu-d7f15c98605ac2fb.yaml b/releasenotes/notes/deprecate_network_device_mtu-d7f15c98605ac2fb.yaml new file mode 100644 index 000000000..1c9e5990f --- /dev/null +++ b/releasenotes/notes/deprecate_network_device_mtu-d7f15c98605ac2fb.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + [DEFAULT]/network_device_mtu option is deprecated and will be removed + in Newton. However, new [ml2]/segment_mtu is deprecated too according to + neutron/common/config.py. New [DEFAULT]/global_physnet_mtu should be used. diff --git a/spec/classes/neutron_init_spec.rb b/spec/classes/neutron_init_spec.rb index 4625654aa..c57f4e8d7 100644 --- a/spec/classes/neutron_init_spec.rb +++ b/spec/classes/neutron_init_spec.rb @@ -122,7 +122,7 @@ describe 'neutron' do is_expected.to contain_neutron_config('DEFAULT/dhcp_lease_duration').with_value('') is_expected.to contain_neutron_config('DEFAULT/dns_domain').with_value('') is_expected.to contain_neutron_config('DEFAULT/dhcp_agents_per_network').with_value('') - is_expected.to contain_neutron_config('DEFAULT/network_device_mtu').with_value('') + is_expected.to contain_neutron_config('DEFAULT/global_physnet_mtu').with_value('') is_expected.to contain_neutron_config('DEFAULT/dhcp_agent_notification').with_value('') is_expected.to contain_neutron_config('DEFAULT/advertise_mtu').with_value('') is_expected.to contain_neutron_config('DEFAULT/allow_bulk').with_value('') @@ -441,7 +441,19 @@ describe 'neutron' do end - shared_examples_for 'with network_device_mtu defined' do + shared_examples_for 'with global_physnet_mtu defined' do + before do + params.merge!( + :global_physnet_mtu => 9000 + ) + end + + it do + is_expected.to contain_neutron_config('DEFAULT/global_physnet_mtu').with_value(params[:global_physnet_mtu]) + end + end + + shared_examples_for 'with deprecated network_device_mtu defined' do before do params.merge!( :network_device_mtu => 9000 @@ -449,7 +461,7 @@ describe 'neutron' do end it do - is_expected.to contain_neutron_config('DEFAULT/network_device_mtu').with_value(params[:network_device_mtu]) + is_expected.to contain_neutron_config('DEFAULT/global_physnet_mtu').with_value(params[:network_device_mtu]) end end