diff --git a/manifests/wsgi/uwsgi_api.pp b/manifests/wsgi/uwsgi_api.pp index 8ce4ea6fd..d169882f3 100644 --- a/manifests/wsgi/uwsgi_api.pp +++ b/manifests/wsgi/uwsgi_api.pp @@ -15,7 +15,7 @@ # # [*threads*] # (Optional) Number of threads. -# Defaults to 32. +# Defaults to 1. # # [*listen_queue_size*] # (Optional) Socket listen queue size. @@ -23,7 +23,7 @@ # class nova::wsgi::uwsgi_api ( $processes = $::os_workers, - $threads = 32, + $threads = 1, $listen_queue_size = 100, ){ @@ -33,6 +33,10 @@ class nova::wsgi::uwsgi_api ( warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') } + if $threads != 1 { + warning('The nova API currently does not support anything else than threads=1.') + } + nova_api_uwsgi_config { 'uwsgi/processes': value => $processes; 'uwsgi/threads': value => $threads; diff --git a/manifests/wsgi/uwsgi_api_metadata.pp b/manifests/wsgi/uwsgi_api_metadata.pp index 0d4e3b0b3..fbd8d38cb 100644 --- a/manifests/wsgi/uwsgi_api_metadata.pp +++ b/manifests/wsgi/uwsgi_api_metadata.pp @@ -23,7 +23,7 @@ # class nova::wsgi::uwsgi_api_metadata ( $processes = $::os_workers, - $threads = 32, + $threads = 1, $listen_queue_size = 100, ){ @@ -33,6 +33,10 @@ class nova::wsgi::uwsgi_api_metadata ( warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') } + if $threads != 1 { + warning('The nova API currently does not support anything else than threads=1.') + } + nova_api_metadata_uwsgi_config { 'uwsgi/processes': value => $processes; 'uwsgi/threads': value => $threads; diff --git a/releasenotes/notes/uwsgi-a9f90e3a5148a7f7.yaml b/releasenotes/notes/uwsgi-a9f90e3a5148a7f7.yaml index 591524c2c..d1c8a4786 100644 --- a/releasenotes/notes/uwsgi-a9f90e3a5148a7f7.yaml +++ b/releasenotes/notes/uwsgi-a9f90e3a5148a7f7.yaml @@ -4,5 +4,6 @@ features: Two new calsses nova::wsgi::wsgi_api and nova::wsgi::wsgi_api_metadata exist to allow configuring uwsgi in operating systems that support this (ie: currently Debian). This helps configuring the number of processes, - threads and listen socket. Also, two new nova_api_uwsgi_config and - nova_api_metadata_uwsgi_config provider now exist. + threads, and listen socket. Please note that currently, nova does not + support anything else than threads=1. Also, two new nova_api_uwsgi_config + and nova_api_metadata_uwsgi_config provider now exist. diff --git a/spec/classes/nova_wsgi_uwsgi_api_metadata_spec.rb b/spec/classes/nova_wsgi_uwsgi_api_metadata_spec.rb index 197ba2eb9..a4da7acd2 100644 --- a/spec/classes/nova_wsgi_uwsgi_api_metadata_spec.rb +++ b/spec/classes/nova_wsgi_uwsgi_api_metadata_spec.rb @@ -10,7 +10,7 @@ describe 'nova::wsgi::uwsgi_api_metadata' do it { is_expected.to contain_nova_api_metadata_uwsgi_config('uwsgi/processes').with_value(facts[:os_workers]) - is_expected.to contain_nova_api_metadata_uwsgi_config('uwsgi/threads').with_value('32') + is_expected.to contain_nova_api_metadata_uwsgi_config('uwsgi/threads').with_value('1') is_expected.to contain_nova_api_metadata_uwsgi_config('uwsgi/listen').with_value('100') } end diff --git a/spec/classes/nova_wsgi_uwsgi_api_spec.rb b/spec/classes/nova_wsgi_uwsgi_api_spec.rb index 72a68dadb..4f1e618bc 100644 --- a/spec/classes/nova_wsgi_uwsgi_api_spec.rb +++ b/spec/classes/nova_wsgi_uwsgi_api_spec.rb @@ -10,7 +10,7 @@ describe 'nova::wsgi::uwsgi_api' do it { is_expected.to contain_nova_api_uwsgi_config('uwsgi/processes').with_value(facts[:os_workers]) - is_expected.to contain_nova_api_uwsgi_config('uwsgi/threads').with_value('32') + is_expected.to contain_nova_api_uwsgi_config('uwsgi/threads').with_value('1') is_expected.to contain_nova_api_uwsgi_config('uwsgi/listen').with_value('100') } end