diff --git a/manifests/init.pp b/manifests/init.pp index d1e9ba6..361fc74 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -48,6 +48,14 @@ # @param content_socket_path # Path where the Pulpcore Content service is listening. This is a unix socket. # +# @param api_control_socket_path +# Path for the gunicorn control socket of the API service. +# Only supported on gunicorn >= 25.1.0. Leave undef on older releases. +# +# @param content_control_socket_path +# Path for the gunicorn control socket of the Content service. +# Only supported on gunicorn >= 25.1.0. Leave undef on older releases. +# # @param config_dir # Pulp configuration directory. The settings.py file is created under this # directory. @@ -229,6 +237,8 @@ String[1] $apache_vhost_priority = '10', Stdlib::Absolutepath $api_socket_path = '/run/pulpcore-api.sock', Stdlib::Absolutepath $content_socket_path = '/run/pulpcore-content.sock', + Optional[Stdlib::Absolutepath] $api_control_socket_path = undef, + Optional[Stdlib::Absolutepath] $content_control_socket_path = undef, String $postgresql_db_name = 'pulpcore', String $postgresql_db_user = 'pulp', String $postgresql_db_password = extlib::cache_data('pulpcore_cache_data', 'db_password', extlib::random_password(32)), diff --git a/templates/pulpcore-api.service.erb b/templates/pulpcore-api.service.erb index 44a2a32..ff2e5c1 100644 --- a/templates/pulpcore-api.service.erb +++ b/templates/pulpcore-api.service.erb @@ -19,7 +19,8 @@ ExecStart=/usr/bin/pulpcore-api \ --max-requests <%= scope['pulpcore::api_service_worker_max_requests'] %> \ --max-requests-jitter <%= scope['pulpcore::api_service_worker_max_requests_jitter'] %> \ --access-logfile - \ - --access-logformat 'pulp [%({correlation-id}o)s]: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"' + --access-logformat 'pulp [%({correlation-id}o)s]: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'<% if scope['pulpcore::api_control_socket_path'] %> \ + --control-socket <%= scope['pulpcore::api_control_socket_path'] %><% end %> ExecReload=/bin/kill -s HUP $MAINPID ProtectSystem=full PrivateTmp=yes diff --git a/templates/pulpcore-content.service.erb b/templates/pulpcore-content.service.erb index e8a5dde..71efa4a 100644 --- a/templates/pulpcore-content.service.erb +++ b/templates/pulpcore-content.service.erb @@ -16,7 +16,8 @@ ExecStart=/usr/bin/pulpcore-content \ --preload \ --timeout <%= scope['pulpcore::content_service_worker_timeout'] %> \ --workers <%= scope['pulpcore::content_service_worker_count'] %> \ - --access-logfile - + --access-logfile -<% if scope['pulpcore::content_control_socket_path'] %> \ + --control-socket <%= scope['pulpcore::content_control_socket_path'] %><% end %> ExecReload=/bin/kill -s HUP $MAINPID SyslogIdentifier=pulpcore-content