Add live_migration_tunnelled parameter
Add the parameter in order to Whether to use tunnelled migration, where migration data is transported over the libvirtd connection. Change-Id: I3498076b292e9dff88b9ad9d5c65c99a2a98cd7f
This commit is contained in:
parent
13d6327fd8
commit
f7da3d0dcf
|
@ -21,16 +21,28 @@
|
|||
# (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.
|
||||
# If True, we use the VIR_MIGRATE_TUNNELLED migration flag, avoiding the
|
||||
# need to configure the network to allow direct hypervisor to hypervisor
|
||||
# communication.
|
||||
# If False, use the native transport.
|
||||
# If not set, Nova will choose a sensible default based on, for example
|
||||
# the availability of native encryption support in the hypervisor.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*override_uuid*]
|
||||
# (optional) Set uuid not equal to output from dmidecode (boolean)
|
||||
# Defaults to false
|
||||
#
|
||||
class nova::migration::libvirt(
|
||||
$use_tls = false,
|
||||
$auth = 'none',
|
||||
$live_migration_flag = undef,
|
||||
$block_migration_flag = undef,
|
||||
$override_uuid = false,
|
||||
$use_tls = false,
|
||||
$auth = 'none',
|
||||
$live_migration_flag = undef,
|
||||
$block_migration_flag = undef,
|
||||
$live_migration_tunnelled = $::os_service_default,
|
||||
$override_uuid = false,
|
||||
){
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -48,16 +60,20 @@ class nova::migration::libvirt(
|
|||
|
||||
if $live_migration_flag {
|
||||
nova_config {
|
||||
'libvirt/live_migration_flag': value => $live_migration_flag
|
||||
'libvirt/live_migration_flag': value => $live_migration_flag
|
||||
}
|
||||
}
|
||||
|
||||
if $block_migration_flag {
|
||||
nova_config {
|
||||
'libvirt/block_migration_flag': value => $block_migration_flag
|
||||
'libvirt/block_migration_flag': value => $block_migration_flag
|
||||
}
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'libvirt/live_migration_tunnelled': value => $live_migration_tunnelled
|
||||
}
|
||||
|
||||
validate_re($auth, [ '^sasl$', '^none$' ], 'Valid options for auth are none and sasl.')
|
||||
|
||||
Anchor['nova::config::begin']
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- Add live_migration_tunnelled option in order to Whether to use
|
||||
tunnelled migration, where migration data is transported over
|
||||
the libvirtd connection.
|
|
@ -44,6 +44,7 @@ describe 'nova::migration::libvirt' do
|
|||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tcp').with(:line => "listen_tcp = 1") }
|
||||
it { is_expected.not_to contain_file_line('/etc/libvirt/libvirtd.conf auth_tls')}
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_tunnelled').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
||||
context 'with override_uuid enabled' do
|
||||
|
@ -79,12 +80,14 @@ 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_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
|
||||
|
||||
context 'with auth set to sasl' do
|
||||
|
|
Loading…
Reference in New Issue