Files
puppet-nova/manifests/wsgi/uwsgi_api.pp
Takashi Kajinami 51829b985f Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ibe75e48eeb387c213c42511797c59b9df39a7762
2023-03-02 12:25:22 +09:00

46 lines
1.0 KiB
Puppet

#
# Copyright 2021 Thomas Goirand <zigo@debian.org>
#
# Author: Thomas Goirand <zigo@debian.org>
#
# == Class: nova::wsgi::uwsgi_api
#
# Configure the UWSGI service for Nova API.
#
# == Parameters
#
# [*processes*]
# (Optional) Number of processes.
# Defaults to $facts['os_workers'].
#
# [*threads*]
# (Optional) Number of threads.
# Defaults to 1.
#
# [*listen_queue_size*]
# (Optional) Socket listen queue size.
# Defaults to 100
#
class nova::wsgi::uwsgi_api (
$processes = $facts['os_workers'],
$threads = 1,
$listen_queue_size = 100,
){
include nova::deps
if $facts['os']['name'] != '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_uwsgi_config {
'uwsgi/processes': value => $processes;
'uwsgi/threads': value => $threads;
'uwsgi/listen': value => $listen_queue_size;
}
}