From 055a25e802a3c1d36cb048d9cda9b49b9d06c9c6 Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Mon, 10 Apr 2017 15:08:01 -0400 Subject: [PATCH] Move mistral wsgi source to generated script Use a pbr-generated script for the wsgi script. Also, set the defaults for the threads and workers to sane values. Change-Id: I61199f53d7e32fcb3d068ccaf548a836b5bb58e9 Depends-On: I953dbdab71029b392f8846c50fa3d801c293cc5a --- manifests/params.pp | 4 ++-- manifests/wsgi/apache.pp | 4 ++-- spec/classes/mistral_wsgi_apache_spec.rb | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 1b15ad0..5e6fcaa 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -19,7 +19,7 @@ class mistral::params { $executor_package_name = 'openstack-mistral-executor' $executor_service_name = 'openstack-mistral-executor' $mistral_wsgi_script_path = '/var/www/cgi-bin/mistral' - $mistral_wsgi_script_source = '/usr/lib/python2.7/site-packages/mistral/api/wsgi.py' + $mistral_wsgi_script_source = '/usr/bin/mistral-wsgi-api' } 'Debian': { $common_package_name = 'mistral-common' @@ -30,7 +30,7 @@ class mistral::params { $executor_package_name = 'mistral-executor' $executor_service_name = 'mistral-executor' $mistral_wsgi_script_path = '/usr/lib/cgi-bin/mistral' - $mistral_wsgi_script_source = '/usr/lib/python2.7/dist-packages/mistral/api/wsgi.py' + $mistral_wsgi_script_source = '/usr/bin/mistral-wsgi-api' } default: { fail("Unsupported osfamily: ${::osfamily} operatingsystem: \ diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index b6539d5..fc6c80c 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -86,7 +86,7 @@ class mistral::wsgi::apache ( $bind_host = undef, $path = '/', $ssl = true, - $workers = 1, + $workers = $::os_workers, $ssl_cert = undef, $ssl_key = undef, $ssl_chain = undef, @@ -95,7 +95,7 @@ class mistral::wsgi::apache ( $ssl_crl = undef, $ssl_certs_dir = undef, $wsgi_process_display_name = undef, - $threads = $::os_workers, + $threads = 1, $priority = '10', ) { diff --git a/spec/classes/mistral_wsgi_apache_spec.rb b/spec/classes/mistral_wsgi_apache_spec.rb index e45f9de..83293e6 100644 --- a/spec/classes/mistral_wsgi_apache_spec.rb +++ b/spec/classes/mistral_wsgi_apache_spec.rb @@ -41,8 +41,8 @@ describe 'mistral::wsgi::apache' do 'wsgi_daemon_process_options' => { 'user' => 'mistral', 'group' => 'mistral', - 'processes' => 1, - 'threads' => '8', + 'processes' => '8', + 'threads' => '1', 'display-name' => 'mistral_wsgi', }, 'wsgi_process_group' => 'mistral', @@ -77,7 +77,7 @@ describe 'mistral::wsgi::apache' do 'user' => 'mistral', 'group' => 'mistral', 'processes' => '37', - 'threads' => '8', + 'threads' => '1', 'display-name' => 'mistral', }, 'wsgi_process_group' => 'mistral', @@ -108,14 +108,14 @@ describe 'mistral::wsgi::apache' do :httpd_service_name => 'apache2', :httpd_ports_file => '/etc/apache2/ports.conf', :wsgi_script_path => '/usr/lib/cgi-bin/mistral', - :wsgi_script_source => '/usr/lib/python2.7/dist-packages/mistral/api/wsgi.py' + :wsgi_script_source => '/usr/bin/mistral-wsgi-api' } when 'RedHat' { :httpd_service_name => 'httpd', :httpd_ports_file => '/etc/httpd/conf/ports.conf', :wsgi_script_path => '/var/www/cgi-bin/mistral', - :wsgi_script_source => '/usr/lib/python2.7/site-packages/mistral/api/wsgi.py' + :wsgi_script_source => '/usr/bin/mistral-wsgi-api' } end