From 3568ccf3d7b055fcf014ac36cbf880278648e4bc Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Wed, 5 Feb 2020 10:48:05 +0100 Subject: [PATCH] Deprecate ovsdb_interface This was removed from Neutron in 2018 and it now always defaults to native [1]. [1] https://github.com/openstack/neutron/commit/cf37563c8393f964e7f390f13c43070791360cc1 Change-Id: Iec0b1a897709a549026f75dd18ca1a627c9995aa --- manifests/agents/ml2/ovs.pp | 25 +++++++++++-------- ...cate-ovsdb_interface-d5720f786ce14b8a.yaml | 4 +++ spec/classes/neutron_agents_ml2_ovs_spec.rb | 20 --------------- 3 files changed, 18 insertions(+), 31 deletions(-) create mode 100644 releasenotes/notes/deprecate-ovsdb_interface-d5720f786ce14b8a.yaml diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index 7d4383364..296864118 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -139,11 +139,6 @@ # (optional) The vhost-user socket directory for OVS # Defaults to $::os_service_default # -# [*ovsdb_interface*] -# (optional) The interface for interacting with the OVSDB -# Allowed values: vsctl, native -# Defaults to $::os_service_default -# # [*purge_config*] # (optional) Whether to set only the specified config options # in the ovs config. @@ -178,6 +173,11 @@ # [*of_interface*] # (optional) This option is deprecated an has no effect # +# [*ovsdb_interface*] +# (optional) The interface for interacting with the OVSDB +# Allowed values: vsctl, native +# Defaults to undef +# class neutron::agents::ml2::ovs ( $package_ensure = 'present', $enabled = true, @@ -205,7 +205,6 @@ class neutron::agents::ml2::ovs ( $tun_peer_patch_port = $::os_service_default, $datapath_type = $::os_service_default, $vhostuser_socket_dir = $::os_service_default, - $ovsdb_interface = $::os_service_default, $purge_config = false, $enable_dpdk = false, $enable_security_group = $::os_service_default, @@ -214,6 +213,7 @@ class neutron::agents::ml2::ovs ( $tunnel_csum = $::os_service_default, # DEPRECATED $of_interface = undef, + $ovsdb_interface = undef, ) { include neutron::deps @@ -267,10 +267,6 @@ class neutron::agents::ml2::ovs ( warning('of_interface is deprecated and will be removed in the future') } - if ! (is_service_default($ovsdb_interface)) and ! ($ovsdb_interface =~ /^(vsctl|native)$/) { - fail('A value of $ovsdb_interface is incorrect. The allowed values are vsctl and native') - } - resources { 'neutron_agent_ovs': purge => $purge_config, } @@ -304,6 +300,14 @@ class neutron::agents::ml2::ovs ( } } + # TODO(tobias.urdin): Remove in V release. + if $ovsdb_interface != undef { + warning('ovsdb_interface is deprecated and has no effect') + } + neutron_agent_ovs { + 'ovs/ovsdb_interface': ensure => absent; + } + neutron_agent_ovs { 'agent/polling_interval': value => $polling_interval; 'agent/l2_population': value => $l2_population; @@ -320,7 +324,6 @@ class neutron::agents::ml2::ovs ( 'ovs/integration_bridge': value => $integration_bridge; 'ovs/datapath_type': value => $datapath_type; 'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir; - 'ovs/ovsdb_interface': value => $ovsdb_interface; 'ovs/of_interface': value => $of_interface; 'securitygroup/enable_security_group': value => $enable_security_group; } diff --git a/releasenotes/notes/deprecate-ovsdb_interface-d5720f786ce14b8a.yaml b/releasenotes/notes/deprecate-ovsdb_interface-d5720f786ce14b8a.yaml new file mode 100644 index 000000000..d1b22c205 --- /dev/null +++ b/releasenotes/notes/deprecate-ovsdb_interface-d5720f786ce14b8a.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - | + The neutron::agents::ml2::ovs::ovsdb_interface is deprecated and has no effect. diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index 95373753a..6380e2f5a 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -49,7 +49,6 @@ describe 'neutron::agents::ml2::ovs' do should contain_neutron_agent_ovs('agent/tunnel_csum').with_value(['']) should contain_neutron_agent_ovs('ovs/datapath_type').with_value(['']) should contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['']) - should contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['']) should contain_neutron_agent_ovs('ovs/ovsdb_timeout').with_value('') should contain_neutron_agent_ovs('ovs/of_connect_timeout').with_value('') should contain_neutron_agent_ovs('ovs/of_request_timeout').with_value('') @@ -311,25 +310,6 @@ describe 'neutron::agents::ml2::ovs' do end end - context 'when supplying ovsdb_interface' do - context 'with incorrect value' do - before :each do - params.merge!(:ovsdb_interface => 'random') - end - - it { should raise_error(Puppet::Error, /A value of \$ovsdb_interface is incorrect. The allowed values are vsctl and native/) } - end - - context 'with supported value' do - before :each do - params.merge!(:ovsdb_interface => 'native') - end - it 'should configure ovsdb_interface for ovs' do - should contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value('native') - end - end - end - context 'when enabling dpdk with manage vswitch disabled' do before :each do params.merge!(:enable_dpdk => true, :manage_vswitch => false)