libvirt: allow any binding for vncserver_listen

This change in Nova:
https://review.openstack.org/#/c/73428/

... means that we no longer need to restrict vncserver_listen parameter
to be configured on a certain binding.

Remove this restriction so deployments can set the compute IP instead of
0.0.0.0.

Closes-Bug: #1660099
Change-Id: I3fa050f94f9c95221bb71e16c70ad9128f8684dc
This commit is contained in:
Emilien Macchi 2017-01-30 10:33:21 -05:00
parent 8ed37b9c6f
commit 1412985743
3 changed files with 7 additions and 24 deletions

View File

@ -171,11 +171,7 @@ class nova::compute::libvirt (
}
if $migration_support {
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\' or \'::0\'')
} else {
include ::nova::migration::libvirt
}
include ::nova::migration::libvirt
}
# manage_libvirt_services is here for backward compatibility to support

View File

@ -0,0 +1,6 @@
---
fixes:
- Fixes `bug 1660099
<https://bugs.launchpad.net/puppet-nova/+bug/1660099>`__ so we don't restrict
vncserver_listen to be binded on 0.0.0.0, which has been wrong for long time.
Nova allows to bind on any IP and live migration will be supported.

View File

@ -170,16 +170,6 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
end
context 'with vncserver_listen not set to 0.0.0.0' do
let :params do
{ :vncserver_listen => '127.0.0.1',
:migration_support => true }
end
it { expect { is_expected.to 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' or '::0'/) }
end
context 'with custom libvirt service name on Debian platforms' do
let :params do
{ :libvirt_service_name => 'libvirtd',
@ -322,15 +312,6 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
end
context 'with vncserver_listen not set to 0.0.0.0' do
let :params do
{ :vncserver_listen => '127.0.0.1',
:migration_support => true }
end
it { expect { is_expected.to 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'/) }
end
end
describe 'when manage_libvirt_services is set to false' do