compute: remove deprecated options

Remove deprecated compute options:

- default_availability_zone
- default_schedule_zone
- internal_service_availability_zone
- compute_manager

Change-Id: Ie5dd8499eaa6770cfc11a86c7b8380c8217d3b68
Related-Bug: #1674375
This commit is contained in:
Emilien Macchi 2017-03-20 10:57:08 -04:00
parent c4470d686e
commit 1063de82f6
4 changed files with 9 additions and 71 deletions

View File

@ -22,22 +22,10 @@ class nova::availability_zone (
$internal_service_availability_zone = $::os_service_default, $internal_service_availability_zone = $::os_service_default,
) { ) {
# NOTE(dalees): In order to keep backward compatibility from nova::compute we
# rely on the pick function.
$default_availability_zone_real = pick(
$::nova::compute::default_availability_zone,
$default_availability_zone)
$default_schedule_zone_real = pick(
$::nova::compute::default_schedule_zone,
$default_schedule_zone)
$internal_service_availability_zone_real = pick(
$::nova::compute::internal_service_availability_zone,
$internal_service_availability_zone)
nova_config { nova_config {
'DEFAULT/default_availability_zone': value => $default_availability_zone_real; 'DEFAULT/default_availability_zone': value => $default_availability_zone;
'DEFAULT/default_schedule_zone': value => $default_schedule_zone_real; 'DEFAULT/default_schedule_zone': value => $default_schedule_zone;
'DEFAULT/internal_service_availability_zone': value => $internal_service_availability_zone_real; 'DEFAULT/internal_service_availability_zone': value => $internal_service_availability_zone;
} }
} }

View File

@ -144,25 +144,6 @@
# (optional) Maximum number of live migrations to run in parallel. # (optional) Maximum number of live migrations to run in parallel.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# DEPRECATED PARAMETERS
#
# [*default_availability_zone*]
# (optional) Default compute node availability zone.
# Defaults to undef
#
# [*default_schedule_zone*]
# (optional) Availability zone to use when user doesn't specify one.
# Defaults to undef
#
# [*internal_service_availability_zone*]
# (optional) The availability zone to show internal services under.
# Defaults to undef
#
# [*compute_manager*]
# Deprecated. Compute manager
# The driver that will manage the running instances.
# Defaults to $::os_service_default
#
class nova::compute ( class nova::compute (
$enabled = true, $enabled = true,
$manage_service = true, $manage_service = true,
@ -194,36 +175,11 @@ class nova::compute (
$barbican_endpoint = $::os_service_default, $barbican_endpoint = $::os_service_default,
$barbican_api_version = $::os_service_default, $barbican_api_version = $::os_service_default,
$max_concurrent_live_migrations = $::os_service_default, $max_concurrent_live_migrations = $::os_service_default,
# DEPRECATED PARAMETERS
$default_availability_zone = undef,
$default_schedule_zone = undef,
$internal_service_availability_zone = undef,
$compute_manager = $::os_service_default,
) { ) {
include ::nova::deps include ::nova::deps
include ::nova::params include ::nova::params
if $default_availability_zone {
warning("The default_availability_zone parameter is deprecated and will be removed in a \
future release. Use default_availability_zone parameter of nova class instead.")
}
if $default_schedule_zone {
warning("The default_schedule_zone parameter is deprecated and will be removed in a \
future release. Use default_schedule_zone parameter of nova class instead.")
}
if $internal_service_availability_zone {
warning("The internal_service_availability_zone parameter is deprecated and will be \
removed in a future release. Use internal_service_availability_zone parameter of nova class instead.")
}
if $compute_manager {
warning("compute_manager is marked as deprecated in Nova but still needed when Ironic \
is used. It will be removed once Nova removes it.")
}
$vcpu_pin_set_real = pick(join(any2array($vcpu_pin_set), ','), $::os_service_default) $vcpu_pin_set_real = pick(join(any2array($vcpu_pin_set), ','), $::os_service_default)
# in the case of pci_passthrough, we can't use the same mechanism as vcpu_pin_set because # in the case of pci_passthrough, we can't use the same mechanism as vcpu_pin_set because
@ -247,7 +203,6 @@ is used. It will be removed once Nova removes it.")
nova_config { nova_config {
'DEFAULT/reserved_host_memory_mb': value => $reserved_host_memory; 'DEFAULT/reserved_host_memory_mb': value => $reserved_host_memory;
'DEFAULT/compute_manager': value => $compute_manager;
'DEFAULT/heal_instance_info_cache_interval': value => $heal_instance_info_cache_interval; 'DEFAULT/heal_instance_info_cache_interval': value => $heal_instance_info_cache_interval;
'DEFAULT/pci_passthrough_whitelist': value => $pci_passthrough_real; 'DEFAULT/pci_passthrough_whitelist': value => $pci_passthrough_real;
'DEFAULT/resize_confirm_window': value => $resize_confirm_window; 'DEFAULT/resize_confirm_window': value => $resize_confirm_window;

View File

@ -0,0 +1,6 @@
---
other:
- |
default_availability_zone, default_schedule_zone,
internal_service_availability_zone and compute_manager
were deprecated but are now removed from puppet-nova.

View File

@ -68,10 +68,6 @@ describe 'nova::compute' do
:vncproxy_host => '127.0.0.1', :vncproxy_host => '127.0.0.1',
:force_raw_images => false, :force_raw_images => false,
:reserved_host_memory => '0', :reserved_host_memory => '0',
:compute_manager => 'ironic.nova.compute.manager.ClusteredComputeManager',
:default_availability_zone => 'az1',
:default_schedule_zone => 'az2',
:internal_service_availability_zone => 'az_int1',
:heal_instance_info_cache_interval => '120', :heal_instance_info_cache_interval => '120',
:pci_passthrough => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]", :pci_passthrough => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]",
:config_drive_format => 'vfat', :config_drive_format => 'vfat',
@ -103,7 +99,6 @@ describe 'nova::compute' do
it 'configures ironic in nova.conf' do it 'configures ironic in nova.conf' do
is_expected.to contain_nova_config('DEFAULT/reserved_host_memory_mb').with_value('0') is_expected.to contain_nova_config('DEFAULT/reserved_host_memory_mb').with_value('0')
is_expected.to contain_nova_config('DEFAULT/compute_manager').with_value('ironic.nova.compute.manager.ClusteredComputeManager')
end end
it 'configures barbican service' do it 'configures barbican service' do
@ -123,12 +118,6 @@ describe 'nova::compute' do
) )
end end
it 'configures availability zones' do
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with_value('az1')
is_expected.to contain_nova_config('DEFAULT/default_schedule_zone').with_value('az2')
is_expected.to contain_nova_config('DEFAULT/internal_service_availability_zone').with_value('az_int1')
end
it { is_expected.to contain_nova_config('DEFAULT/heal_instance_info_cache_interval').with_value('120') } it { is_expected.to contain_nova_config('DEFAULT/heal_instance_info_cache_interval').with_value('120') }
it { is_expected.to contain_nova_config('DEFAULT/force_raw_images').with(:value => false) } it { is_expected.to contain_nova_config('DEFAULT/force_raw_images').with(:value => false) }