Deprecate nova::compute::allow_resize_to_same_host
In nova, the [compute]allow_resize_to_same_host parameter is only used by nova-api process, thus the parameter should be set at the node where nova-api is running. Because we alreday have the nova::api::allow_resize_to_same_host parameter to set that parameter for nova-api, we can deprecate the allow_resize_to_same_host parameter in nova::compute, which is almost useless now. Change-Id: Id58b4dad29a6ea0f2998d8e41aa09ba0037ea94c
This commit is contained in:
@@ -79,12 +79,6 @@
|
|||||||
# (optional) Config drive format. One of iso9660 (default) or vfat
|
# (optional) Config drive format. One of iso9660 (default) or vfat
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
# [*allow_resize_to_same_host*]
|
|
||||||
# (optional) Allow destination machine to match source for resize.
|
|
||||||
# Useful when testing in single-host environments. Note that this
|
|
||||||
# can also be set in the api.pp class.
|
|
||||||
# Defaults to false
|
|
||||||
#
|
|
||||||
# [*resize_confirm_window*]
|
# [*resize_confirm_window*]
|
||||||
# (optional) Automatically confirm resizes after N seconds.
|
# (optional) Automatically confirm resizes after N seconds.
|
||||||
# Resize functionality will save the existing server before resizing.
|
# Resize functionality will save the existing server before resizing.
|
||||||
@@ -207,6 +201,12 @@
|
|||||||
# pinned and unpinned instances on the same host.
|
# pinned and unpinned instances on the same host.
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
# [*allow_resize_to_same_host*]
|
||||||
|
# (optional) Allow destination machine to match source for resize.
|
||||||
|
# Useful when testing in single-host environments. Note that generally
|
||||||
|
# this should be set in the api.pp class instead.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class nova::compute (
|
class nova::compute (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
@@ -226,7 +226,6 @@ class nova::compute (
|
|||||||
$reserved_host_memory = '512',
|
$reserved_host_memory = '512',
|
||||||
$heal_instance_info_cache_interval = '60',
|
$heal_instance_info_cache_interval = '60',
|
||||||
$config_drive_format = $::os_service_default,
|
$config_drive_format = $::os_service_default,
|
||||||
$allow_resize_to_same_host = false,
|
|
||||||
$resize_confirm_window = $::os_service_default,
|
$resize_confirm_window = $::os_service_default,
|
||||||
$cpu_shared_set = $::os_service_default,
|
$cpu_shared_set = $::os_service_default,
|
||||||
$cpu_dedicated_set = $::os_service_default,
|
$cpu_dedicated_set = $::os_service_default,
|
||||||
@@ -250,6 +249,7 @@ class nova::compute (
|
|||||||
$neutron_enabled = undef,
|
$neutron_enabled = undef,
|
||||||
$install_bridge_utils = undef,
|
$install_bridge_utils = undef,
|
||||||
$vcpu_pin_set = undef,
|
$vcpu_pin_set = undef,
|
||||||
|
$allow_resize_to_same_host = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
@@ -282,6 +282,11 @@ class nova::compute (
|
|||||||
warning('vcpu_pin_set is deprecated, instead use cpu_dedicated_set or cpu_shared_set.')
|
warning('vcpu_pin_set is deprecated, instead use cpu_dedicated_set or cpu_shared_set.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $allow_resize_to_same_host != undef {
|
||||||
|
warning('allow_resize_to_same_host is deprecated, and has no effect. \
|
||||||
|
Use the same parameter in nova::api class.')
|
||||||
|
}
|
||||||
|
|
||||||
if empty($vcpu_pin_set) {
|
if empty($vcpu_pin_set) {
|
||||||
$vcpu_pin_set_real = undef
|
$vcpu_pin_set_real = undef
|
||||||
} else {
|
} else {
|
||||||
@@ -382,8 +387,6 @@ class nova::compute (
|
|||||||
'compute/max_disk_devices_to_attach': value => $max_disk_devices_to_attach;
|
'compute/max_disk_devices_to_attach': value => $max_disk_devices_to_attach;
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure_resource('nova_config', 'DEFAULT/allow_resize_to_same_host', { value => $allow_resize_to_same_host })
|
|
||||||
|
|
||||||
if ($vnc_enabled) {
|
if ($vnc_enabled) {
|
||||||
include nova::vncproxy::common
|
include nova::vncproxy::common
|
||||||
|
|
||||||
|
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The nova::compute::allow_resize_to_same_host parameter is deprecated and
|
||||||
|
has no effect now, because its actual parameter in nova is used only by
|
||||||
|
nova-api. Use nova::api::allow_resize_to_same_host instead to set the
|
||||||
|
parameter at the node where nova-api is actually running.
|
@@ -24,7 +24,6 @@ describe 'nova::compute' do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with(:value => 'false') }
|
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/resize_confirm_window').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('DEFAULT/resize_confirm_window').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to_not contain_nova_config('vnc/novncproxy_base_url') }
|
it { is_expected.to_not contain_nova_config('vnc/novncproxy_base_url') }
|
||||||
|
Reference in New Issue
Block a user