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
This commit is contained in:
Alex Schultz 2017-01-17 15:22:53 -07:00
parent 14a4c1262f
commit 306c6d660d
5 changed files with 16 additions and 22 deletions

View 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'
}

View 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,

View File

@ -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.

View 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' }

View 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' }