Merge "Fix missing notifications about virt*d services"
This commit is contained in:
commit
23d6afcf42
|
@ -102,11 +102,12 @@ class nova::compute::libvirt::services (
|
|||
}
|
||||
|
||||
service { 'libvirt':
|
||||
ensure => $libvirt_service_ensure,
|
||||
enable => $libvirt_service_enable,
|
||||
name => $libvirt_service_name,
|
||||
require => Anchor['nova::install::end'],
|
||||
ensure => $libvirt_service_ensure,
|
||||
enable => $libvirt_service_enable,
|
||||
name => $libvirt_service_name,
|
||||
tag => 'libvirt-service',
|
||||
}
|
||||
Libvirtd_config<||> ~> Service['libvirt']
|
||||
|
||||
# messagebus
|
||||
if($::osfamily == 'RedHat') {
|
||||
|
@ -114,8 +115,8 @@ class nova::compute::libvirt::services (
|
|||
ensure => running,
|
||||
enable => true,
|
||||
name => $::nova::params::messagebus_service_name,
|
||||
tag => 'libvirt-service',
|
||||
}
|
||||
Package['libvirt'] -> Service['messagebus']
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,8 +125,8 @@ class nova::compute::libvirt::services (
|
|||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtlock_service_name,
|
||||
tag => 'libvirt-service',
|
||||
}
|
||||
Package<| title == 'libvirt' |> -> Service['virtlockd']
|
||||
}
|
||||
|
||||
if $virtlog_service_name {
|
||||
|
@ -133,8 +134,9 @@ class nova::compute::libvirt::services (
|
|||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtlog_service_name,
|
||||
tag => 'libvirt-service',
|
||||
}
|
||||
Package<| title == 'libvirt' |> -> Service['virtlogd']
|
||||
Virtlogd_config<||> ~> Service['libvirt']
|
||||
}
|
||||
|
||||
if ! $modular_libvirt {
|
||||
|
@ -157,43 +159,46 @@ class nova::compute::libvirt::services (
|
|||
if $virtsecret_service_name {
|
||||
package { 'virtsecret':
|
||||
ensure => present,
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-secret"
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-secret",
|
||||
tag => ['openstack', 'nova-support-package'],
|
||||
}
|
||||
service { 'virtsecretd':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtsecret_service_name,
|
||||
require => Package['virtsecret'],
|
||||
tag => 'libvirt-modular-service',
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtsecret_service_name,
|
||||
tag => ['libvirt-service', 'libvirt-modular-service'],
|
||||
}
|
||||
Virtsecretd_config<||> ~> Service['virtlogd']
|
||||
}
|
||||
|
||||
if $virtnodedev_service_name {
|
||||
package { 'virtnodedev':
|
||||
ensure => present,
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-nodedev"
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-nodedev",
|
||||
tag => ['openstack', 'nova-support-package'],
|
||||
}
|
||||
service { 'virtnodedevd':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtnodedev_service_name,
|
||||
require => Package['virtnodedev'],
|
||||
tag => 'libvirt-modular-service',
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtnodedev_service_name,
|
||||
tag => ['libvirt-service', 'libvirt-modular-service'],
|
||||
}
|
||||
Virtnodedevd_config<||> ~> Service['virtlogd']
|
||||
}
|
||||
|
||||
if $virtqemu_service_name {
|
||||
package { 'virtqemu':
|
||||
ensure => present,
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-qemu"
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-qemu",
|
||||
tag => ['openstack', 'nova-support-package'],
|
||||
}
|
||||
service { 'virtqemud':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtqemu_service_name,
|
||||
require => Package['virtqemu'],
|
||||
tag => 'libvirt-modular-service',
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtqemu_service_name,
|
||||
tag => ['libvirt-service', 'libvirt-modular-service'],
|
||||
}
|
||||
Virtqemud_config<||> ~> Service['virtlogd']
|
||||
}
|
||||
|
||||
if $virtproxy_service_name {
|
||||
|
@ -201,23 +206,24 @@ class nova::compute::libvirt::services (
|
|||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtproxy_service_name,
|
||||
tag => 'libvirt-modular-service',
|
||||
tag => ['libvirt-service', 'libvirt-modular-service'],
|
||||
}
|
||||
Package<| title == 'libvirt' |> -> Service['virtproxyd']
|
||||
Virtproxyd_config<||> ~> Service['virtlogd']
|
||||
}
|
||||
|
||||
if $virtstorage_service_name {
|
||||
package { 'virtstorage':
|
||||
ensure => present,
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-storage"
|
||||
name => "${::nova::params::libvirt_daemon_package_prefix}driver-storage",
|
||||
tag => ['openstack', 'nova-support-package'],
|
||||
}
|
||||
service { 'virtstoraged':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtstorage_service_name,
|
||||
require => Package['virtstorage'],
|
||||
tag => 'libvirt-modular-service',
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtstorage_service_name,
|
||||
tag => ['libvirt-service', 'libvirt-modular-service'],
|
||||
}
|
||||
Virtstoraged_config<||> ~> Service['virtlogd']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,8 +58,4 @@ class nova::compute::libvirt::virtlogd (
|
|||
'max_size': value => pick($max_size, $::os_service_default);
|
||||
'max_backups': value => pick($max_backups, $::os_service_default);
|
||||
}
|
||||
|
||||
Anchor['nova::config::begin']
|
||||
-> Virtlogd_config<||>
|
||||
-> Anchor['nova::config::end']
|
||||
}
|
||||
|
|
|
@ -52,8 +52,4 @@ class nova::compute::libvirt::virtnodedevd (
|
|||
'admin_max_clients': value => $admin_max_clients;
|
||||
'ovs_timeout': value => $ovs_timeout;
|
||||
}
|
||||
|
||||
Anchor['nova::config::begin']
|
||||
-> Virtnodedevd_config<||>
|
||||
-> Anchor['nova::config::end']
|
||||
}
|
||||
|
|
|
@ -61,8 +61,4 @@ class nova::compute::libvirt::virtproxyd (
|
|||
'ovs_timeout': value => $ovs_timeout;
|
||||
'tls_priority': value => $tls_priority, quote => true;
|
||||
}
|
||||
|
||||
Anchor['nova::config::begin']
|
||||
-> Virtproxyd_config<||>
|
||||
-> Anchor['nova::config::end']
|
||||
}
|
||||
|
|
|
@ -53,8 +53,4 @@ class nova::compute::libvirt::virtqemud (
|
|||
'admin_max_clients': value => $admin_max_clients;
|
||||
'ovs_timeout': value => $ovs_timeout;
|
||||
}
|
||||
|
||||
Anchor['nova::config::begin']
|
||||
-> Virtqemud_config<||>
|
||||
-> Anchor['nova::config::end']
|
||||
}
|
||||
|
|
|
@ -52,8 +52,4 @@ class nova::compute::libvirt::virtsecretd (
|
|||
'admin_max_clients': value => $admin_max_clients;
|
||||
'ovs_timeout': value => $ovs_timeout;
|
||||
}
|
||||
|
||||
Anchor['nova::config::begin']
|
||||
-> Virtsecretd_config<||>
|
||||
-> Anchor['nova::config::end']
|
||||
}
|
||||
|
|
|
@ -38,9 +38,5 @@ class nova::compute::libvirt::virtstoraged (
|
|||
'log_outputs': value => $log_outputs, quote => true;
|
||||
'ovs_timeout': value => $ovs_timeout;
|
||||
}
|
||||
|
||||
Anchor['nova::config::begin']
|
||||
-> Virtstoraged_config<||>
|
||||
-> Anchor['nova::config::end']
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,20 @@ class nova::deps {
|
|||
-> Package<| tag == 'nova-support-package'|>
|
||||
-> Anchor['nova::install::end']
|
||||
|
||||
# Start libvirt services during the service phase
|
||||
Anchor['nova::service::begin']
|
||||
-> Service<| tag == 'libvirt-service'|>
|
||||
-> Anchor['nova::service::end']
|
||||
|
||||
# Manage libvirt configurations during the config phase
|
||||
Anchor['nova::config::begin'] -> Libvirtd_config<||> -> Anchor['nova::config::end']
|
||||
Anchor['nova::config::begin'] -> Virtlogd_config<||> -> Anchor['nova::config::end']
|
||||
Anchor['nova::config::begin'] -> Virtnodedevd_config<||> -> Anchor['nova::config::end']
|
||||
Anchor['nova::config::begin'] -> Virtproxyd_config<||> -> Anchor['nova::config::end']
|
||||
Anchor['nova::config::begin'] -> Virtqemud_config<||> -> Anchor['nova::config::end']
|
||||
Anchor['nova::config::begin'] -> Virtsecretd_config<||> -> Anchor['nova::config::end']
|
||||
Anchor['nova::config::begin'] -> Virtstoraged_config<||> -> Anchor['nova::config::end']
|
||||
|
||||
# all cache settings should be applied and all packages should be installed
|
||||
# before service startup
|
||||
Oslo::Cache<||> -> Anchor['nova::service::begin']
|
||||
|
|
|
@ -221,14 +221,10 @@ class nova::migration::libvirt(
|
|||
|
||||
if $configure_libvirt {
|
||||
Anchor['nova::config::begin']
|
||||
-> Libvirtd_config<||>
|
||||
-> File<| tag == 'libvirt-file'|>
|
||||
-> File_line<| tag == 'libvirt-file_line'|>
|
||||
-> Anchor['nova::config::end']
|
||||
|
||||
Libvirtd_config<||>
|
||||
~> Service['libvirt']
|
||||
|
||||
File_line<| tag == 'libvirt-file_line' |>
|
||||
~> Service['libvirt']
|
||||
|
||||
|
|
|
@ -159,19 +159,19 @@ describe 'nova::compute::libvirt' do
|
|||
it { is_expected.to contain_nova_config('libvirt/num_memory_encrypted_guests').with_value(255)}
|
||||
it {
|
||||
is_expected.to contain_service('libvirt').with(
|
||||
:name => 'custom_service',
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:before => ['Service[nova-compute]']
|
||||
:name => 'custom_service',
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:before => ['Anchor[nova::service::end]', 'Service[nova-compute]']
|
||||
)
|
||||
is_expected.to contain_service('virtlockd').with(
|
||||
:name => 'virtlock',
|
||||
:enable => true,
|
||||
:name => 'virtlock',
|
||||
:enable => true,
|
||||
:ensure => 'running'
|
||||
)
|
||||
is_expected.to contain_service('virtlogd').with(
|
||||
:name => 'virtlog',
|
||||
:enable => true,
|
||||
:name => 'virtlog',
|
||||
:enable => true,
|
||||
:ensure => 'running'
|
||||
)
|
||||
|
||||
|
@ -266,12 +266,12 @@ describe 'nova::compute::libvirt' do
|
|||
:name => 'libvirtd',
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:before => ['Service[nova-compute]'],
|
||||
:before => ['Anchor[nova::service::end]', 'Service[nova-compute]'],
|
||||
)}
|
||||
it { is_expected.to contain_service('messagebus').with(
|
||||
:ensure => 'running',
|
||||
:enable => true,
|
||||
:before => ['Service[libvirt]'],
|
||||
:before => ['Anchor[nova::service::end]', 'Service[libvirt]'],
|
||||
:name => 'dbus'
|
||||
) }
|
||||
|
||||
|
|
Loading…
Reference in New Issue