Conditionally fall back to redhat service provider
This commit partially reverts Change-Id: Ic06ffc377f8982337d977bebb96ef7f6196e5c22 and puts in place conditionals to work around an issue in Puppet 4.0 through 4.4 installations where the systemd service provider does not function because of a bug managing statically enabled services[1]. [1] https://tickets.puppetlabs.com/browse/PUP-5353 Closes-Bug: #1577827 Change-Id: If5ea135b294995634506b745f80442e34b101a59
This commit is contained in:

committed by
Emilien Macchi

parent
0986087729
commit
b108a7c36b
@@ -158,6 +158,8 @@ class nova::compute::libvirt (
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $::nova::params::messagebus_service_name,
|
||||
provider => $::nova::params::special_service_provider,
|
||||
|
||||
}
|
||||
Package['libvirt'] -> Service['messagebus'] -> Service['libvirt']
|
||||
}
|
||||
@@ -199,6 +201,7 @@ class nova::compute::libvirt (
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $libvirt_service_name,
|
||||
provider => $::nova::params::special_service_provider,
|
||||
require => Package['libvirt'],
|
||||
}
|
||||
|
||||
@@ -207,6 +210,7 @@ class nova::compute::libvirt (
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtlock_service_name,
|
||||
provider => $::nova::params::special_service_provider,
|
||||
require => Package['libvirt']
|
||||
}
|
||||
}
|
||||
@@ -216,6 +220,7 @@ class nova::compute::libvirt (
|
||||
ensure => running,
|
||||
enable => true,
|
||||
name => $virtlog_service_name,
|
||||
provider => $::nova::params::special_service_provider,
|
||||
require => Package['libvirt']
|
||||
}
|
||||
}
|
||||
|
@@ -55,12 +55,19 @@ class nova::params {
|
||||
'RedHat', 'CentOS', 'Scientific', 'OracleLinux': {
|
||||
if (versioncmp($::operatingsystemmajrelease, '7') < 0) {
|
||||
$messagebus_service_name = 'messagebus'
|
||||
$special_service_provider = undef
|
||||
} else {
|
||||
if (versioncmp($::puppetversion, '4.5') < 0) {
|
||||
$special_service_provider = 'redhat'
|
||||
} else {
|
||||
$special_service_provider = undef
|
||||
}
|
||||
$messagebus_service_name = 'dbus'
|
||||
}
|
||||
}
|
||||
default: {
|
||||
# not packaged on Fedora
|
||||
# not required on Fedora
|
||||
$special_service_provider = undef
|
||||
$messagebus_service_name = undef
|
||||
}
|
||||
}
|
||||
@@ -108,6 +115,8 @@ class nova::params {
|
||||
$spicehtml5proxy_package_name = 'nova-consoleproxy'
|
||||
$spicehtml5proxy_service_name = 'nova-spicehtml5proxy'
|
||||
$vncproxy_package_name = 'nova-consoleproxy'
|
||||
# Use default provider on Debian
|
||||
$special_service_provider = undef
|
||||
$libvirt_service_name = 'libvirtd'
|
||||
$virtlock_service_name = undef
|
||||
$virtlog_service_name = undef
|
||||
@@ -116,6 +125,8 @@ class nova::params {
|
||||
$spicehtml5proxy_package_name = 'nova-spiceproxy'
|
||||
$spicehtml5proxy_service_name = 'nova-spiceproxy'
|
||||
$vncproxy_package_name = 'nova-novncproxy'
|
||||
# Use default provider on Debian
|
||||
$special_service_provider = undef
|
||||
$libvirt_service_name = 'libvirt-bin'
|
||||
$virtlock_service_name = 'virtlockd'
|
||||
$virtlog_service_name = 'virtlogd'
|
||||
|
@@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Fallback to deprecated "redhat" service provider in an intellegent way to get around https://tickets.puppetlabs.com/browse/PUP-5353 on Puppet versions from 4.0 through 4.4.
|
@@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Stop overriding service providers, and let Puppet finds which one is the best.
|
Reference in New Issue
Block a user