From 85b1cb59b6cce1a6b5e28fe45757f9486ec55946 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Tue, 26 Jan 2016 17:23:47 +0300 Subject: [PATCH] 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 --- .../puppet/ceph/manifests/nova_compute.pp | 17 +++++++++++++++-- deployment/puppet/ceph/manifests/params.pp | 4 ---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/deployment/puppet/ceph/manifests/nova_compute.pp b/deployment/puppet/ceph/manifests/nova_compute.pp index 36134edf18..c07b106bfe 100644 --- a/deployment/puppet/ceph/manifests/nova_compute.pp +++ b/deployment/puppet/ceph/manifests/nova_compute.pp @@ -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, } } diff --git a/deployment/puppet/ceph/manifests/params.pp b/deployment/puppet/ceph/manifests/params.pp index 518d78d357..85fb94fbe9 100644 --- a/deployment/puppet/ceph/manifests/params.pp +++ b/deployment/puppet/ceph/manifests/params.pp @@ -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'