Merge "Deprecated nova-network params in nova::compute"
This commit is contained in:
commit
ae03311e2c
manifests
releasenotes/notes
spec/classes
@ -57,15 +57,6 @@
|
|||||||
# (optional) Whether to use virtio for the nic driver of VMs
|
# (optional) Whether to use virtio for the nic driver of VMs
|
||||||
# Defaults to false
|
# 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*]
|
# [*instance_usage_audit*]
|
||||||
# (optional) Generate periodic compute.instance.exists notifications.
|
# (optional) Generate periodic compute.instance.exists notifications.
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
@ -187,6 +178,15 @@
|
|||||||
# (optional) The keymap to use with VNC (ls -alh /usr/share/qemu/keymaps to list available keymaps)
|
# (optional) The keymap to use with VNC (ls -alh /usr/share/qemu/keymaps to list available keymaps)
|
||||||
# Defaults to undef
|
# 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 (
|
class nova::compute (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
@ -200,8 +200,6 @@ class nova::compute (
|
|||||||
$vncproxy_path = '/vnc_auto.html',
|
$vncproxy_path = '/vnc_auto.html',
|
||||||
$force_config_drive = false,
|
$force_config_drive = false,
|
||||||
$virtio_nic = false,
|
$virtio_nic = false,
|
||||||
$neutron_enabled = true,
|
|
||||||
$install_bridge_utils = true,
|
|
||||||
$instance_usage_audit = false,
|
$instance_usage_audit = false,
|
||||||
$instance_usage_audit_period = 'month',
|
$instance_usage_audit_period = 'month',
|
||||||
$force_raw_images = true,
|
$force_raw_images = true,
|
||||||
@ -228,6 +226,8 @@ class nova::compute (
|
|||||||
$live_migration_wait_for_vif_plug = $::os_service_default,
|
$live_migration_wait_for_vif_plug = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$vnc_keymap = undef,
|
$vnc_keymap = undef,
|
||||||
|
$neutron_enabled = undef,
|
||||||
|
$install_bridge_utils = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::deps
|
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.')
|
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) {
|
if ($vnc_enabled and $spice_enabled) {
|
||||||
fail('vnc_enabled and spice_enabled is mutually exclusive')
|
fail('vnc_enabled and spice_enabled is mutually exclusive')
|
||||||
}
|
}
|
||||||
@ -335,14 +343,6 @@ class nova::compute (
|
|||||||
'spice/enabled': value => $spice_enabled;
|
'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':
|
nova::generic_service { 'compute':
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
manage_service => $manage_service,
|
manage_service => $manage_service,
|
||||||
|
@ -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.
|
@ -227,21 +227,6 @@ describe 'nova::compute' do
|
|||||||
end
|
end
|
||||||
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
|
context 'when neutron_physnets_numa_nodes_mapping and neutron_tunnel_numa_nodes are empty' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :neutron_physnets_numa_nodes_mapping => {},
|
{ :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') }
|
it { is_expected.to contain_nova_config('neutron_tunnel/numa_nodes').with(:value => '1') }
|
||||||
end
|
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
|
context 'with vnc_enabled set to false and spice_enabled set to true' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :vnc_enabled => false,
|
{ :vnc_enabled => false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user