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
52c14a97b7

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

@@ -154,11 +154,7 @@ class nova::compute::libvirt (
154 154
   }
155 155
 
156 156
   if $migration_support {
157
-    if $vncserver_listen != '0.0.0.0' and $vncserver_listen != '::0' {
158
-      fail('For migration support to work, you MUST set vncserver_listen to \'0.0.0.0\' or \'::0\'')
159
-    } else {
160
-      include ::nova::migration::libvirt
161
-    }
157
+    include ::nova::migration::libvirt
162 158
   }
163 159
 
164 160
   if $::osfamily == 'RedHat' {

+ 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

@@ -145,16 +145,6 @@ describe 'nova::compute::libvirt' do
145 145
         it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
146 146
       end
147 147
 
148
-      context 'with vncserver_listen not set to 0.0.0.0' do
149
-        let :params do
150
-          { :vncserver_listen  => '127.0.0.1',
151
-            :migration_support => true }
152
-        end
153
-
154
-        it { expect { is_expected.to contain_class('nova::compute::libvirt') }.to \
155
-          raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0' or '::0'/) }
156
-      end
157
-
158 148
       context 'with custom libvirt service name on Debian platforms' do
159 149
         let :params do
160 150
           { :libvirt_service_name  => 'libvirtd',
@@ -290,15 +280,6 @@ describe 'nova::compute::libvirt' do
290 280
         it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf auth_tcp').with(:line => "auth_tcp = \"none\"") }
291 281
       end
292 282
 
293
-      context 'with vncserver_listen not set to 0.0.0.0' do
294
-        let :params do
295
-          { :vncserver_listen  => '127.0.0.1',
296
-            :migration_support => true }
297
-        end
298
-
299
-        it { expect { is_expected.to contain_class('nova::compute::libvirt') }.to \
300
-          raise_error(Puppet::Error, /For migration support to work, you MUST set vncserver_listen to '0.0.0.0'/) }
301
-      end
302 283
     end
303 284
 
304 285
     describe 'with default parameters on Fedora' do

Loading…
Cancel
Save