From 7b0e3c78c02d81aba4ca12f290798583e17dcc57 Mon Sep 17 00:00:00 2001 From: Luke Short Date: Thu, 13 Aug 2020 13:46:16 -0400 Subject: [PATCH] Expose vhost_custom_fragment It is provided by the Puppet class 'openstacklib::wsgi::apache'. This change exposes it for the Gnocchi service. Change-Id: I1425b400b2bc471295c448e3ec9e5035b00ad43a Signed-off-by: Luke Short (cherry picked from commit f7e1857771c000c25bdc34fd3bb3174df1423fc5) (cherry picked from commit 911a396c08985dcac0137fba5ea99d5931d64f1c) --- manifests/wsgi/apache.pp | 7 +++++++ spec/classes/gnocchi_wsgi_apache_spec.rb | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 3d058354..8afa9120 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -90,6 +90,11 @@ # { python-path => '/my/python/virtualenv' } # Defaults to {} # +# [*vhost_custom_fragment*] +# (optional) Passes a string of custom configuration +# directives to be placed at the end of the vhost configuration. +# Defaults to undef. +# # == Dependencies # # requires Class['apache'] & Class['gnocchi'] @@ -121,6 +126,7 @@ class gnocchi::wsgi::apache ( $access_log_format = false, $error_log_file = undef, $custom_wsgi_process_options = {}, + $vhost_custom_fragment = undef, ) { include ::gnocchi::deps @@ -148,6 +154,7 @@ class gnocchi::wsgi::apache ( ssl_key => $ssl_key, threads => $threads, user => 'gnocchi', + vhost_custom_fragment => $vhost_custom_fragment, workers => $workers, wsgi_daemon_process => 'gnocchi', wsgi_process_display_name => $wsgi_process_display_name, diff --git a/spec/classes/gnocchi_wsgi_apache_spec.rb b/spec/classes/gnocchi_wsgi_apache_spec.rb index 155b481b..c1c5162b 100644 --- a/spec/classes/gnocchi_wsgi_apache_spec.rb +++ b/spec/classes/gnocchi_wsgi_apache_spec.rb @@ -43,7 +43,8 @@ describe 'gnocchi::wsgi::apache' do }, :access_log_file => '/var/log/httpd/access_log', :access_log_format => 'some format', - :error_log_file => '/var/log/httpd/error_log' + :error_log_file => '/var/log/httpd/error_log', + :vhost_custom_fragment => 'Timeout 99' } end @@ -60,6 +61,7 @@ describe 'gnocchi::wsgi::apache' do :ssl => false, :threads => 2, :user => 'gnocchi', + :vhost_custom_fragment => 'Timeout 99', :workers => 8, :wsgi_daemon_process => 'gnocchi', :wsgi_process_display_name => 'gnocchi',