Add support for more migration parameters
Change-Id: I4a6c05e47a0e1ce2e6498a2ccbf075e0f1216335
(cherry picked from commit 9f8c4c9785
)
This commit is contained in:
parent
8ab5642322
commit
f0a7c5a64a
|
@ -51,6 +51,22 @@
|
||||||
# to 0 to disable timeouts.
|
# to 0 to disable timeouts.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*live_migration_permit_post_copy*]
|
||||||
|
# (optional) This option allows nova to switch an on-going live migration
|
||||||
|
# to post-copy mode, i.e., switch the active VM to the one on the destination
|
||||||
|
# node before the migration is complete, therefore ensuring an upper bound
|
||||||
|
# on the memory that needs to be transferred.
|
||||||
|
# Post-copy requires libvirt>=1.3.3 and QEMU>=2.5.0.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*live_migration_permit_auto_converge*]
|
||||||
|
# (optional) This option allows nova to start live migration with auto
|
||||||
|
# converge on. Auto converge throttles down CPU if a progress of on-going
|
||||||
|
# live migration is slow. Auto converge will only be used if this flag is
|
||||||
|
# set to True and post copy is not permitted or post copy is unavailable
|
||||||
|
# due to the version of libvirt and QEMU in use.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*override_uuid*]
|
# [*override_uuid*]
|
||||||
# (optional) Set uuid not equal to output from dmidecode (boolean)
|
# (optional) Set uuid not equal to output from dmidecode (boolean)
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
|
@ -95,22 +111,24 @@
|
||||||
# Defaults to ::nova::compute::libvirt::version::default
|
# Defaults to ::nova::compute::libvirt::version::default
|
||||||
#
|
#
|
||||||
class nova::migration::libvirt(
|
class nova::migration::libvirt(
|
||||||
$transport = undef,
|
$transport = undef,
|
||||||
$auth = 'none',
|
$auth = 'none',
|
||||||
$listen_address = undef,
|
$listen_address = undef,
|
||||||
$live_migration_inbound_addr = $::os_service_default,
|
$live_migration_inbound_addr = $::os_service_default,
|
||||||
$live_migration_tunnelled = $::os_service_default,
|
$live_migration_tunnelled = $::os_service_default,
|
||||||
$live_migration_with_native_tls = $::os_service_default,
|
$live_migration_with_native_tls = $::os_service_default,
|
||||||
$live_migration_completion_timeout = $::os_service_default,
|
$live_migration_completion_timeout = $::os_service_default,
|
||||||
$override_uuid = false,
|
$live_migration_permit_post_copy = $::os_service_default,
|
||||||
$configure_libvirt = true,
|
$live_migration_permit_auto_converge = $::os_service_default,
|
||||||
$configure_nova = true,
|
$override_uuid = false,
|
||||||
$client_user = undef,
|
$configure_libvirt = true,
|
||||||
$client_port = undef,
|
$configure_nova = true,
|
||||||
$client_extraparams = {},
|
$client_user = undef,
|
||||||
$ca_file = undef,
|
$client_port = undef,
|
||||||
$crl_file = undef,
|
$client_extraparams = {},
|
||||||
$libvirt_version = $::nova::compute::libvirt::version::default,
|
$ca_file = undef,
|
||||||
|
$crl_file = undef,
|
||||||
|
$libvirt_version = $::nova::compute::libvirt::version::default,
|
||||||
) inherits nova::compute::libvirt::version {
|
) inherits nova::compute::libvirt::version {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
|
@ -165,11 +183,13 @@ class nova::migration::libvirt(
|
||||||
$live_migration_uri = "qemu+${transport_real}://${prefix}%s${postfix}/system${extra_params}"
|
$live_migration_uri = "qemu+${transport_real}://${prefix}%s${postfix}/system${extra_params}"
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'libvirt/live_migration_uri': value => $live_migration_uri;
|
'libvirt/live_migration_uri': value => $live_migration_uri;
|
||||||
'libvirt/live_migration_tunnelled': value => $live_migration_tunnelled;
|
'libvirt/live_migration_tunnelled': value => $live_migration_tunnelled;
|
||||||
'libvirt/live_migration_with_native_tls': value => $live_migration_with_native_tls;
|
'libvirt/live_migration_with_native_tls': value => $live_migration_with_native_tls;
|
||||||
'libvirt/live_migration_completion_timeout': value => $live_migration_completion_timeout;
|
'libvirt/live_migration_completion_timeout': value => $live_migration_completion_timeout;
|
||||||
'libvirt/live_migration_inbound_addr': value => $live_migration_inbound_addr;
|
'libvirt/live_migration_inbound_addr': value => $live_migration_inbound_addr;
|
||||||
|
'libvirt/live_migration_permit_post_copy': value => $live_migration_permit_post_copy;
|
||||||
|
'libvirt/live_migration_permit_auto_converge': value => $live_migration_permit_auto_converge;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``nova::migration::libvirt::live_migration_permit_post_copy``
|
||||||
|
parameter has been added to support post copy mode in live migration.
|
||||||
|
- |
|
||||||
|
The new ``nova::migration::libvirt::live_migration_permit_auto_converge``
|
||||||
|
parameter has been added to support auto converge in live migration.
|
|
@ -51,6 +51,8 @@ describe 'nova::migration::libvirt' do
|
||||||
it { is_expected.to contain_nova_config('libvirt/live_migration_completion_timeout').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('libvirt/live_migration_completion_timeout').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('libvirt/live_migration_uri').with_value('qemu+tcp://%s/system') }
|
it { is_expected.to contain_nova_config('libvirt/live_migration_uri').with_value('qemu+tcp://%s/system') }
|
||||||
it { is_expected.to contain_nova_config('libvirt/live_migration_inbound_addr').with_value('<SERVICE DEFAULT>')}
|
it { is_expected.to contain_nova_config('libvirt/live_migration_inbound_addr').with_value('<SERVICE DEFAULT>')}
|
||||||
|
it { is_expected.to contain_nova_config('libvirt/live_migration_permit_post_copy').with_value('<SERVICE DEFAULT>')}
|
||||||
|
it { is_expected.to contain_nova_config('libvirt/live_migration_permit_auto_converge').with_value('<SERVICE DEFAULT>')}
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with override_uuid enabled' do
|
context 'with override_uuid enabled' do
|
||||||
|
@ -118,6 +120,17 @@ describe 'nova::migration::libvirt' do
|
||||||
it { is_expected.to contain_nova_config('libvirt/live_migration_completion_timeout').with_value('1500') }
|
it { is_expected.to contain_nova_config('libvirt/live_migration_completion_timeout').with_value('1500') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with live migration auto converge on' do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
:live_migration_permit_post_copy => false,
|
||||||
|
:live_migration_permit_auto_converge => true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
it { is_expected.to contain_nova_config('libvirt/live_migration_permit_post_copy').with(:value => false) }
|
||||||
|
it { is_expected.to contain_nova_config('libvirt/live_migration_permit_auto_converge').with(:value => true) }
|
||||||
|
end
|
||||||
|
|
||||||
context 'with auth set to sasl' do
|
context 'with auth set to sasl' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue