9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [3.1.0](https://github.com/theforeman/puppet-pulpcore/tree/3.1.0) (2021-02-09)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/3.0.0...3.1.0)

**Implemented enhancements:**

- Fixes [\#31835](https://projects.theforeman.org/issues/31835): Add disablereuse=on for pulpcore-content service [\#171](https://github.com/theforeman/puppet-pulpcore/pull/171) ([ehelms](https://github.com/ehelms))
- Fixes [\#31815](https://projects.theforeman.org/issues/31815) - Allow setting number of workers for content app [\#170](https://github.com/theforeman/puppet-pulpcore/pull/170) ([ehelms](https://github.com/ehelms))

## [3.0.0](https://github.com/theforeman/puppet-pulpcore/tree/3.0.0) (2021-01-28)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/2.2.2...3.0.0)
Expand Down
2 changes: 1 addition & 1 deletion manifests/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Hash[String, Any] $http_vhost_options = {},
Hash[String, Any] $https_vhost_options = {},
Enum['none', 'optional', 'require', 'optional_no_ca'] $ssl_verify_client = 'optional',
Hash $content_proxy_params = {'timeout' => '600'},
Hash $content_proxy_params = {'timeout' => '600', 'disablereuse' => 'on'},
Hash $api_proxy_params = {'timeout' => '600'},
) {
include pulpcore
Expand Down
10 changes: 10 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@
# @param service_ensure
# Specify if Pulp services should be running or stopped.
#
# @param content_service_worker_count
# Number of pulpcore-content service workers for gunicorn to use.
# Modifying this parameter should be done incrementally with benchmarking at each step to determine an optimal value for your deployment.
#
# @param api_service_worker_count
# Number of pulpcore-api service workers for gunicorn to use.
# Modifying this parameter should be done incrementally with benchmarking at each step to determine an optimal value for your deployment.
#
# @example Default configuration
# include pulpcore
#
Expand Down Expand Up @@ -178,6 +186,8 @@
Integer[0] $worker_count = min(8, $facts['processors']['count']),
Boolean $service_enable = true,
Boolean $service_ensure = true,
Integer[0] $content_service_worker_count = (2*min(8, $facts['processors']['count']) + 1),
Integer[0] $api_service_worker_count = 1,
) {
$settings_file = "${config_dir}/settings.py"

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-pulpcore",
"version": "3.0.0",
"version": "3.1.0",
"author": "theforeman",
"summary": "Installs next generation Pulp server",
"license": "GPL-3.0-or-later",
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/plugin_deb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<Location "/pulp/deb">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
Expand All @@ -46,7 +46,7 @@
<Location "/pulp/deb">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/plugin_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<Location "/pulp/isos">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
Expand All @@ -44,7 +44,7 @@
<Location "/pulp/isos">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/plugin_rpm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<Location "/pulp/repos">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
Expand All @@ -46,7 +46,7 @@
<Location "/pulp/repos">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
'provider' => 'location',
'proxy_pass' => [{
'url' => 'unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content',
'params' => {'timeout' => '600'},
'params' => {'timeout' => '600', 'disablereuse' => 'on'},
}],
'request_headers' => [
'unset X-CLIENT-CERT',
Expand All @@ -86,7 +86,7 @@
'provider' => 'location',
'proxy_pass' => [{
'url' => 'unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content',
'params' => {'timeout' => '600'},
'params' => {'timeout' => '600', 'disablereuse' => 'on'},
}],
'request_headers' => [
'unset X-CLIENT-CERT',
Expand Down Expand Up @@ -278,7 +278,7 @@
<Location "/pulp/content">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
Expand All @@ -295,7 +295,7 @@
<Location "/pulp/content">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content timeout=600
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
Expand Down
1 change: 1 addition & 0 deletions templates/pulpcore-api.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Group=<%= scope['pulpcore::group'] %>
WorkingDirectory=<%= scope['pulpcore::user_home'] %>
RuntimeDirectory=pulpcore-api
ExecStart=/usr/libexec/pulpcore/gunicorn pulpcore.app.wsgi:application \
-w <%= scope['pulpcore::api_service_worker_count'] %> \
--access-logfile -
ExecReload=/bin/kill -s HUP $MAINPID
ProtectSystem=full
Expand Down
2 changes: 1 addition & 1 deletion templates/pulpcore-content.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WorkingDirectory=<%= scope['pulpcore::user_home'] %>
RuntimeDirectory=pulpcore-content
ExecStart=/usr/libexec/pulpcore/gunicorn pulpcore.content:server \
--worker-class 'aiohttp.GunicornWebWorker' \
-w 2 \
-w <%= scope['pulpcore::content_service_worker_count'] %> \
--access-logfile -
ExecReload=/bin/kill -s HUP $MAINPID
SyslogIdentifier=pulpcore-content
Expand Down