
We should not tweak the number of threads, nova-api is only mono-threaded and will currently refuse to work with anything else than 1. So this patch sets 1 by default, and warns if wsgi::uwsgi is called with something else. Change-Id: Ib109175b2e1a9f9f6b96355d29f9f9a95c303957
46 lines
1.0 KiB
Puppet
46 lines
1.0 KiB
Puppet
#
|
|
# Copyright 2021 Thomas Goirand <zigo@debian.org>
|
|
#
|
|
# Author: Thomas Goirand <zigo@debian.org>
|
|
#
|
|
# == Class: nova::wsgi::uwsgi_api_metadata
|
|
#
|
|
# Configure the UWSGI service for Nova API Metadata.
|
|
#
|
|
# == Parameters
|
|
#
|
|
# [*processes*]
|
|
# (Optional) Number of processes.
|
|
# Defaults to $::os_workers.
|
|
#
|
|
# [*threads*]
|
|
# (Optional) Number of threads.
|
|
# Defaults to 32.
|
|
#
|
|
# [*listen_queue_size*]
|
|
# (Optional) Socket listen queue size.
|
|
# Defaults to 100
|
|
#
|
|
class nova::wsgi::uwsgi_api_metadata (
|
|
$processes = $::os_workers,
|
|
$threads = 1,
|
|
$listen_queue_size = 100,
|
|
){
|
|
|
|
include nova::deps
|
|
|
|
if $::os_package_type != 'debian'{
|
|
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;
|
|
'uwsgi/listen': value => $listen_queue_size;
|
|
}
|
|
}
|