Use correct name on el7+
On el7+ platform the correct name of messagebus service is dbus. For idempotency of module on those platforms it is required to either use correct names and not alises or fix service provider. Change-Id: I824f40478e9190a24f7a7833b6d84311cdec8f25
This commit is contained in:
parent
ece6fd2538
commit
dc2eb5518e
@ -125,10 +125,10 @@ class nova::compute::libvirt (
|
||||
service { 'messagebus':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $::nova::params::messagebus_service_name,
|
||||
provider => $::nova::params::special_service_provider,
|
||||
}
|
||||
Package['libvirt'] -> Service['messagebus'] -> Service['libvirt']
|
||||
|
||||
}
|
||||
|
||||
if $migration_support {
|
||||
|
@ -49,8 +49,10 @@ class nova::params {
|
||||
}
|
||||
'RedHat', 'CentOS', 'Scientific', 'OracleLinux': {
|
||||
if (versioncmp($::operatingsystemmajrelease, '7') < 0) {
|
||||
$messagebus_service_name = 'messagebus'
|
||||
$special_service_provider = 'init'
|
||||
} else {
|
||||
$messagebus_service_name = 'dbus'
|
||||
$special_service_provider = undef
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,8 @@ describe 'nova::compute::libvirt' do
|
||||
:ensure => 'running',
|
||||
:enable => true,
|
||||
:before => 'Service[libvirt]',
|
||||
:provider => 'init'
|
||||
:provider => 'init',
|
||||
:name => 'messagebus'
|
||||
) }
|
||||
|
||||
describe 'on rhel 7' do
|
||||
@ -168,7 +169,8 @@ describe 'nova::compute::libvirt' do
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_service('messagebus').with(
|
||||
:provider => nil
|
||||
:provider => nil,
|
||||
:name => 'dbus'
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user