1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Mon, 18 Apr 2016 18:44:27 +0200
3 Subject: [PATCH] ceilometer: Fix libvirt-bin group name for armband.
5 Upstream mirrors use a custom version of libvirt, ported from
6 Debian, while keeping the Ubuntu ceilometer package, leading to a
7 libvirt group name mismatch between the two.
9 Fuel-library hardcodes a deb-version test for libvirt-bin, which
10 enforces the use of "libvirt" instead of "libvirtd" for 1.2.9 or
11 newer libvirt-bin [1].
13 Armband brings its own 1.3.2 libvirt-bin package, which respects
14 Ubuntu standard group naming ("libvirtd"), but since 1.3.2 > 1.2.9,
15 the old group name ("libvirt") is still used.
17 This patch extends the version checking introduced in [1]:
18 - libvirt-bin 1.3.2 or newer will use "libvirtd" naming;
19 - libvirt-bin 1.2.9 ... <1.3.2 will use "libvirt".
21 [1] https://review.openstack.org/#/c/200602/8/deployment/puppet/
22 openstack/manifests/ceilometer.pp
24 deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp | 8 +++++++-
25 1 file changed, 7 insertions(+), 1 deletion(-)
27 diff --git a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp
28 index 8311731..1d7af2b 100644
29 --- a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp
30 +++ b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp
31 @@ -195,7 +195,13 @@ class openstack::ceilometer (
33 if $::operatingsystem == 'Ubuntu' and $::ceilometer::params::libvirt_group {
34 + # Armband libvirt-bin deb package (1.3.2 version) creates 'libvirtd' group on Ubuntu
35 + if (versioncmp($::libvirt_package_version, '1.3.2') >= 0) {
36 + User<| name == 'ceilometer' |> {
37 + groups => ['nova', 'libvirtd'],
40 # Our libvirt-bin deb package (1.2.9 version) creates 'libvirt' group on Ubuntu
41 - if (versioncmp($::libvirt_package_version, '1.2.9') >= 0) {
42 + elsif (versioncmp($::libvirt_package_version, '1.2.9') >= 0) {
43 User<| name == 'ceilometer' |> {
44 groups => ['nova', 'libvirt'],