Deprecations and updates for Newton

Some parameters needed to be moved to another section, some others are
deprecated and do nothing in Nova.

Change-Id: I0a79209c687714c3bbcac50a694bfb53a75ca05a
This commit is contained in:
Emilien Macchi
2016-04-20 16:26:51 -04:00
parent 48815a3bb2
commit ff60e30e79
9 changed files with 60 additions and 40 deletions

View File

@@ -71,8 +71,8 @@
# Defaults to undef # Defaults to undef
# #
# [*volume_api_class*] # [*volume_api_class*]
# (optional) The name of the class that nova will use to access volumes. Cinder is the only option. # (optional) DEPRECATED. The name of the class that nova will use to access volumes. Cinder is the only option.
# Defaults to 'nova.volume.cinder.API' # Defaults to undef
# #
# [*use_forwarded_for*] # [*use_forwarded_for*]
# (optional) Treat X-Forwarded-For as the canonical remote address. Only # (optional) Treat X-Forwarded-For as the canonical remote address. Only
@@ -188,7 +188,6 @@ class nova::api(
$metadata_listen = '0.0.0.0', $metadata_listen = '0.0.0.0',
$metadata_listen_port = 8775, $metadata_listen_port = 8775,
$enabled_apis = ['osapi_compute', 'metadata'], $enabled_apis = ['osapi_compute', 'metadata'],
$volume_api_class = 'nova.volume.cinder.API',
$use_forwarded_for = false, $use_forwarded_for = false,
$osapi_compute_workers = $::processorcount, $osapi_compute_workers = $::processorcount,
$metadata_workers = $::processorcount, $metadata_workers = $::processorcount,
@@ -212,6 +211,7 @@ class nova::api(
$ec2_workers = undef, $ec2_workers = undef,
$keystone_ec2_url = undef, $keystone_ec2_url = undef,
$auth_version = false, $auth_version = false,
$volume_api_class = undef,
) inherits nova::params { ) inherits nova::params {
include ::nova::deps include ::nova::deps
@@ -219,6 +219,10 @@ class nova::api(
include ::nova::policy include ::nova::policy
include ::cinder::client include ::cinder::client
if $volume_api_class {
warning('volume_api_class parameter is deprecated, has no effect and will be removed in a future release.')
}
if $ec2_listen_port or $ec2_workers or $keystone_ec2_url { if $ec2_listen_port or $ec2_workers or $keystone_ec2_url {
warning('ec2_listen_port, ec2_workers and keystone_ec2_url are deprecated and have no effect. Deploy openstack/ec2-api instead.') warning('ec2_listen_port, ec2_workers and keystone_ec2_url are deprecated and have no effect. Deploy openstack/ec2-api instead.')
} }
@@ -292,9 +296,8 @@ class nova::api(
} }
nova_config { nova_config {
'DEFAULT/api_paste_config': value => $api_paste_config; 'wsgi/api_paste_config': value => $api_paste_config;
'DEFAULT/enabled_apis': value => $enabled_apis_real; 'DEFAULT/enabled_apis': value => $enabled_apis_real;
'DEFAULT/volume_api_class': value => $volume_api_class;
'DEFAULT/osapi_compute_listen': value => $api_bind_address; 'DEFAULT/osapi_compute_listen': value => $api_bind_address;
'DEFAULT/metadata_listen': value => $metadata_listen; 'DEFAULT/metadata_listen': value => $metadata_listen;
'DEFAULT/metadata_listen_port': value => $metadata_listen_port; 'DEFAULT/metadata_listen_port': value => $metadata_listen_port;

View File

@@ -20,18 +20,25 @@
# (optional) Number of workers for OpenStack Conductor service # (optional) Number of workers for OpenStack Conductor service
# Defaults to undef (i.e. parameter will not be present) # Defaults to undef (i.e. parameter will not be present)
# #
# DEPRECATED PARAMETERS
#
# [*use_local*] # [*use_local*]
# (optional) Perform nova-conductor operations locally # (optional) Perform nova-conductor operations locally
# Defaults to false # Defaults to undef
# #
class nova::conductor( class nova::conductor(
$enabled = true, $enabled = true,
$manage_service = true, $manage_service = true,
$ensure_package = 'present', $ensure_package = 'present',
$workers = undef, $workers = undef,
$use_local = false, # DEPREACTED PARAMETERS
$use_local = undef,
) { ) {
if $use_local {
warning('use_local parameter is deprecated, has no effect and will be dropped in a future release.')
}
include ::nova::deps include ::nova::deps
include ::nova::db include ::nova::db
include ::nova::params include ::nova::params
@@ -49,8 +56,4 @@ class nova::conductor(
'conductor/workers': value => $workers; 'conductor/workers': value => $workers;
} }
} }
nova_config {
'conductor/use_local': value => $use_local;
}
} }

View File

@@ -8,8 +8,8 @@
# (required) Password for connecting to Neutron network services in # (required) Password for connecting to Neutron network services in
# admin context through the OpenStack Identity service. # admin context through the OpenStack Identity service.
# #
# [*neutron_auth_plugin*] # [*neutron_auth_type*]
# Name of the plugin to load (string value) # Name of the auth type to load (string value)
# Defaults to 'v3password' # Defaults to 'v3password'
# #
# [*neutron_url*] # [*neutron_url*]
@@ -63,12 +63,6 @@
# and not the Identity service API IP and port. # and not the Identity service API IP and port.
# Defaults to 'http://127.0.0.1:35357/v3' # Defaults to 'http://127.0.0.1:35357/v3'
# #
# [*security_group_api*]
# (optional) The full class name of the security API class.
# The default configures Nova to use Neutron for security groups.
# Set to 'nova' to use standard Nova security groups.
# Defaults to 'neutron'
#
# [*firewall_driver*] # [*firewall_driver*]
# (optional) Firewall driver. # (optional) Firewall driver.
# This prevents nova from maintaining a firewall so it does not interfere # This prevents nova from maintaining a firewall so it does not interfere
@@ -124,9 +118,17 @@
# (optional) DEPRECATED. The full class name of the network API class. # (optional) DEPRECATED. The full class name of the network API class.
# This parameter has no effect # This parameter has no effect
# #
# [*security_group_api*]
# (optional) DEPRECATED. The full class name of the security API class.
# This parameter has no effect.
#
# [*neutron_auth_plugin*]
# Name of the plugin to load (string value)
# Defaults to undef
#
class nova::network::neutron ( class nova::network::neutron (
$neutron_password = false, $neutron_password = false,
$neutron_auth_plugin = 'v3password', $neutron_auth_type = 'v3password',
$neutron_project_name = 'services', $neutron_project_name = 'services',
$neutron_project_domain_name = 'Default', $neutron_project_domain_name = 'Default',
$neutron_username = 'neutron', $neutron_username = 'neutron',
@@ -138,7 +140,6 @@ class nova::network::neutron (
$neutron_ovs_bridge = 'br-int', $neutron_ovs_bridge = 'br-int',
$neutron_extension_sync_interval = '600', $neutron_extension_sync_interval = '600',
$neutron_ca_certificates_file = undef, $neutron_ca_certificates_file = undef,
$security_group_api = 'neutron',
$firewall_driver = 'nova.virt.firewall.NoopFirewallDriver', $firewall_driver = 'nova.virt.firewall.NoopFirewallDriver',
$vif_plugging_is_fatal = true, $vif_plugging_is_fatal = true,
$vif_plugging_timeout = '300', $vif_plugging_timeout = '300',
@@ -151,12 +152,18 @@ class nova::network::neutron (
$neutron_admin_auth_url = undef, $neutron_admin_auth_url = undef,
$neutron_default_tenant_id = undef, $neutron_default_tenant_id = undef,
$network_api_class = undef, $network_api_class = undef,
$security_group_api = undef,
$neutron_auth_plugin = undef,
) { ) {
include ::nova::deps include ::nova::deps
if $network_api_class != undef { if $network_api_class != undef {
warning('network_api_class has no effect') warning('network_api_class has no effect and will be dropped in a future release.')
}
if $security_group_api != undef {
warning('security_group_api has no effect and will be dropped in a future release.')
} }
# neutron_admin params removed in Mitaka # neutron_admin params removed in Mitaka
@@ -171,6 +178,14 @@ class nova::network::neutron (
} }
} }
# neutron_auth_plugin deprecated in Newton
if $neutron_auth_plugin {
warning('neutron_auth_plugin parameter is deprecated and will be removed in a future release, use neutron_auth_type instead.')
$neutron_auth_type_real = $neutron_auth_plugin
} else {
$neutron_auth_type_real = $neutron_auth_type
}
if $neutron_admin_tenant_name { if $neutron_admin_tenant_name {
warning('neutron_admin_tenant_name is deprecated. Use neutron_project_name') warning('neutron_admin_tenant_name is deprecated. Use neutron_project_name')
$neutron_project_name_real = $neutron_admin_tenant_name $neutron_project_name_real = $neutron_admin_tenant_name
@@ -216,7 +231,6 @@ class nova::network::neutron (
nova_config { nova_config {
'DEFAULT/dhcp_domain': value => $dhcp_domain; 'DEFAULT/dhcp_domain': value => $dhcp_domain;
'DEFAULT/firewall_driver': value => $firewall_driver; 'DEFAULT/firewall_driver': value => $firewall_driver;
'DEFAULT/security_group_api': value => $security_group_api;
'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal; 'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal;
'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout; 'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout;
'DEFAULT/use_neutron': value => true; 'DEFAULT/use_neutron': value => true;
@@ -231,7 +245,7 @@ class nova::network::neutron (
'neutron/auth_url': value => $neutron_auth_url_real; 'neutron/auth_url': value => $neutron_auth_url_real;
'neutron/ovs_bridge': value => $neutron_ovs_bridge; 'neutron/ovs_bridge': value => $neutron_ovs_bridge;
'neutron/extension_sync_interval': value => $neutron_extension_sync_interval; 'neutron/extension_sync_interval': value => $neutron_extension_sync_interval;
'neutron/auth_plugin': value => $neutron_auth_plugin; 'neutron/auth_type': value => $neutron_auth_type_real;
} }
if ! $neutron_ca_certificates_file { if ! $neutron_ca_certificates_file {

View File

@@ -49,8 +49,8 @@ class nova::vncproxy(
# See http://nova.openstack.org/runnova/vncconsole.html for more details. # See http://nova.openstack.org/runnova/vncconsole.html for more details.
nova_config { nova_config {
'DEFAULT/novncproxy_host': value => $host; 'vnc/novncproxy_host': value => $host;
'DEFAULT/novncproxy_port': value => $port; 'vnc/novncproxy_port': value => $port;
} }
include ::nova::vncproxy::common include ::nova::vncproxy::common

View File

@@ -0,0 +1,6 @@
---
deprecations:
- volume_api_class, use_local and security_group_api parameters are deprecated.
They have no effect and will be removed in a future release.
- neutron_auth_plugin is deprecated but is still usable. It will be removed
in a future release.

View File

@@ -56,7 +56,7 @@ describe 'nova::api' do
it { is_expected.to contain_nova_config('DEFAULT/instance_name_template').with_ensure('absent')} it { is_expected.to contain_nova_config('DEFAULT/instance_name_template').with_ensure('absent')}
it 'configures various stuff' do it 'configures various stuff' do
is_expected.to contain_nova_config('DEFAULT/api_paste_config').with('value' => 'api-paste.ini') is_expected.to contain_nova_config('wsgi/api_paste_config').with('value' => 'api-paste.ini')
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with('value' => '0.0.0.0') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with('value' => '0.0.0.0')
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with('value' => '8774') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with('value' => '8774')
is_expected.to contain_nova_config('DEFAULT/metadata_listen').with('value' => '0.0.0.0') is_expected.to contain_nova_config('DEFAULT/metadata_listen').with('value' => '0.0.0.0')

View File

@@ -20,8 +20,6 @@ describe 'nova::conductor' do
:ensure => 'running' :ensure => 'running'
)} )}
it { is_expected.to contain_nova_config('conductor/use_local').with_value('false') }
context 'with manage_service as false' do context 'with manage_service as false' do
let :params do let :params do
{ :enabled => true, { :enabled => true,

View File

@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'nova::network::neutron' do describe 'nova::network::neutron' do
let :default_params do let :default_params do
{ :neutron_auth_plugin => 'v3password', { :neutron_auth_type => 'v3password',
:neutron_url => 'http://127.0.0.1:9696', :neutron_url => 'http://127.0.0.1:9696',
:neutron_url_timeout => '30', :neutron_url_timeout => '30',
:neutron_project_name => 'services', :neutron_project_name => 'services',
@@ -14,7 +14,6 @@ describe 'nova::network::neutron' do
:neutron_auth_url => 'http://127.0.0.1:35357/v3', :neutron_auth_url => 'http://127.0.0.1:35357/v3',
:neutron_ovs_bridge => 'br-int', :neutron_ovs_bridge => 'br-int',
:neutron_extension_sync_interval => '600', :neutron_extension_sync_interval => '600',
:security_group_api => 'neutron',
:firewall_driver => 'nova.virt.firewall.NoopFirewallDriver', :firewall_driver => 'nova.virt.firewall.NoopFirewallDriver',
:vif_plugging_is_fatal => true, :vif_plugging_is_fatal => true,
:vif_plugging_timeout => '300', :vif_plugging_timeout => '300',
@@ -31,7 +30,7 @@ describe 'nova::network::neutron' do
is_expected.to contain_nova_config('neutron/password').with_value(params[:neutron_password]).with_secret(true) is_expected.to contain_nova_config('neutron/password').with_value(params[:neutron_password]).with_secret(true)
is_expected.to contain_nova_config('DEFAULT/dhcp_domain').with_value(default_params[:dhcp_domain]) is_expected.to contain_nova_config('DEFAULT/dhcp_domain').with_value(default_params[:dhcp_domain])
is_expected.to contain_nova_config('DEFAULT/use_neutron').with_value(true) is_expected.to contain_nova_config('DEFAULT/use_neutron').with_value(true)
is_expected.to contain_nova_config('neutron/auth_plugin').with_value(default_params[:neutron_auth_plugin]) is_expected.to contain_nova_config('neutron/auth_type').with_value(default_params[:neutron_auth_type])
is_expected.to contain_nova_config('neutron/url').with_value(default_params[:neutron_url]) is_expected.to contain_nova_config('neutron/url').with_value(default_params[:neutron_url])
is_expected.to contain_nova_config('neutron/timeout').with_value(default_params[:neutron_url_timeout]) is_expected.to contain_nova_config('neutron/timeout').with_value(default_params[:neutron_url_timeout])
is_expected.to contain_nova_config('neutron/project_name').with_value(default_params[:neutron_project_name]) is_expected.to contain_nova_config('neutron/project_name').with_value(default_params[:neutron_project_name])
@@ -45,7 +44,6 @@ describe 'nova::network::neutron' do
end end
it 'configures Nova to use Neutron Bridge Security Groups and Firewall' do it 'configures Nova to use Neutron Bridge Security Groups and Firewall' do
is_expected.to contain_nova_config('DEFAULT/firewall_driver').with_value(default_params[:firewall_driver]) is_expected.to contain_nova_config('DEFAULT/firewall_driver').with_value(default_params[:firewall_driver])
is_expected.to contain_nova_config('DEFAULT/security_group_api').with_value(default_params[:security_group_api])
is_expected.to contain_nova_config('neutron/ovs_bridge').with_value(default_params[:neutron_ovs_bridge]) is_expected.to contain_nova_config('neutron/ovs_bridge').with_value(default_params[:neutron_ovs_bridge])
end end
it 'configures neutron vif plugging events in nova.conf' do it 'configures neutron vif plugging events in nova.conf' do
@@ -65,7 +63,6 @@ describe 'nova::network::neutron' do
:neutron_username => 'neutron2', :neutron_username => 'neutron2',
:neutron_user_domain_name => 'neutron_domain', :neutron_user_domain_name => 'neutron_domain',
:neutron_auth_url => 'http://10.0.0.1:35357/v2', :neutron_auth_url => 'http://10.0.0.1:35357/v2',
:security_group_api => 'nova',
:firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver', :firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver',
:neutron_ovs_bridge => 'br-int', :neutron_ovs_bridge => 'br-int',
:neutron_extension_sync_interval => '600', :neutron_extension_sync_interval => '600',
@@ -92,7 +89,6 @@ describe 'nova::network::neutron' do
end end
it 'configures Nova to use Neutron Security Groups and Firewall' do it 'configures Nova to use Neutron Security Groups and Firewall' do
is_expected.to contain_nova_config('DEFAULT/firewall_driver').with_value(params[:firewall_driver]) is_expected.to contain_nova_config('DEFAULT/firewall_driver').with_value(params[:firewall_driver])
is_expected.to contain_nova_config('DEFAULT/security_group_api').with_value(params[:security_group_api])
is_expected.to contain_nova_config('neutron/ovs_bridge').with_value(params[:neutron_ovs_bridge]) is_expected.to contain_nova_config('neutron/ovs_bridge').with_value(params[:neutron_ovs_bridge])
end end
it 'configures neutron vif plugging events in nova.conf' do it 'configures neutron vif plugging events in nova.conf' do
@@ -111,13 +107,13 @@ describe 'nova::network::neutron' do
:neutron_region_name => 'RegionTwo', :neutron_region_name => 'RegionTwo',
:neutron_admin_username => 'neutron2', :neutron_admin_username => 'neutron2',
:neutron_admin_auth_url => 'http://10.0.0.1:35357', :neutron_admin_auth_url => 'http://10.0.0.1:35357',
:security_group_api => 'nova',
:firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver', :firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver',
:neutron_ovs_bridge => 'br-int', :neutron_ovs_bridge => 'br-int',
:neutron_extension_sync_interval => '600', :neutron_extension_sync_interval => '600',
:vif_plugging_is_fatal => false, :vif_plugging_is_fatal => false,
:vif_plugging_timeout => '0', :vif_plugging_timeout => '0',
:dhcp_domain => 'foo' :dhcp_domain => 'foo',
:neutron_auth_plugin => 'oldparam',
) )
end end
@@ -133,10 +129,10 @@ describe 'nova::network::neutron' do
is_expected.to contain_nova_config('neutron/username').with_value(params[:neutron_admin_username]) is_expected.to contain_nova_config('neutron/username').with_value(params[:neutron_admin_username])
is_expected.to contain_nova_config('neutron/auth_url').with_value(params[:neutron_admin_auth_url]) is_expected.to contain_nova_config('neutron/auth_url').with_value(params[:neutron_admin_auth_url])
is_expected.to contain_nova_config('neutron/extension_sync_interval').with_value(params[:neutron_extension_sync_interval]) is_expected.to contain_nova_config('neutron/extension_sync_interval').with_value(params[:neutron_extension_sync_interval])
is_expected.to contain_nova_config('neutron/auth_type').with_value(params[:neutron_auth_plugin])
end end
it 'configures Nova to use Neutron Security Groups and Firewall' do it 'configures Nova to use Neutron Security Groups and Firewall' do
is_expected.to contain_nova_config('DEFAULT/firewall_driver').with_value(params[:firewall_driver]) is_expected.to contain_nova_config('DEFAULT/firewall_driver').with_value(params[:firewall_driver])
is_expected.to contain_nova_config('DEFAULT/security_group_api').with_value(params[:security_group_api])
is_expected.to contain_nova_config('neutron/ovs_bridge').with_value(params[:neutron_ovs_bridge]) is_expected.to contain_nova_config('neutron/ovs_bridge').with_value(params[:neutron_ovs_bridge])
end end
it 'configures neutron vif plugging events in nova.conf' do it 'configures neutron vif plugging events in nova.conf' do

View File

@@ -18,8 +18,8 @@ describe 'nova::vncproxy' do
:name => 'python-numpy' :name => 'python-numpy'
)} )}
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_host').with(:value => '0.0.0.0') } it { is_expected.to contain_nova_config('vnc/novncproxy_host').with(:value => '0.0.0.0') }
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_port').with(:value => '6080') } it { is_expected.to contain_nova_config('vnc/novncproxy_port').with(:value => '6080') }
it { is_expected.to contain_nova_config('vnc/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') } it { is_expected.to contain_nova_config('vnc/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') }
it { is_expected.to contain_package('nova-vncproxy').with( it { is_expected.to contain_package('nova-vncproxy').with(