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:
@@ -13,14 +13,6 @@
|
|||||||
# Valid options are none and sasl.
|
# Valid options are none and sasl.
|
||||||
# Defaults to 'none'
|
# 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*]
|
# [*live_migration_tunnelled*]
|
||||||
# (optional) Whether to use tunnelled migration, where migration data is
|
# (optional) Whether to use tunnelled migration, where migration data is
|
||||||
# transported over the libvirtd connection.
|
# transported over the libvirtd connection.
|
||||||
@@ -44,15 +36,26 @@
|
|||||||
# (optional) Whether or not configure libvirt bits.
|
# (optional) Whether or not configure libvirt bits.
|
||||||
# Defaults to true.
|
# 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(
|
class nova::migration::libvirt(
|
||||||
$use_tls = false,
|
$use_tls = false,
|
||||||
$auth = 'none',
|
$auth = 'none',
|
||||||
$live_migration_flag = undef,
|
|
||||||
$block_migration_flag = undef,
|
|
||||||
$live_migration_tunnelled = $::os_service_default,
|
$live_migration_tunnelled = $::os_service_default,
|
||||||
$override_uuid = false,
|
$override_uuid = false,
|
||||||
$configure_libvirt = true,
|
$configure_libvirt = true,
|
||||||
$configure_nova = true,
|
$configure_nova = true,
|
||||||
|
#DEPRECATED PARAMETERS
|
||||||
|
$live_migration_flag = undef,
|
||||||
|
$block_migration_flag = undef,
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::nova::deps
|
include ::nova::deps
|
||||||
@@ -67,23 +70,20 @@ class nova::migration::libvirt(
|
|||||||
$listen_tcp = '1'
|
$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 $configure_nova {
|
||||||
if $use_tls {
|
if $use_tls {
|
||||||
nova_config {
|
nova_config {
|
||||||
'libvirt/live_migration_uri': value => 'qemu+tls://%s/system';
|
'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 {
|
nova_config {
|
||||||
'libvirt/live_migration_tunnelled': value => $live_migration_tunnelled
|
'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
|
context 'with migration flags set' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:live_migration_flag => 'live migration flag',
|
|
||||||
:block_migration_flag => 'block migration flag',
|
|
||||||
:live_migration_tunnelled => true,
|
:live_migration_tunnelled => true,
|
||||||
}
|
}
|
||||||
end
|
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) }
|
it { is_expected.to contain_nova_config('libvirt/live_migration_tunnelled').with(:value => true) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user