Browse Source

Merge "Add support to configure virtlogd"

changes/91/707291/2
Zuul 6 days ago
parent
commit
2039b4d842
3 changed files with 24 additions and 0 deletions
  1. +10
    -0
      manifests/profile/base/nova/libvirt.pp
  2. +6
    -0
      releasenotes/notes/virtlogd_config-8bc3aad489caf8a3.yaml
  3. +8
    -0
      spec/classes/tripleo_profile_base_nova_libvirt_spec.rb

+ 10
- 0
manifests/profile/base/nova/libvirt.pp View File

@@ -27,6 +27,10 @@
# (Optional) Overrides for libvirtd config options
# Defaults to {}
#
# [*virtlogd_config*]
# (Optional) Overrides for virtlogd config options
# Defaults to {}
#
# [*tls_password*]
# (Optional) SASL Password for libvirtd TLS connections
# Defaults to '' (disabled)
@@ -34,6 +38,7 @@
class tripleo::profile::base::nova::libvirt (
$step = Integer(hiera('step')),
$libvirtd_config = {},
$virtlogd_config = {},
$tls_password = '',
) {
include tripleo::profile::base::nova::compute_libvirt_shared
@@ -41,6 +46,7 @@ class tripleo::profile::base::nova::libvirt (
if $step >= 4 {
include tripleo::profile::base::nova
include tripleo::profile::base::nova::migration::client
include nova::compute::libvirt::virtlogd
include nova::compute::libvirt::services

$libvirtd_config_default = {
@@ -55,6 +61,10 @@ class tripleo::profile::base::nova::libvirt (
libvirtd_config => merge($libvirtd_config_default, $libvirtd_config)
}

class { 'nova::compute::libvirt::virtlogd::config':
virtlogd_config => $virtlogd_config
}

# This removal of files in /etc/libvirt/qemu should not happen inside containers
# Avoids LP#1819482
if $::deployment_type != 'containers' {

+ 6
- 0
releasenotes/notes/virtlogd_config-8bc3aad489caf8a3.yaml View File

@@ -0,0 +1,6 @@
---
features:
- |
Add support to change virtlogd config options.
New hieradata tripleo::profile::base::nova::libvirt::virtlogd_config can
be used to override virtlogd config options.

+ 8
- 0
spec/classes/tripleo_profile_base_nova_libvirt_spec.rb View File

@@ -32,10 +32,12 @@ eos
is_expected.to contain_class('tripleo::profile::base::nova::libvirt')
is_expected.to contain_class('tripleo::profile::base::nova::compute_libvirt_shared')
is_expected.to_not contain_class('tripleo::profile::base::nova')
is_expected.to_not contain_class('nova::compute::libvirt::virtlogd')
is_expected.to_not contain_class('nova::compute::libvirt::services')
is_expected.to_not contain_file('/etclibvirt/qemu/networks/autostart/default.xml')
is_expected.to_not contain_file('/etclibvirt/qemu/networks/default.xml')
is_expected.to_not contain_exec('libvirt-default-net-destroy')
is_expected.to_not contain_class('nova::compute::libvirt::virtlogd::config')
is_expected.to_not contain_exec('set libvirt sasl credentials')
}
end
@@ -65,6 +67,7 @@ eos
is_expected.to contain_class('tripleo::profile::base::nova::libvirt')
is_expected.to contain_class('tripleo::profile::base::nova::compute_libvirt_shared')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('nova::compute::libvirt::virtlogd')
is_expected.to contain_class('nova::compute::libvirt::services')
is_expected.to contain_class('nova::compute::libvirt::qemu')
is_expected.to contain_class('nova::migration::qemu')
@@ -78,6 +81,7 @@ eos
"unix_sock_ro_perms" => {"value" => '"0777"'},
"unix_sock_rw_perms" => {"value" => '"0770"'}
})
is_expected.to contain_class('nova::compute::libvirt::virtlogd::config')
is_expected.to contain_package('cyrus-sasl-scram')
is_expected.to contain_file('/etc/sasl2/libvirt.conf')
is_expected.to contain_file('/etc/libvirt/auth.conf').with_ensure('absent')
@@ -111,6 +115,7 @@ eos
it {
is_expected.to contain_class('tripleo::profile::base::nova::libvirt')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('nova::compute::libvirt::virtlogd')
is_expected.to contain_class('nova::compute::libvirt::services')
is_expected.to contain_file('/etc/libvirt/qemu/networks/autostart/default.xml').with_ensure('absent')
is_expected.to contain_file('/etc/libvirt/qemu/networks/default.xml').with_ensure('absent')
@@ -122,6 +127,7 @@ eos
"unix_sock_ro_perms" => {"value" => '"0777"'},
"unix_sock_rw_perms" => {"value" => '"0770"'}
})
is_expected.to contain_class('nova::compute::libvirt::virtlogd::config')
is_expected.to contain_package('cyrus-sasl-scram')
is_expected.to contain_file('/etc/sasl2/libvirt.conf')
is_expected.to contain_file('/etc/libvirt/auth.conf').with_ensure('absent')
@@ -156,6 +162,7 @@ eos
is_expected.to contain_class('tripleo::profile::base::nova::libvirt')
is_expected.to contain_class('tripleo::profile::base::nova::compute_libvirt_shared')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('nova::compute::libvirt::virtlogd')
is_expected.to contain_class('nova::compute::libvirt::services')
is_expected.to contain_class('nova::compute::libvirt::qemu')
is_expected.to contain_class('nova::migration::qemu')
@@ -169,6 +176,7 @@ eos
"unix_sock_ro_perms" => {"value" => '"0777"'},
"unix_sock_rw_perms" => {"value" => '"0770"'}
})
is_expected.to contain_class('nova::compute::libvirt::virtlogd::config')
is_expected.to contain_package('cyrus-sasl-scram')
is_expected.to contain_file('/etc/sasl2/libvirt.conf')
is_expected.to contain_file('/etc/libvirt/auth.conf').with_ensure('present')

Loading…
Cancel
Save