IPv6 support for migration check.
This enables the use of the '::0' IPv6 address for the vncserver_listen parameter. class { 'nova::compute::libvirt': vncserver_listen => '::0', migration_support => true, } Change-Id: Iec69a82c6a7bbf1b0f7364e87e1e3e37a876be9a Closes-Bug: rhbz#1185652
This commit is contained in:
@@ -132,8 +132,8 @@ class nova::compute::libvirt (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $migration_support {
|
if $migration_support {
|
||||||
if $vncserver_listen != '0.0.0.0' {
|
if $vncserver_listen != '0.0.0.0' and $vncserver_listen != '::0' {
|
||||||
fail('For migration support to work, you MUST set vncserver_listen to \'0.0.0.0\'')
|
fail('For migration support to work, you MUST set vncserver_listen to \'0.0.0.0\' or \'::0\'')
|
||||||
} else {
|
} else {
|
||||||
class { '::nova::migration::libvirt': }
|
class { '::nova::migration::libvirt': }
|
||||||
}
|
}
|
||||||
|
@@ -92,6 +92,17 @@ describe 'nova::compute::libvirt' do
|
|||||||
it { should contain_file_line('/etc/default/libvirt-bin libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') }
|
it { should contain_file_line('/etc/default/libvirt-bin libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with vncserver_listen set to ::0' do
|
||||||
|
let :params do
|
||||||
|
{ :vncserver_listen => '::0',
|
||||||
|
:migration_support => true }
|
||||||
|
end
|
||||||
|
|
||||||
|
it { should contain_class('nova::migration::libvirt')}
|
||||||
|
it { should contain_nova_config('DEFAULT/vncserver_listen').with_value('::0')}
|
||||||
|
it { should contain_file_line('/etc/default/libvirt-bin libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') }
|
||||||
|
end
|
||||||
|
|
||||||
context 'with vncserver_listen not set to 0.0.0.0' do
|
context 'with vncserver_listen not set to 0.0.0.0' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :vncserver_listen => '127.0.0.1',
|
{ :vncserver_listen => '127.0.0.1',
|
||||||
@@ -99,7 +110,7 @@ describe 'nova::compute::libvirt' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it { expect { should contain_class('nova::compute::libvirt') }.to \
|
it { expect { should contain_class('nova::compute::libvirt') }.to \
|
||||||
raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0'/) }
|
raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0' or '::0'/) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with custom libvirt service name on Debian platforms' do
|
context 'with custom libvirt service name on Debian platforms' do
|
||||||
|
Reference in New Issue
Block a user