Allow live_migration_inbound_addr to be used with non-default port/user/extra_params
live_migration_scheme was being used when live_migration_inbound_addr was set. This prohibits a non-default port/user/extra_params being used, which is often required to fully describe the uri, particularly for the ssh transport (see bug#1671288). However live_migration_inbound_addr also works with live_migration_uri, so for now revert back to using live_migration_uri in all cases. Change-Id: Ifdc5fbd05195604ab6ea6564d0905f9385c6df67 Closes-Bug: #1765462
This commit is contained in:
parent
64b42d1d47
commit
d7b85da651
@ -20,10 +20,7 @@
|
||||
#
|
||||
# [*live_migration_inbound_addr*]
|
||||
# (optional) The IP address or hostname to be used as the target for live
|
||||
# migration traffic. If left unset, and if TLS is enabled, this module will
|
||||
# default the 'live_migration_uri' to 'qemu+tls://%s/system' to be compatible
|
||||
# with the previous behavior of this module. However, the usage of
|
||||
# 'live_migration_uri' is not recommended as it's scheduled for removal.
|
||||
# migration traffic.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*live_migration_tunnelled*]
|
||||
@ -146,20 +143,13 @@ class nova::migration::libvirt(
|
||||
$extra_params =''
|
||||
}
|
||||
|
||||
if is_service_default($live_migration_inbound_addr) {
|
||||
$live_migration_uri = "qemu+${transport_real}://${prefix}%s${postfix}/system${extra_params}"
|
||||
$live_migration_scheme = $::os_service_default
|
||||
} else {
|
||||
$live_migration_uri = $::os_service_default
|
||||
$live_migration_scheme = $transport_real
|
||||
}
|
||||
$live_migration_uri = "qemu+${transport_real}://${prefix}%s${postfix}/system${extra_params}"
|
||||
|
||||
nova_config {
|
||||
'libvirt/live_migration_uri': value => $live_migration_uri;
|
||||
'libvirt/live_migration_tunnelled': value => $live_migration_tunnelled;
|
||||
'libvirt/live_migration_completion_timeout': value => $live_migration_completion_timeout;
|
||||
'libvirt/live_migration_inbound_addr': value => $live_migration_inbound_addr;
|
||||
'libvirt/live_migration_scheme': value => $live_migration_scheme;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fix live_migration_inbound_addr when used with non-default port/user/extra_params
|
||||
|
||||
live_migration_scheme was being used when live_migration_inbound_addr was set.
|
||||
This prohibits a non-default port/user/extra_params being used which is often
|
||||
required to fully describe the uri, particularly for the ssh transport
|
||||
(see https://bugs.launchpad.net/nova/+bug/1671288).
|
||||
|
||||
However live_migration_inbound_addr also works with live_migration_uri, so for
|
||||
now revert back to using live_migration_uri in all cases.
|
@ -48,7 +48,6 @@ 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_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_scheme').with_value('<SERVICE DEFAULT>')}
|
||||
end
|
||||
|
||||
context 'with override_uuid enabled' do
|
||||
@ -80,7 +79,6 @@ describe 'nova::migration::libvirt' do
|
||||
it { is_expected.not_to contain_libvirtd_config('auth_tcp') }
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_uri').with_value('qemu+tls://%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_scheme').with_value('<SERVICE DEFAULT>')}
|
||||
end
|
||||
|
||||
context 'with tls enabled' do
|
||||
@ -107,9 +105,8 @@ describe 'nova::migration::libvirt' do
|
||||
it { is_expected.to contain_libvirtd_config('listen_tcp').with_value('0') }
|
||||
it { is_expected.to contain_libvirtd_config('auth_tls').with_value("\"none\"") }
|
||||
it { is_expected.not_to contain_libvirtd_config('auth_tcp') }
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_uri').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_uri').with_value('qemu+tls://%s/system')}
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_inbound_addr').with_value('host1.example.com')}
|
||||
it { is_expected.to contain_nova_config('libvirt/live_migration_scheme').with_value('tls')}
|
||||
end
|
||||
|
||||
context 'with migration flags set' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user