Skip to content

Commit

Permalink
Refs #32891 - Optionally enable new Pulpcore tasking system
Browse files Browse the repository at this point in the history
Requires theforeman/puppet-pulpcore#203

(cherry picked from commit baa0e9c)
  • Loading branch information
wbclark authored and ehelms committed Jul 12, 2021
1 parent 168b42c commit 3567bed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
# degradation due to I/O blocking and is not recommended in most cases. Modifying this parameter should be done
# incrementally with benchmarking at each step to determine an optimal value for your deployment.
#
# $pulpcore_use_rq_tasking_system:: Use the older RQ workers tasking system instead of the newer PostgreSQL tasking system introduced in Pulpcore 3.13.
# Any benchmarking you did to optimize worker_count or other tasking related parameters will no longer be accurate after
# changing the tasking system. Do not modify this setting unless you understand the implications for performance and stability.
#
# $pulpcore_content_service_worker_timeout:: Gunicorn worker timeout in seconds for the pulpcore-content.service
#
# $pulpcore_api_service_worker_timeout:: Gunicorn worker timeout in seconds for the pulpcore-api.service
Expand Down Expand Up @@ -128,6 +132,7 @@
Stdlib::Absolutepath $pulpcore_postgresql_ssl_key = '/etc/pki/katello/private/pulpcore-database.key',
Stdlib::Absolutepath $pulpcore_postgresql_ssl_root_ca = '/etc/pki/tls/certs/ca-bundle.crt',
Integer[0] $pulpcore_worker_count = $foreman_proxy_content::params::pulpcore_worker_count,
Boolean $pulpcore_use_rq_tasking_system = $foreman_proxy_content::params::pulpcore_use_rq_tasking_system,
Optional[String[50]] $pulpcore_django_secret_key = undef,
Integer[0] $pulpcore_content_service_worker_timeout = $foreman_proxy_content::params::pulpcore_content_service_worker_timeout,
Integer[0] $pulpcore_api_service_worker_timeout = $foreman_proxy_content::params::pulpcore_api_service_worker_timeout,
Expand Down Expand Up @@ -262,6 +267,7 @@
postgresql_db_ssl_key => $pulpcore_postgresql_ssl_key,
postgresql_db_ssl_root_ca => $pulpcore_postgresql_ssl_root_ca,
worker_count => $pulpcore_worker_count,
use_rq_tasking_system => $pulpcore_use_rq_tasking_system,
django_secret_key => $pulpcore_django_secret_key,
content_service_worker_timeout => $pulpcore_content_service_worker_timeout,
api_service_worker_timeout => $pulpcore_api_service_worker_timeout,
Expand Down
5 changes: 3 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

$pulpcore_allowed_content_checksums = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512']

$pulpcore_postgresql_password = extlib::cache_data('pulpcore_cache_data', 'db_password', extlib::random_password(32))
$pulpcore_worker_count = min(8, $facts['processors']['count'])
$pulpcore_postgresql_password = extlib::cache_data('pulpcore_cache_data', 'db_password', extlib::random_password(32))
$pulpcore_worker_count = min(8, $facts['processors']['count'])
$pulpcore_use_rq_tasking_system = false

$pulpcore_content_service_worker_timeout = 90
$pulpcore_api_service_worker_timeout = 90
Expand Down

0 comments on commit 3567bed

Please sign in to comment.