Clean package provided placement httpd configs
In order to prevent duplicate port definitions we need to clean the package provided httpd configuration files. Change-Id: Ie16a60c604ecf9f4012b0630f91e6ece2b6855db Closes-Bug: #1669461
This commit is contained in:
parent
ffe53d3bf3
commit
d7e2d37ecf
|
@ -53,6 +53,7 @@ class nova::params {
|
||||||
$nova_wsgi_script_path = '/var/www/cgi-bin/nova'
|
$nova_wsgi_script_path = '/var/www/cgi-bin/nova'
|
||||||
$nova_api_wsgi_script_source = '/usr/lib/python2.7/site-packages/nova/wsgi/nova-api.py'
|
$nova_api_wsgi_script_source = '/usr/lib/python2.7/site-packages/nova/wsgi/nova-api.py'
|
||||||
$placement_wsgi_script_source = '/usr/bin/nova-placement-api'
|
$placement_wsgi_script_source = '/usr/bin/nova-placement-api'
|
||||||
|
$placement_httpd_config_file = '/etc/httpd/conf.d/00-nova-placement-api.conf'
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
'RedHat', 'CentOS', 'Scientific', 'OracleLinux': {
|
'RedHat', 'CentOS', 'Scientific', 'OracleLinux': {
|
||||||
if (versioncmp($::operatingsystemmajrelease, '7') < 0) {
|
if (versioncmp($::operatingsystemmajrelease, '7') < 0) {
|
||||||
|
@ -110,6 +111,7 @@ class nova::params {
|
||||||
$nova_wsgi_script_path = '/usr/lib/cgi-bin/nova'
|
$nova_wsgi_script_path = '/usr/lib/cgi-bin/nova'
|
||||||
$nova_api_wsgi_script_source = '/usr/lib/python2.7/dist-packages/nova/wsgi/nova-api.py'
|
$nova_api_wsgi_script_source = '/usr/lib/python2.7/dist-packages/nova/wsgi/nova-api.py'
|
||||||
$placement_wsgi_script_source = '/usr/bin/nova-placement-api'
|
$placement_wsgi_script_source = '/usr/bin/nova-placement-api'
|
||||||
|
$placement_httpd_config_file = '/etc/apache2/sites-available/nova-placement-api.conf'
|
||||||
# debian specific nova config
|
# debian specific nova config
|
||||||
$root_helper = 'sudo nova-rootwrap'
|
$root_helper = 'sudo nova-rootwrap'
|
||||||
$lock_path = '/var/lock/nova'
|
$lock_path = '/var/lock/nova'
|
||||||
|
|
|
@ -110,8 +110,21 @@ class nova::wsgi::apache_placement (
|
||||||
package_name => $::nova::params::placement_package_name,
|
package_name => $::nova::params::placement_package_name,
|
||||||
ensure_package => $ensure_package,
|
ensure_package => $ensure_package,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { $::nova::params::placement_httpd_config_file:
|
||||||
|
ensure => present,
|
||||||
|
content => "#
|
||||||
|
# This file has been cleaned by Puppet.
|
||||||
|
#
|
||||||
|
# OpenStack Nova Placement API configuration has been moved to:
|
||||||
|
# - ${priority}-placement_wsgi.conf
|
||||||
|
#",
|
||||||
|
}
|
||||||
# Ubuntu requires nova-placement-api to be installed before apache to find wsgi script
|
# Ubuntu requires nova-placement-api to be installed before apache to find wsgi script
|
||||||
Package<| title == 'nova-placement-api'|> -> Package<| title == 'httpd'|>
|
Package<| title == 'nova-placement-api'|> -> Package<| title == 'httpd'|>
|
||||||
|
Package<| title == 'nova-placement-api' |> ->
|
||||||
|
File[$::nova::params::placement_httpd_config_file] ~>
|
||||||
|
Service['httpd']
|
||||||
|
|
||||||
::openstacklib::wsgi::apache { 'placement_wsgi':
|
::openstacklib::wsgi::apache { 'placement_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
|
|
|
@ -91,6 +91,8 @@ describe 'nova::wsgi::apache_placement' do
|
||||||
it { is_expected.to contain_file('placement_wsgi').that_requires("File[#{platform_params[:wsgi_script_path]}]") }
|
it { is_expected.to contain_file('placement_wsgi').that_requires("File[#{platform_params[:wsgi_script_path]}]") }
|
||||||
|
|
||||||
it { is_expected.to contain_concat("#{platform_params[:httpd_ports_file]}") }
|
it { is_expected.to contain_concat("#{platform_params[:httpd_ports_file]}") }
|
||||||
|
|
||||||
|
it { is_expected.to contain_file(platform_params[:placement_httpd_config_file]) }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when overriding parameters using different ports' do
|
describe 'when overriding parameters using different ports' do
|
||||||
|
@ -158,6 +160,7 @@ describe 'nova::wsgi::apache_placement' do
|
||||||
:wsgi_script_path => '/usr/lib/cgi-bin/nova',
|
:wsgi_script_path => '/usr/lib/cgi-bin/nova',
|
||||||
:placement_wsgi_script_source => '/usr/bin/nova-placement-api',
|
:placement_wsgi_script_source => '/usr/bin/nova-placement-api',
|
||||||
:placement_package_name => 'nova-placement-api',
|
:placement_package_name => 'nova-placement-api',
|
||||||
|
:placement_httpd_config_file => '/etc/apache2/sites-available/nova-placement-api.conf',
|
||||||
}
|
}
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
{
|
{
|
||||||
|
@ -166,6 +169,7 @@ describe 'nova::wsgi::apache_placement' do
|
||||||
:wsgi_script_path => '/var/www/cgi-bin/nova',
|
:wsgi_script_path => '/var/www/cgi-bin/nova',
|
||||||
:placement_wsgi_script_source => '/usr/bin/nova-placement-api',
|
:placement_wsgi_script_source => '/usr/bin/nova-placement-api',
|
||||||
:placement_package_name => 'openstack-nova-placement-api',
|
:placement_package_name => 'openstack-nova-placement-api',
|
||||||
|
:placement_httpd_config_file => '/etc/httpd/conf.d/00-nova-placement-api.conf',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue