Container plugin's param-less /pulpcore_registry ProxyPass makes Apache ignore timeout=600 on /pulp/api/v3 (mod_proxy worker sharing)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- apache
- Domain
- devops
Research direction
Start with manifests/plugin/container.pp and compare its ProxyPass entries with pulpcore::apache's api_proxy_params. Render the Apache configuration or run the minimal reproduction to verify that /pulp/api/v3 honors the longer timeout instead of the global Timeout; done means the request completes after the configured delay rather than returning a 502 at 60 seconds.
Written by the indexing model from the issue text.
Description
Summary
pulpcore::plugin::container adds a /pulpcore_registry ProxyPass to $pulpcore::apache::api_base_url without params. That backend URL is a leading prefix of the /pulp/api/v3 (and /pypi) backend URLs, so mod_proxy shares that parameterless worker and drops the parameters given later. As a result, the timeout=600 from $pulpcore::apache::api_proxy_params (added in #160) has no effect on /pulp/api/v3, and API requests fall back to httpd's global Timeout 60.
Environment
- foreman-installer 5.0.0 (Katello scenario), puppet-pulpcore 14.3.0, on EL9 with httpd 2.4.62
manifests/plugin/container.pponmasterstill has noparamson this ProxyPass
Rendered config (relevant lines, in file order)
<Location "/pulpcore_registry">
ProxyPass unix:///run/pulpcore-api.sock|http://pulpcore-api
</Location>
...
<Location "/pypi">
ProxyPass unix:///run/pulpcore-api.sock|http://pulpcore-api/pypi timeout=600
</Location>
...
<Location "/pulp/api/v3">
ProxyPass unix:///run/pulpcore-api.sock|http://pulpcore-api/pulp/api/v3 timeout=600
</Location>
The Apache mod_proxy docs, under "Worker Sharing", say:
Worker sharing happens if the worker URLs overlap, which occurs when the URL of some worker is a leading substring of the URL of another worker defined later in the configuration file. [...] the second worker isn't actually created. Instead the first worker is used. [...] Note that all configuration attributes given explicitly for the later worker will be ignored.
Symptom
Katello content-view publishes pause with a Pulp 502. Apache logs this about 60 s after the request started:
[proxy_http:error] (70007)The timeout specified has expired: AH01102: error reading status line from remote server pulpcore-api:80
In one case Pulp finished the request after 83 s, but Apache had already returned the 502 at 60 s.
Minimal reproduction (plain httpd, no Foreman)
The backend is a unix-socket HTTP server that sleeps ?s=N seconds before replying. The global Timeout is 3 and the API location sets timeout=10. The request is GET /pulp/api/v3/...?s=6.
| Variant | Config | Result |
|---|---|---|
| A | param-less /pulpcore_registry ProxyPass before /pulp/api/v3 ... timeout=10 |
502 at 3 s (AH01102) |
| C | only /pulp/api/v3 ... timeout=10 |
200 after 6 s |
| D | as A, but the registry ProxyPass also has timeout=10 |
200 after 6 s |
| B | as A, plus a global ProxyTimeout 10 |
200 after 6 s |
Suggested fix
Pass the API proxy params in manifests/plugin/container.pp, the same way pulpcore::apache already does:
'proxy_pass' => [
{
'url' => $pulpcore::apache::api_base_url,
'params' => $pulpcore::apache::api_proxy_params,
},
],
The /pulp/container/ ProxyPass in the same file could take $pulpcore::apache::content_proxy_params for consistency.
Workaround
In /etc/foreman-installer/custom-hiera.yaml:
apache::mod::proxy::proxy_timeout: 600
This sets a global ProxyTimeout that the shared worker inherits (variant B). It is the same key the Foreman Tuning Performance guide documents for proxy timeouts.
- Dominant language
- Ruby
- Stars
- 2
- Forks
- 35
- Avg merge
- 13h 43m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from theforeman/puppet-pulpcore
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
theforeman/puppet-pulpcore#378 · 5 comments · 1 reaction ·
-
Sensitive DataOpen
Difficulty 3/5 1-2 days Newbie friendliness 35/100
theforeman/puppet-pulpcore#340 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
theforeman/puppet-pulpcore#332 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
theforeman/puppet-pulpcore#322 · 9 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
theforeman/puppet-pulpcore#51 · 1 comment ·
All issues in theforeman/puppet-pulpcore
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
seek4science/seek#2784 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
yosiat/panko_serializer#243 ·
-
enhancement priority: medium risk: low v1.9.0
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
davidteren/mutineer#379 ·
Maintainers usually reply within 2 days
-
Translation tutorial: snippet crashes on chunks export and misses simple { t } entriesPossibly taken @Mahdi-Hasan claimed this today. Openresource-documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TarteelAI/quranic-universal-library#1020 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 6 days