]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Fix Ubuntu Ocata issues
authorAlex Schultz <aschultz@redhat.com>
Tue, 17 Jan 2017 22:22:53 +0000 (15:22 -0700)
committerAlex Schultz <aschultz@redhat.com>
Wed, 18 Jan 2017 19:57:56 +0000 (12:57 -0700)
The Ubuntu libvirt package has been updated for Ocata and includes
the Debian name for the libvirt group now. This change updates the
libvirt group to be 'libvirt' and not 'libvirtd' as it was previously.

Additionally, we are not properly waiting for the ceilometer packages to
be installed before attempting to configure apache which under Ubuntu
can lead to a non-idempotent 2nd run if the apache configuration file
is installed after we've already run our apache configuration.

Change-Id: Id191d1a12c84a2bdb305630fd7b10516ac2ba0c2
Closes-Bug: #1657291
Closes-Bug: #1657309

manifests/params.pp
manifests/wsgi/apache.pp
releasenotes/notes/ubuntu-libvirt-name-change-8300176528a59f3d.yaml [new file with mode: 0644]
spec/classes/ceilometer_agent_compute_spec.rb
spec/classes/ceilometer_agent_polling_spec.rb

index 1ef5087a38b5cb75fea55c8cfa9cae2ea0df30c9..340f573b1dcabdf795399e3e94dbaa524b844a45 100644 (file)
@@ -49,16 +49,7 @@ class ceilometer::params {
       $collector_service_name          = 'ceilometer-collector'
       $api_service_name                = 'ceilometer-api'
       $agent_notification_service_name = 'ceilometer-agent-notification'
-
-      # Operating system specific
-      case $::operatingsystem {
-        'Ubuntu': {
-          $libvirt_group = 'libvirtd'
-        }
-        default: {
-          $libvirt_group = 'libvirt'
-        }
-      }
+      $libvirt_group                   = 'libvirt'
       $ceilometer_wsgi_script_path    = '/usr/lib/cgi-bin/ceilometer'
       $ceilometer_wsgi_script_source  = '/usr/lib/python2.7/dist-packages/ceilometer/api/app.wsgi'
     }
index 1cc7c7098576ce794f717e535ca17c2e423d2174..374cbf5f8e34fe0981fd710e670c1ef721c6c998 100644 (file)
@@ -109,6 +109,10 @@ class ceilometer::wsgi::apache (
     include ::apache::mod::ssl
   }
 
+  # NOTE(aschultz): needed because the packaging may introduce some apache
+  # configuration files that apache may remove. See LP#1657309
+  Anchor['ceilometer::install::end'] -> Class['apache']
+
   ::openstacklib::wsgi::apache { 'ceilometer_wsgi':
     bind_host                 => $bind_host,
     bind_port                 => $port,
diff --git a/releasenotes/notes/ubuntu-libvirt-name-change-8300176528a59f3d.yaml b/releasenotes/notes/ubuntu-libvirt-name-change-8300176528a59f3d.yaml
new file mode 100644 (file)
index 0000000..c690cc3
--- /dev/null
@@ -0,0 +1,11 @@
+---
+upgrade:
+  - |
+    The group for libvirt has changed for the polling and compute agent and
+    the module now expects the Debian specific naming conventions which are
+    supplied in libvirt-bin 2.5.0.
+fixes:
+  - |
+    The libvirt group name for the polling and compute agents is now 'libvirt'
+    on Ubuntu. If trying to use the Ocata module with previous packages, you
+    may run into issues around the group name.
index ca40829d58002d750d6035786208201001f4bea4..6824e3855de863d6b35f1da5f8fb5f6bc0110f8d 100644 (file)
@@ -100,15 +100,9 @@ describe 'ceilometer::agent::compute' do
       let :platform_params do
         case facts[:osfamily]
         when 'Debian'
-          if facts[:operatingsystem] == 'Ubuntu'
-            { :agent_package_name => 'ceilometer-agent-compute',
-              :agent_service_name => 'ceilometer-agent-compute',
-              :libvirt_group      => 'libvirtd' }
-          else
             { :agent_package_name => 'ceilometer-agent-compute',
               :agent_service_name => 'ceilometer-agent-compute',
               :libvirt_group      => 'libvirt' }
-          end
         when 'RedHat'
           { :agent_package_name => 'openstack-ceilometer-compute',
             :agent_service_name => 'openstack-ceilometer-compute' }
index 71f24aff49a5ee75f28002cc189783b6e5f51d36..3848e5d8b2741850da8c98687308f503157172ff 100644 (file)
@@ -119,15 +119,9 @@ describe 'ceilometer::agent::polling' do
       let :platform_params do
         case facts[:osfamily]
         when 'Debian'
-          if facts[:operatingsystem] == 'Ubuntu'
-            { :agent_package_name => 'ceilometer-polling',
-              :agent_service_name => 'ceilometer-polling',
-              :libvirt_group      => 'libvirtd' }
-          else
             { :agent_package_name => 'ceilometer-polling',
               :agent_service_name => 'ceilometer-polling',
               :libvirt_group      => 'libvirt' }
-          end
         when 'RedHat'
             { :agent_package_name => 'openstack-ceilometer-polling',
               :agent_service_name => 'openstack-ceilometer-polling' }