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
(cherry picked from commit 1412985743)
Emilien Macchi 2 years ago
parent
commit
3d31b1a104

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

@@ -151,11 +151,7 @@ class nova::compute::libvirt (
151 151
   }
152 152
 
153 153
   if $migration_support {
154
-    if $vncserver_listen != '0.0.0.0' and $vncserver_listen != '::0' {
155
-      fail('For migration support to work, you MUST set vncserver_listen to \'0.0.0.0\' or \'::0\'')
156
-    } else {
157
-      include ::nova::migration::libvirt
158
-    }
154
+    include ::nova::migration::libvirt
159 155
   }
160 156
 
161 157
   # 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

@@ -163,16 +163,6 @@ describe 'nova::compute::libvirt' do
163 163
         it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
164 164
       end
165 165
 
166
-      context 'with vncserver_listen not set to 0.0.0.0' do
167
-        let :params do
168
-          { :vncserver_listen  => '127.0.0.1',
169
-            :migration_support => true }
170
-        end
171
-
172
-        it { expect { is_expected.to contain_class('nova::compute::libvirt') }.to \
173
-          raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0' or '::0'/) }
174
-      end
175
-
176 166
       context 'with custom libvirt service name on Debian platforms' do
177 167
         let :params do
178 168
           { :libvirt_service_name  => 'libvirtd',
@@ -315,15 +305,6 @@ describe 'nova::compute::libvirt' do
315 305
         it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
316 306
       end
317 307
 
318
-      context 'with vncserver_listen not set to 0.0.0.0' do
319
-        let :params do
320
-          { :vncserver_listen  => '127.0.0.1',
321
-            :migration_support => true }
322
-        end
323
-
324
-        it { expect { is_expected.to contain_class('nova::compute::libvirt') }.to \
325
-          raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0'/) }
326
-      end
327 308
     end
328 309
 
329 310
     describe 'when manage_libvirt_services is set to false' do

Loading…
Cancel
Save