From 52c14a97b73a9f7c4a6d1475f12dbbcc77581d8a Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 30 Jan 2017 10:33:21 -0500 Subject: [PATCH] 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 14129857431f78d5c25dbd71b5682c9cd789ae1a) --- manifests/compute/libvirt.pp | 6 +----- ...fix_vncserver_listen-e48f7c8b9cda25e4.yaml | 6 ++++++ spec/classes/nova_compute_libvirt_spec.rb | 19 ------------------- 3 files changed, 7 insertions(+), 24 deletions(-) create mode 100644 releasenotes/notes/fix_vncserver_listen-e48f7c8b9cda25e4.yaml diff --git a/manifests/compute/libvirt.pp b/manifests/compute/libvirt.pp index 352a51322..b323ef785 100644 --- a/manifests/compute/libvirt.pp +++ b/manifests/compute/libvirt.pp @@ -154,11 +154,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 } if $::osfamily == 'RedHat' { diff --git a/releasenotes/notes/fix_vncserver_listen-e48f7c8b9cda25e4.yaml b/releasenotes/notes/fix_vncserver_listen-e48f7c8b9cda25e4.yaml new file mode 100644 index 000000000..3d1d7b0d8 --- /dev/null +++ b/releasenotes/notes/fix_vncserver_listen-e48f7c8b9cda25e4.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - Fixes `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. diff --git a/spec/classes/nova_compute_libvirt_spec.rb b/spec/classes/nova_compute_libvirt_spec.rb index 1ebe9f495..e855be874 100644 --- a/spec/classes/nova_compute_libvirt_spec.rb +++ b/spec/classes/nova_compute_libvirt_spec.rb @@ -145,16 +145,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', @@ -290,15 +280,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 'with default parameters on Fedora' do