Revision 9de15a3d
Added by Martin Bacovsky about 7 years ago
manifests/init.pp | ||
---|---|---|
# $enable_crane:: Boolean to enable crane docker repository
|
||
# type:boolean
|
||
#
|
||
# $max_tasks_per_child:: Number of tasks after which the worker is restarted
|
||
# and the memory it allocated is returned to the system
|
||
# type:integer
|
||
#
|
||
# $enable_rpm:: Boolean to enable rpm plugin. Defaults
|
||
# to true
|
||
# type:boolean
|
||
... | ... | |
# Warning: may display and log passwords contained in these files.
|
||
# Defaults to false
|
||
# type:boolean
|
||
#
|
||
#
|
||
class pulp (
|
||
$version = $pulp::params::version,
|
||
$crane_debug = $pulp::params::crane_debug,
|
||
... | ... | |
$num_workers = $pulp::params::num_workers,
|
||
$enable_katello = $pulp::params::enable_katello,
|
||
$enable_crane = $pulp::params::enable_crane,
|
||
$max_tasks_per_child = $pulp::params::max_tasks_per_child,
|
||
$enable_docker = $pulp::params::enable_docker,
|
||
$enable_rpm = $pulp::params::enable_rpm,
|
||
$enable_puppet = $pulp::params::enable_puppet,
|
manifests/params.pp | ||
---|---|---|
|
||
$max_keep_alive = 10000
|
||
$num_workers = min($::processorcount, 8)
|
||
$max_tasks_per_child = undef
|
||
|
||
$yum_max_speed = undef
|
||
|
templates/systemd_pulp_workers | ||
---|---|---|
|
||
# Configure Python's encoding for writing all logs, stdout and stderr
|
||
PYTHONIOENCODING="UTF-8"
|
||
|
||
# To avoid memory leaks, Pulp can terminate and replace a worker after processing X tasks. If
|
||
# left commented, process recycling is disabled. PULP_MAX_TASKS_PER_CHILD must be > 0.
|
||
<% if scope['pulp::max_tasks_per_child'] != :undef and scope['pulp::max_tasks_per_child'].to_i > 0 %>
|
||
PULP_MAX_TASKS_PER_CHILD=<%= scope['pulp::max_tasks_per_child'] %>
|
||
<% else %>
|
||
# PULP_MAX_TASKS_PER_CHILD=2
|
||
<% end %>
|
templates/upstart_pulp_workers | ||
---|---|---|
# Configure Python's encoding for writing all logs, stdout and stderr
|
||
PYTHONIOENCODING="UTF-8"
|
||
|
||
|
||
# To avoid memory leaks, Pulp can terminate and replace a worker after processing X tasks. If
|
||
# left commented, process recycling is disabled. PULP_MAX_TASKS_PER_CHILD must be > 0.
|
||
<% if scope['pulp::max_tasks_per_child'] != :undef and scope['pulp::max_tasks_per_child'].to_i > 0 %>
|
||
PULP_MAX_TASKS_PER_CHILD=<%= scope['pulp::max_tasks_per_child'] %>
|
||
<% else %>
|
||
# PULP_MAX_TASKS_PER_CHILD=2
|
||
<% end %>
|
||
|
||
######################################################################
|
||
# Please do not edit any of the settings below this mark in this file!
|
||
######################################################################
|
Also available in: Unified diff
Refs #17298 - Add max tasks per Pulp worker