Browse Source

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
tags/10.3.0
Emilien Macchi 2 years ago
parent
commit
1412985743

+ 1
- 5
manifests/compute/libvirt.pp View File

@@ -171,11 +171,7 @@ class nova::compute::libvirt (
171 171
   }
172 172
 
173 173
   if $migration_support {
174
-    if $vncserver_listen != '0.0.0.0' and $vncserver_listen != '::0' {
175
-      fail('For migration support to work, you MUST set vncserver_listen to \'0.0.0.0\' or \'::0\'')
176
-    } else {
177
-      include ::nova::migration::libvirt
178
-    }
174
+    include ::nova::migration::libvirt
179 175
   }
180 176
 
181 177
   # manage_libvirt_services is here for backward compatibility to support

+ 6
- 0
releasenotes/notes/fix_vncserver_listen-e48f7c8b9cda25e4.yaml View File

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

+ 0
- 19
spec/classes/nova_compute_libvirt_spec.rb View File

@@ -170,16 +170,6 @@ describe 'nova::compute::libvirt' do
170 170
         it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
171 171
       end
172 172
 
173
-      context 'with vncserver_listen not set to 0.0.0.0' do
174
-        let :params do
175
-          { :vncserver_listen  => '127.0.0.1',
176
-            :migration_support => true }
177
-        end
178
-
179
-        it { expect { is_expected.to contain_class('nova::compute::libvirt') }.to \
180
-          raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0' or '::0'/) }
181
-      end
182
-
183 173
       context 'with custom libvirt service name on Debian platforms' do
184 174
         let :params do
185 175
           { :libvirt_service_name  => 'libvirtd',
@@ -322,15 +312,6 @@ describe 'nova::compute::libvirt' do
322 312
         it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
323 313
       end
324 314
 
325
-      context 'with vncserver_listen not set to 0.0.0.0' do
326
-        let :params do
327
-          { :vncserver_listen  => '127.0.0.1',
328
-            :migration_support => true }
329
-        end
330
-
331
-        it { expect { is_expected.to contain_class('nova::compute::libvirt') }.to \
332
-          raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0'/) }
333
-      end
334 315
     end
335 316
 
336 317
     describe 'when manage_libvirt_services is set to false' do

Loading…
Cancel
Save