aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-library/0002-ceilometer-Fix-libvirt-bin-group-name-for-armband.patch
blob: 17700a9a4db7291c63cb91ab765274027d35d83f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Mon, 18 Apr 2016 18:44:27 +0200
Subject: [PATCH] ceilometer: Fix libvirt-bin group name for armband.

Upstream mirrors use a custom version of libvirt, ported from
Debian, while keeping the Ubuntu ceilometer package, leading to a
libvirt group name mismatch between the two.

Fuel-library hardcodes a deb-version test for libvirt-bin, which
enforces the use of "libvirt" instead of "libvirtd" for 1.2.9 or
newer libvirt-bin [1].

Armband brings its own 1.3.2 libvirt-bin package, which respects
Ubuntu standard group naming ("libvirtd"), but since 1.3.2 > 1.2.9,
the old group name ("libvirt") is still used.

This patch extends the version checking introduced in [1]:
 - libvirt-bin 1.3.2 or newer will use "libvirtd" naming;
 - libvirt-bin 1.2.9 ... <1.3.2 will use "libvirt".

[1] https://review.openstack.org/#/c/200602/8/deployment/puppet/
    openstack/manifests/ceilometer.pp
---
 deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp
index af4f0e5..e8dbfcf 100644
--- a/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp
+++ b/deployment/puppet/openstack_tasks/manifests/ceilometer/compute.pp
@@ -93,8 +93,14 @@ class openstack_tasks::ceilometer::compute {
     }

     if $::operatingsystem == 'Ubuntu' and $::ceilometer::params::libvirt_group {
+      # Armband libvirt-bin deb package (1.3.2 version) creates 'libvirtd' group on Ubuntu
+      if (versioncmp($::libvirt_package_version, '1.3.2') >= 0) {
+        User<| name == 'ceilometer' |> {
+          groups => ['nova', 'libvirtd'],
+        }
+      }
       # Our libvirt-bin deb package (1.2.9 version) creates 'libvirt' group on Ubuntu
-      if (versioncmp($::libvirt_package_version, '1.2.9') >= 0) {
+      elsif (versioncmp($::libvirt_package_version, '1.2.9') >= 0) {
         User<| name == 'ceilometer' |> {
           groups => ['nova', 'libvirt'],
         }