Use nova and os_package_type for libvirt service name in ceph

Ceph should refer to the proper name for libvirt service
based on os_package_type

Change-Id: Ibf236908f0d2e3dff1c2f125c56f89059389cef9
Partial-bug: #1530912
Partial-blueprint: deploy-with-uca-packages
This commit is contained in:
Matthew Mosesohn 2016-01-26 17:23:47 +03:00
parent 703167a6ae
commit 85b1cb59b6
2 changed files with 15 additions and 6 deletions

View File

@ -5,14 +5,27 @@ class ceph::nova_compute (
$compute_pool = $::ceph::compute_pool,
) {
include ::nova::params
file {'/root/secret.xml':
content => template('ceph/secret.erb')
}
if !defined(Service['libvirt'] ) {
# TODO(aschultz): Just use $::nova::params::libvirt_service_name when a
# version of puppet-nova has been pulled in that uses os_package_type to
# correctly handle the service names for ubuntu vs debian. Upstream bug
# LP#1515076
# NOTE: for debian packages and centos the name is the same ('libvirtd') so
# we are defaulting to that for backwards compatibility. LP#1469308
$libvirt_service_name = $::os_package_type ? {
'ubuntu' => $::nova::params::libvirt_service_name,
default => 'libvirtd'
}
if !defined(Service['libvirt']) {
service { 'libvirt':
name => $libvirt_service_name,
ensure => 'running',
name => $::ceph::params::libvirt_service_name,
}
}

View File

@ -1,10 +1,6 @@
# These are per-OS parameters and should be considered static
class ceph::params {
#1.2.9 debian package service name is libvirtd
#http://http.debian.net/debian/pool/main/libv/libvirt/libvirt_1.2.9-9.debian.tar.xz
$libvirt_service_name = 'libvirtd'
case $::osfamily {
'RedHat': {
$service_name = 'ceph'