Fix Ubuntu Ocata-m2 issues

1) Update Ubuntu wsgi location
The location of the app.wsgi has changed from /usr/share/aodh-common to
/usr/share/aodh.

2) Install packages before apache
The apache module cleans up the vhost configurations and in Ubuntu the
packaging is include a default configuration. To ensure this file is
removed at the right time, we should make sure we install our software
before doing the apache configuration when running under apache.

Change-Id: I272c03f19d7182c4a731a1ef0fcbc2b9c6ca0b97
Closes-Bug: #1657293
Closes-Bug: #1657847
This commit is contained in:
Alex Schultz 2017-01-17 15:29:29 -07:00
parent b55b4cac4a
commit 093eeb5ecf
4 changed files with 17 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class aodh::params {
$listener_package_name = 'aodh-listener'
$listener_service_name = 'aodh-listener'
$aodh_wsgi_script_path = '/usr/lib/cgi-bin/aodh'
$aodh_wsgi_script_source = '/usr/share/aodh-common/app.wsgi'
$aodh_wsgi_script_source = '/usr/share/aodh/app.wsgi'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem")

View File

@ -107,6 +107,10 @@ class aodh::wsgi::apache (
include ::apache::mod::ssl
}
# NOTE(aschultz): needed because the packaging may introduce some apache
# configuration files that apache may remove. See LP#1657847
Anchor['aodh::install::end'] -> Class['apache']
::openstacklib::wsgi::apache { 'aodh_wsgi':
bind_host => $bind_host,
bind_port => $port,

View File

@ -0,0 +1,11 @@
---
upgrade:
- |
The Ubuntu packages for Ocata use a different location for the app.wsgi
file and as such the default has been updated. If planning on using the
Ocata modules with older versions of the package, be aware you may need to
specify a different app.wsgi location
fixes:
- |
Updated app.wsgi location from /usr/share/aodh-common/app.wsgi to the new
location at /usr/share/aodh/app.wsgi

View File

@ -108,7 +108,7 @@ describe 'aodh::wsgi::apache' do
:httpd_service_name => 'apache2',
:httpd_ports_file => '/etc/apache2/ports.conf',
:wsgi_script_path => '/usr/lib/cgi-bin/aodh',
:wsgi_script_source => '/usr/share/aodh-common/app.wsgi'
:wsgi_script_source => '/usr/share/aodh/app.wsgi'
}
when 'RedHat'
{