From 306c6d660d49ed71419cae534e52935e1e1069c5 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 17 Jan 2017 15:22:53 -0700 Subject: [PATCH] Fix Ubuntu Ocata issues 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 | 11 +---------- manifests/wsgi/apache.pp | 4 ++++ .../ubuntu-libvirt-name-change-8300176528a59f3d.yaml | 11 +++++++++++ spec/classes/ceilometer_agent_compute_spec.rb | 6 ------ spec/classes/ceilometer_agent_polling_spec.rb | 6 ------ 5 files changed, 16 insertions(+), 22 deletions(-) create mode 100644 releasenotes/notes/ubuntu-libvirt-name-change-8300176528a59f3d.yaml diff --git a/manifests/params.pp b/manifests/params.pp index 1ef5087a..340f573b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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' } diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 1cc7c709..374cbf5f 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -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 index 00000000..c690cc31 --- /dev/null +++ b/releasenotes/notes/ubuntu-libvirt-name-change-8300176528a59f3d.yaml @@ -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. diff --git a/spec/classes/ceilometer_agent_compute_spec.rb b/spec/classes/ceilometer_agent_compute_spec.rb index ca40829d..6824e385 100644 --- a/spec/classes/ceilometer_agent_compute_spec.rb +++ b/spec/classes/ceilometer_agent_compute_spec.rb @@ -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' } diff --git a/spec/classes/ceilometer_agent_polling_spec.rb b/spec/classes/ceilometer_agent_polling_spec.rb index 71f24aff..3848e5d8 100644 --- a/spec/classes/ceilometer_agent_polling_spec.rb +++ b/spec/classes/ceilometer_agent_polling_spec.rb @@ -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' }