Deprecate migration flags parameters
The correct live and block migration flags can be inferred from the new live_migration_tunnelled config option. live_migration_flag and block_migration_flag will be removed to avoid potential misconfiguration. Change-Id: I523d351900ee7852875e94e1d5d5cffb76935f11
This commit is contained in:
parent
f040ced872
commit
b11b93405e
@ -13,14 +13,6 @@
|
||||
# Valid options are none and sasl.
|
||||
# Defaults to 'none'
|
||||
#
|
||||
# [*live_migration_flag*]
|
||||
# (optional) Migration flags to be set for live migration (string value)
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*block_migration_flag*]
|
||||
# (optional) Migration flags to be set for block migration (string value)
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*live_migration_tunnelled*]
|
||||
# (optional) Whether to use tunnelled migration, where migration data is
|
||||
# transported over the libvirtd connection.
|
||||
@ -44,15 +36,26 @@
|
||||
# (optional) Whether or not configure libvirt bits.
|
||||
# Defaults to true.
|
||||
#
|
||||
#DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*live_migration_flag*]
|
||||
# (optional) Migration flags to be set for live migration (string value)
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*block_migration_flag*]
|
||||
# (optional) Migration flags to be set for block migration (string value)
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova::migration::libvirt(
|
||||
$use_tls = false,
|
||||
$auth = 'none',
|
||||
$live_migration_flag = undef,
|
||||
$block_migration_flag = undef,
|
||||
$live_migration_tunnelled = $::os_service_default,
|
||||
$override_uuid = false,
|
||||
$configure_libvirt = true,
|
||||
$configure_nova = true,
|
||||
#DEPRECATED PARAMETERS
|
||||
$live_migration_flag = undef,
|
||||
$block_migration_flag = undef,
|
||||
){
|
||||
|
||||
include ::nova::deps
|
||||
@ -67,23 +70,20 @@ class nova::migration::libvirt(
|
||||
$listen_tcp = '1'
|
||||
}
|
||||
|
||||
if $live_migration_flag {
|
||||
warning('live_migration_flag parameter is deprecated, has no effect and will be removed in a future release.')
|
||||
}
|
||||
|
||||
if $block_migration_flag {
|
||||
warning('block_migration_flag parameter is deprecated, has no effect and will be removed in a future release.')
|
||||
}
|
||||
|
||||
if $configure_nova {
|
||||
if $use_tls {
|
||||
nova_config {
|
||||
'libvirt/live_migration_uri': value => 'qemu+tls://%s/system';
|
||||
}
|
||||
}
|
||||
if $live_migration_flag {
|
||||
nova_config {
|
||||
'libvirt/live_migration_flag': value => $live_migration_flag
|
||||
}
|
||||
}
|
||||
|
||||
if $block_migration_flag {
|
||||
nova_config {
|
||||
'libvirt/block_migration_flag': value => $block_migration_flag
|
||||
}
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'libvirt/live_migration_tunnelled': value => $live_migration_tunnelled
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- The live_migration_flag and block_migration_flag parameters
|
||||
are deprecated.
|
@ -80,13 +80,9 @@ describe 'nova::migration::libvirt' do
|
||||
context 'with migration flags set' do
|
||||
let :params do
|
||||
{
|
||||
:live_migration_flag => 'live migration flag',
|
||||
:block_migration_flag => 'block migration flag',
|
||||
:live_migration_tunnelled => true,
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_flag').with(:value => 'live migration flag') }
|
||||
it { is_expected.to contain_nova_config('libvirt/block_migration_flag').with(:value => 'block migration flag') }
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_tunnelled').with(:value => true) }
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user