Remove deprecated parameters

* nova::api::auth_strategy (deprecated since 4.0.0)
* nova::api::workers (deprecated since 4.0.0)
* nova::compute::libvirt::libvirt_type (deprecated since 4.0.0)
* nova::db::mysql::cluster_id (deprecated since 4.0.0)
* nova::nova_cluster_id (deprecated since 4.0.0)
* nova::nova_group_id (deprecated since 4.2.0)
* nova::nova_user_id (deprecated since 4.2.0)
* nova::nova_shell (deprecated since 4.2.0)
* nova::sql_connection (deprecated since 3.0.0)
* nova::sql_idle_timeout (deprecated since 3.0.0)
* nova::logdir (deprecated since 3.2.0)
* nova::monitoring_notifications (deprecated since 4.0.0)
* nova::keystone::auth::cinder (deprecated since 3.0.0)

Change-Id: I31e8517b2a25febc9f6cd01197be279ee772ebce
This commit is contained in:
Mathieu Gagné 2014-11-25 15:02:43 -05:00
parent 1819919271
commit 92d9be12cd
8 changed files with 17 additions and 246 deletions

View File

@ -19,10 +19,6 @@
# (optional) Whether the nova api package will be installed
# Defaults to 'present'
#
# [*auth_strategy*]
# (DEPRECATED) Does nothing and will be removed in Icehouse
# Defaults to false
#
# [*auth_host*]
# (optional) The IP of the server running keystone
# Defaults to '127.0.0.1'
@ -145,7 +141,6 @@ class nova::api(
$enabled = false,
$manage_service = true,
$ensure_package = 'present',
$auth_strategy = undef,
$auth_host = '127.0.0.1',
$auth_port = 35357,
$auth_protocol = 'http',
@ -172,7 +167,6 @@ class nova::api(
$validate = false,
$validation_options = {},
# DEPRECATED PARAMETER
$workers = undef,
$conductor_workers = undef,
) {
@ -191,17 +185,6 @@ class nova::api(
Nova_paste_api_ini<| |> ~> Service['nova-api']
Class['nova::policy'] ~> Service['nova-api']
if $auth_strategy {
warning('The auth_strategy parameter is deprecated and has no effect.')
}
if $workers {
warning('The workers parameter is deprecated, use osapi_compute_workers instead.')
$osapi_compute_workers_real = $workers
} else {
$osapi_compute_workers_real = $osapi_compute_workers
}
if $conductor_workers {
warning('The conductor_workers parameter is deprecated and has no effect. Use workers parameter of nova::conductor class instead.')
}
@ -222,7 +205,7 @@ class nova::api(
'DEFAULT/osapi_compute_listen': value => $api_bind_address;
'DEFAULT/metadata_listen': value => $metadata_listen;
'DEFAULT/osapi_volume_listen': value => $api_bind_address;
'DEFAULT/osapi_compute_workers': value => $osapi_compute_workers_real;
'DEFAULT/osapi_compute_workers': value => $osapi_compute_workers;
'DEFAULT/ec2_workers': value => $ec2_workers;
'DEFAULT/metadata_workers': value => $metadata_workers;
'DEFAULT/use_forwarded_for': value => $use_forwarded_for;

View File

@ -7,7 +7,6 @@
#
# [*libvirt_virt_type*]
# (optional) Libvirt domain type. Options are: kvm, lxc, qemu, uml, xen
# Replaces libvirt_type
# Defaults to 'kvm'
#
# [*vncserver_listen*]
@ -76,24 +75,15 @@ class nova::compute::libvirt (
$remove_unused_resized_minimum_age_seconds = undef,
$remove_unused_original_minimum_age_seconds = undef,
$libvirt_service_name = $::nova::params::libvirt_service_name,
# DEPRECATED PARAMETER
$libvirt_type = false
) inherits nova::params {
include nova::params
Service['libvirt'] -> Service['nova-compute']
if $libvirt_type {
warning ('The libvirt_type parameter is deprecated, use libvirt_virt_type instead.')
$libvirt_virt_type_real = $libvirt_type
} else {
$libvirt_virt_type_real = $libvirt_virt_type
}
# libvirt_cpu_mode has different defaults depending on hypervisor.
if !$libvirt_cpu_mode {
case $libvirt_virt_type_real {
case $libvirt_virt_type {
'kvm','qemu': {
$libvirt_cpu_mode_real = 'host-model'
}
@ -106,7 +96,7 @@ class nova::compute::libvirt (
}
if($::osfamily == 'Debian') {
package { "nova-compute-${libvirt_virt_type_real}":
package { "nova-compute-${libvirt_virt_type}":
ensure => present,
before => Package['nova-compute'],
require => Package['nova-common'],
@ -148,7 +138,7 @@ class nova::compute::libvirt (
nova_config {
'DEFAULT/compute_driver': value => 'libvirt.LibvirtDriver';
'DEFAULT/vncserver_listen': value => $vncserver_listen;
'libvirt/virt_type': value => $libvirt_virt_type_real;
'libvirt/virt_type': value => $libvirt_virt_type;
'libvirt/cpu_mode': value => $libvirt_cpu_mode_real;
}

View File

@ -47,13 +47,8 @@ class nova::db::mysql(
$collate = 'utf8_unicode_ci',
$allowed_hosts = undef,
$mysql_module = undef,
$cluster_id = undef
) {
if $cluster_id {
warning('The cluster_id parameter is deprecated and has no effect.')
}
if $mysql_module {
warning('The mysql_module parameter is deprecated. The latest 2.x mysql module will be used.')
}

View File

@ -9,18 +9,6 @@
# (optional) The state of nova packages
# Defaults to 'present'
#
# [*nova_cluster_id*]
# (optional) Deprecated. This parameter does nothing and will be removed.
# Defaults to 'localcluster'
#
# [*sql_connection*]
# (optional) Deprecated. Use database_connection instead.
# Defaults to false
#
# [*sql_idle_timeout*]
# (optional) Deprecated. Use database_idle_timeout instead
# Defaults to false
#
# [*database_connection*]
# (optional) Connection url to connect to nova database.
# Defaults to false
@ -133,10 +121,6 @@
# (optional) Maximum time since last check-in for up service.
# Defaults to 60
#
# [*logdir*]
# (optional) Deprecated. Use log_dir instead.
# Defaults to false
#
# [*log_dir*]
# (optional) Directory where logs should be stored.
# If set to boolean false, it will not log to any directory.
@ -196,28 +180,6 @@
# (optional) CA certificate file to use to verify connecting clients
# Defaults to false, not set_
#
# [*nova_user_id*]
# (optional) Create the nova user with the specified gid.
# Changing to a new uid after specifying a different uid previously,
# or using this option after the nova account already exists will break
# the ownership of all files/dirs owned by nova. It is strongly encouraged
# not to use this option and instead create user before nova class or
# for network shares create netgroup into which you'll put nova on all the
# nodes. If undef no user will be created and user creation will standardly
# happen in nova-common package.
# Defaults to undef.
#
# [*nova_group_id*]
# (optional) Create the nova user with the specified gid.
# Changing to a new uid after specifying a different uid previously,
# or using this option after the nova account already exists will break
# the ownership of all files/dirs owned by nova. It is strongly encouraged
# not to use this option and instead create group before nova class or for
# network shares create netgroup into which you'll put nova on all the
# nodes. If undef no user or group will be created and creation will
# happen in nova-common package.
# Defaults to undef.
#
# [*nova_public_key*]
# (optional) Install public key in .ssh/authorized_keys for the 'nova' user.
# Expects a hash of the form { type => 'key-type', key => 'key-data' } where
@ -230,10 +192,6 @@
# 'key-data' }, where 'key-type' is one of (ssh-rsa, ssh-dsa, ssh-ecdsa) and
# 'key-data' is the contents of the private key file.
#
# [*nova_shell*]
# (optional) Set shell for 'nova' user to the specified value.
# Defaults to '/bin/false'.
#
# [*mysql_module*]
# (optional) Deprecated. Does nothing.
#
@ -311,14 +269,8 @@ class nova(
$ca_file = false,
$cert_file = false,
$key_file = false,
$nova_user_id = undef,
$nova_group_id = undef,
$nova_public_key = undef,
$nova_private_key = undef,
$nova_shell = '/bin/false',
# deprecated in folsom
#$root_helper = $::nova::params::root_helper,
$monitoring_notifications = false,
$use_syslog = false,
$log_facility = 'LOG_USER',
$install_utilities = true,
@ -328,11 +280,6 @@ class nova(
$notify_on_state_change = undef,
# DEPRECATED PARAMETERS
$mysql_module = undef,
# this is how to query all resources from our clutser
$nova_cluster_id = undef,
$sql_connection = false,
$sql_idle_timeout = false,
$logdir = false,
$os_region_name = undef,
) inherits nova::params {
@ -340,10 +287,6 @@ class nova(
warning('The mysql_module parameter is deprecated. The latest 2.x mysql module will be used.')
}
if $nova_cluster_id {
warning('The nova_cluster_id parameter is deprecated and has no effect.')
}
validate_array($enabled_ssl_apis)
if empty($enabled_ssl_apis) and $use_ssl {
warning('enabled_ssl_apis is empty but use_ssl is set to true')
@ -371,31 +314,6 @@ class nova(
fail('The kombu_ssl_certfile and kombu_ssl_keyfile parameters must be used together')
}
if $nova_group_id {
warning('The nova_group_id will be deprecated, please create group manually')
group { 'nova':
ensure => present,
system => true,
gid => $nova_group_id,
before => Package['nova-common'],
}
}
if $nova_user_id {
warning('The nova_user_id will be deprecated, please create user manually')
user { 'nova':
ensure => present,
system => true,
groups => 'nova',
home => '/var/lib/nova',
managehome => false,
shell => $nova_shell,
uid => $nova_user_id,
gid => $nova_group_id,
before => Package['nova-common'],
require => Group['nova'],
}
}
if $nova_public_key or $nova_private_key {
file { '/var/lib/nova/.ssh':
ensure => directory,
@ -498,36 +416,22 @@ class nova(
refreshonly => true,
}
if $sql_connection {
warning('The sql_connection parameter is deprecated, use database_connection instead.')
$database_connection_real = $sql_connection
} else {
$database_connection_real = $database_connection
}
if $sql_idle_timeout {
warning('The sql_idle_timeout parameter is deprecated, use database_idle_timeout instead.')
$database_idle_timeout_real = $sql_idle_timeout
} else {
$database_idle_timeout_real = $database_idle_timeout
}
# both the database_connection and rabbit_host are things
# that may need to be collected from a remote host
if $database_connection_real {
if($database_connection_real =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
if $database_connection {
if($database_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
require 'mysql::bindings'
require 'mysql::bindings::python'
} elsif($database_connection_real =~ /postgresql:\/\/\S+:\S+@\S+\/\S+/) {
} elsif($database_connection =~ /postgresql:\/\/\S+:\S+@\S+\/\S+/) {
} elsif($database_connection_real =~ /sqlite:\/\//) {
} elsif($database_connection =~ /sqlite:\/\//) {
} else {
fail("Invalid db connection ${database_connection_real}")
fail("Invalid db connection ${database_connection}")
}
nova_config {
'database/connection': value => $database_connection_real, secret => true;
'database/idle_timeout': value => $database_idle_timeout_real;
'database/connection': value => $database_connection, secret => true;
'database/idle_timeout': value => $database_idle_timeout;
}
}
@ -662,34 +566,22 @@ class nova(
}
}
if $logdir {
warning('The logdir parameter is deprecated, use log_dir instead.')
$log_dir_real = $logdir
} else {
$log_dir_real = $log_dir
}
if $log_dir_real {
file { $log_dir_real:
if $log_dir {
file { $log_dir:
ensure => directory,
mode => '0750',
owner => 'nova',
group => 'nova',
require => Package['nova-common'],
}
nova_config { 'DEFAULT/log_dir': value => $log_dir_real;}
nova_config { 'DEFAULT/log_dir': value => $log_dir;}
} else {
nova_config { 'DEFAULT/log_dir': ensure => absent;}
}
if $monitoring_notifications {
warning('The monitoring_notifications parameter is deprecated, use notification_driver instead.')
$notification_driver_real = 'nova.openstack.common.notifier.rpc_notifier'
} else {
$notification_driver_real = is_string($notification_driver) ? {
true => $notification_driver,
default => join($notification_driver, ',')
}
$notification_driver_real = is_string($notification_driver) ? {
true => $notification_driver,
default => join($notification_driver, ',')
}
nova_config {

View File

@ -79,10 +79,6 @@
# (optional) Whether to configure the admin role for the service user.
# Defaults to true
#
# [*cinder*]
# (optional) Deprecated and has no effect
# Defaults to undef
#
# [*public_protocol*]
# (optional) Protocol to use for the public endpoint. Can be http or https.
# Defaults to 'http'
@ -109,7 +105,6 @@ class nova::keystone::auth(
$tenant = 'services',
$email = 'nova@localhost',
$configure_ec2_endpoint = true,
$cinder = undef,
$public_protocol = 'http',
$configure_endpoint = true,
$configure_endpoint_v3 = true,
@ -119,10 +114,6 @@ class nova::keystone::auth(
$internal_protocol = 'http'
) {
if $cinder != undef {
warning('The cinder parameter is deprecated and has no effect.')
}
if $service_name == undef {
$real_service_name = $auth_name
} else {

View File

@ -75,17 +75,6 @@ describe 'nova::api' do
end
end
context 'with deprecated parameters' do
before do
params.merge!({
:workers => 1,
})
end
it 'configures various stuff' do
should contain_nova_config('DEFAULT/osapi_compute_workers').with('value' => '1')
end
end
context 'with overridden parameters' do
before do
params.merge!({

View File

@ -76,15 +76,6 @@ describe 'nova::compute::libvirt' do
)}
end
describe 'with deprecated params' do
let :params do
{ :libvirt_type => 'qemu'
}
end
it { should contain_nova_config('libvirt/virt_type').with_value('qemu')}
end
describe 'with migration_support enabled' do
context 'with vncserver_listen set to 0.0.0.0' do
@ -193,15 +184,6 @@ describe 'nova::compute::libvirt' do
it { should contain_nova_config('libvirt/remove_unused_resized_minimum_age_seconds').with_value(3600)}
end
describe 'with deprecated params' do
let :params do
{ :libvirt_type => 'qemu'
}
end
it { should contain_nova_config('libvirt/virt_type').with_value('qemu')}
end
describe 'with migration_support enabled' do
context 'with vncserver_listen set to 0.0.0.0' do

View File

@ -23,22 +23,6 @@ describe 'nova' do
)
end
it 'does not create user and group' do
should_not contain_group('nova').with(
:ensure => 'present',
:system => true,
:before => 'User[nova]'
)
should_not contain_user('nova').with(
:ensure => 'present',
:system => true,
:groups => 'nova',
:home => '/var/lib/nova',
:managehome => false,
:shell => '/bin/false'
)
end
it 'creates various files and folders' do
should contain_file('/var/log/nova').with(
:ensure => 'directory',
@ -133,33 +117,10 @@ describe 'nova' do
:notification_driver => 'ceilometer.compute.nova_notifier',
:notification_topics => 'openstack',
:notify_api_faults => true,
:nova_user_id => '499',
:nova_group_id => '499',
:report_interval => '60',
:nova_shell => '/bin/bash',
:os_region_name => 'MyRegion' }
end
it 'creates user and group' do
should contain_group('nova').with(
:ensure => 'present',
:system => true,
:gid => '499',
:before => 'Package[nova-common]'
)
should contain_user('nova').with(
:ensure => 'present',
:system => true,
:groups => 'nova',
:home => '/var/lib/nova',
:managehome => false,
:shell => '/bin/bash',
:uid => '499',
:gid => '499',
:require => 'Group[nova]'
)
end
it 'installs packages' do
should contain_package('nova-common').with('ensure' => '2012.1.1-15.el6')
should contain_package('python-nova').with('ensure' => '2012.1.1-15.el6')
@ -246,18 +207,6 @@ describe 'nova' do
end
end
context 'with deprecated sql parameters' do
let :params do
{ :sql_connection => 'mysql://user:pass@db/db',
:sql_idle_timeout => '30' }
end
it 'configures database' do
should contain_nova_config('database/connection').with_value('mysql://user:pass@db/db').with_secret(true)
should contain_nova_config('database/idle_timeout').with_value('30')
end
end
context 'with syslog enabled' do
let :params do
{ :use_syslog => 'true' }