From 5a633e8c60413d68f1c4f831e78ea48068115dec Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sat, 8 Jun 2019 02:04:12 +0200 Subject: [PATCH] Deprecated nova-network params in nova::compute These two were related to nova-network. Change-Id: I6811418bf6e78c6461e82eb5280b9c4080a2ab3a --- manifests/compute.pp | 38 +++++++++---------- ...install-bridge-utils-141a24413b42cb0b.yaml | 13 +++++++ spec/classes/nova_compute_spec.rb | 28 -------------- 3 files changed, 32 insertions(+), 47 deletions(-) create mode 100644 releasenotes/notes/deprecate-install-bridge-utils-141a24413b42cb0b.yaml diff --git a/manifests/compute.pp b/manifests/compute.pp index 420c0d7f7..29a5632b3 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -57,15 +57,6 @@ # (optional) Whether to use virtio for the nic driver of VMs # Defaults to false # -# [*neutron_enabled*] -# (optional) Whether to use Neutron for networking of VMs -# Defaults to true -# -# [*install_bridge_utils*] -# (optional) Whether to install the bridge-utils package or not. -# Applicable only for cases when Neutron was disabled -# Defaults to true -# # [*instance_usage_audit*] # (optional) Generate periodic compute.instance.exists notifications. # Defaults to false @@ -187,6 +178,15 @@ # (optional) The keymap to use with VNC (ls -alh /usr/share/qemu/keymaps to list available keymaps) # Defaults to undef # +# [*neutron_enabled*] +# (optional) Whether to use Neutron for networking of VMs +# Defaults to undef +# +# [*install_bridge_utils*] +# (optional) Whether to install the bridge-utils package or not. +# Applicable only for cases when Neutron was disabled +# Defaults to undef +# class nova::compute ( $enabled = true, $manage_service = true, @@ -200,8 +200,6 @@ class nova::compute ( $vncproxy_path = '/vnc_auto.html', $force_config_drive = false, $virtio_nic = false, - $neutron_enabled = true, - $install_bridge_utils = true, $instance_usage_audit = false, $instance_usage_audit_period = 'month', $force_raw_images = true, @@ -228,6 +226,8 @@ class nova::compute ( $live_migration_wait_for_vif_plug = $::os_service_default, # DEPRECATED PARAMETERS $vnc_keymap = undef, + $neutron_enabled = undef, + $install_bridge_utils = undef, ) { include ::nova::deps @@ -244,6 +244,14 @@ class nova::compute ( warning('vnc_keymap parameter is deprecated, has no effect and will be removed in the future.') } + if $neutron_enabled { + warning('neutron_enabled is deprecated and has no effect, was only used for install_bridge_utils') + } + + if $install_bridge_utils { + warning('install_bridge_utils is deprecated and has no effect') + } + if ($vnc_enabled and $spice_enabled) { fail('vnc_enabled and spice_enabled is mutually exclusive') } @@ -335,14 +343,6 @@ class nova::compute ( 'spice/enabled': value => $spice_enabled; } - if $neutron_enabled != true and $install_bridge_utils { - # Install bridge-utils if we use nova-network - package { 'bridge-utils': - ensure => present, - tag => ['openstack', 'nova-support-package'], - } - } - nova::generic_service { 'compute': enabled => $enabled, manage_service => $manage_service, diff --git a/releasenotes/notes/deprecate-install-bridge-utils-141a24413b42cb0b.yaml b/releasenotes/notes/deprecate-install-bridge-utils-141a24413b42cb0b.yaml new file mode 100644 index 000000000..df5f9bfb6 --- /dev/null +++ b/releasenotes/notes/deprecate-install-bridge-utils-141a24413b42cb0b.yaml @@ -0,0 +1,13 @@ +--- +upgrade: + - | + The neutron_enabled and install_bridge_utils parameters in nova::compute is + deprecated and has no effect. The bridge-utils package is no longer maintained + by using the install_bridge_utils parameter. +deprecations: + - | + The neutron_enabled parameter in nova::compute is deprecated, it had no effect + except for in conjunction with install_bridge_utils which is also deprecated. + - | + The install_bridge_utils parameter in nova::compute is deprecated and has no + effect. The bridge-utils package is now not managed by the nova::compute class. diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 4b1ecdf65..ac6c7c743 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -227,21 +227,6 @@ describe 'nova::compute' do end end - context 'with neutron_enabled set to false' do - let :params do - { :neutron_enabled => false } - end - - it 'installs bridge-utils package for nova-network' do - is_expected.to contain_package('bridge-utils').with( - :ensure => 'present', - ) - is_expected.to contain_package('bridge-utils').that_requires('Anchor[nova::install::begin]') - is_expected.to contain_package('bridge-utils').that_comes_before('Anchor[nova::install::end]') - end - - end - context 'when neutron_physnets_numa_nodes_mapping and neutron_tunnel_numa_nodes are empty' do let :params do { :neutron_physnets_numa_nodes_mapping => {}, @@ -264,19 +249,6 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('neutron_tunnel/numa_nodes').with(:value => '1') } end - context 'with install_bridge_utils set to false' do - let :params do - { :install_bridge_utils => false } - end - - it 'does not install bridge-utils package for nova-network' do - is_expected.to_not contain_package('bridge-utils').with( - :ensure => 'present', - ) - end - - end - context 'with vnc_enabled set to false and spice_enabled set to true' do let :params do { :vnc_enabled => false,