Update horzion::wsgi::apache for new apache module

A recent bugfix in the puppetlabs-apache module broke this module's
usage of vhost redirects. This patch updates our usage of apache::vhost
to use the new redirectmatch_dest parameter and pins the apache module
dependency to 1.2.0 so that the new parameter will be available.

Change-Id: I123b49eb54d7fd2908f09db03acacd1ba4f01492
Closes-Bug: 1390453
This commit is contained in:
Colleen Murphy
2014-11-24 10:19:07 -08:00
parent 353c372d58
commit 512ff352eb
3 changed files with 13 additions and 7 deletions

View File

@@ -180,7 +180,8 @@ class horizon::wsgi::apache (
}
ensure_resource('apache::vhost', $vhost_conf_name, merge ($default_vhost_conf, $extra_params, {
redirectmatch_regexp => "${redirect_match} ${redirect_url}",
redirectmatch_regexp => $redirect_match,
redirectmatch_dest => $redirect_url,
}))
ensure_resource('apache::vhost', $vhost_ssl_conf_name, merge ($default_vhost_conf, $extra_params, {
access_log_file => 'horizon_ssl_access.log',
@@ -191,7 +192,8 @@ class horizon::wsgi::apache (
ensure => $ensure_ssl_vhost,
wsgi_daemon_process => 'horizon-ssl',
wsgi_process_group => 'horizon-ssl',
redirectmatch_regexp => "^/$ ${::horizon::params::root_url}"
redirectmatch_regexp => '^/$',
redirectmatch_dest => $::horizon::params::root_url,
}))
}

View File

@@ -31,7 +31,7 @@
],
"description": "Installs and configures OpenStack Horizon (Dashboard).",
"dependencies": [
{ "name": "puppetlabs/apache", "version_requirement": ">=1.1.2 <2.0.0" },
{ "name": "puppetlabs/apache", "version_requirement": ">=1.2.0 <2.0.0" },
{ "name": "puppetlabs/stdlib", "version_requirement": ">=4.0.0 <5.0.0" },
{ "name": "saz/memcached", "version_requirement": ">=2.0.2 <3.0.0" }
]

View File

@@ -44,7 +44,8 @@ describe 'horizon::wsgi::apache' do
'docroot' => '/var/www/',
'ssl' => 'false',
'redirectmatch_status' => 'permanent',
'redirectmatch_regexp' => "^/$ #{platforms_params[:root_url]}",
'redirectmatch_regexp' => '^/$',
'redirectmatch_dest' => platforms_params[:root_url],
'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' },
'wsgi_process_group' => platforms_params[:wsgi_group],
'wsgi_daemon_process' => platforms_params[:wsgi_group],
@@ -76,7 +77,8 @@ describe 'horizon::wsgi::apache' do
'docroot' => '/var/www/',
'ssl' => 'false',
'redirectmatch_status' => 'permanent',
'redirectmatch_regexp' => "^/$ #{platforms_params[:root_url]}",
'redirectmatch_regexp' => '^/$',
'redirectmatch_dest' => platforms_params[:root_url],
'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' },
'wsgi_process_group' => platforms_params[:wsgi_group],
'wsgi_daemon_process' => platforms_params[:wsgi_group],
@@ -112,7 +114,8 @@ describe 'horizon::wsgi::apache' do
'ssl_key' => '/etc/pki/tls/private/httpd.key',
'ssl_ca' => '/etc/pki/tls/certs/ca.crt',
'redirectmatch_status' => 'permanent',
'redirectmatch_regexp' => "^/$ #{platforms_params[:root_url]}",
'redirectmatch_regexp' => '^/$',
'redirectmatch_dest' => platforms_params[:root_url],
'wsgi_process_group' => 'horizon-ssl',
'wsgi_daemon_process' => 'horizon-ssl',
'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' }
@@ -127,7 +130,8 @@ describe 'horizon::wsgi::apache' do
'docroot' => '/var/www/',
'ssl' => 'false',
'redirectmatch_status' => 'permanent',
'redirectmatch_regexp' => '(.*) https://some.host.tld',
'redirectmatch_regexp' => '(.*)',
'redirectmatch_dest' => 'https://some.host.tld',
'wsgi_process_group' => platforms_params[:wsgi_group],
'wsgi_daemon_process' => platforms_params[:wsgi_group],
'wsgi_script_aliases' => { platforms_params[:root_url] => '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' }