Browse Source

Merge "Fix libvirt version discovery for CentOS Stream" into stable/victoria

changes/39/773839/1
Zuul 6 months ago
committed by Gerrit Code Review
parent
commit
86ccadcd80
  1. 2
      manifests/compute/libvirt/version.pp
  2. 14
      spec/classes/nova_compute_libvirt_spec.rb

2
manifests/compute/libvirt/version.pp

@ -11,7 +11,7 @@ class nova::compute::libvirt::version {
'RedHat': {
case $facts['os']['name'] {
'RedHat', 'CentOS': {
if versioncmp($facts['os']['release']['full'], '8.1') >= 0 {
if versioncmp($facts['os']['release']['full'], '8') >= 0 {
$default = '5.6'
} elsif versioncmp($facts['os']['release']['full'], '7.6') >= 0 {
$default = '4.5'

14
spec/classes/nova_compute_libvirt_spec.rb

@ -219,7 +219,6 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_class('nova::migration::libvirt')}
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('0.0.0.0')}
it { is_expected.to contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => libvirt_options) }
end
context 'with vncserver_listen set to ::0' do
@ -230,17 +229,6 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_class('nova::migration::libvirt')}
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('::0')}
it { is_expected.to contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => libvirt_options) }
end
context 'with custom libvirt service name on Debian platforms' do
let :params do
{ :libvirt_service_name => 'libvirtd',
:vncserver_listen => '0.0.0.0',
:migration_support => true }
end
it { is_expected.to contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => libvirt_options) }
end
end
@ -351,7 +339,6 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_class('nova::migration::libvirt')}
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('0.0.0.0')}
it { is_expected.to contain_file_line('/etc/sysconfig/libvirtd libvirtd args').with(:line => 'LIBVIRTD_ARGS="--listen"') }
end
context 'with vncserver_listen set to ::0' do
@ -362,7 +349,6 @@ describe 'nova::compute::libvirt' do
it { is_expected.to contain_class('nova::migration::libvirt')}
it { is_expected.to contain_nova_config('vnc/server_listen').with_value('::0')}
it { is_expected.to contain_file_line('/etc/sysconfig/libvirtd libvirtd args').with(:line => 'LIBVIRTD_ARGS="--listen"') }
end
end

Loading…
Cancel
Save