Skip to content

Add migration to set gunicorn control socket paths for pulpcore#1057

Merged
evgeni merged 1 commit intotheforeman:developfrom
Odilhao:fix-puppet-gunicorn-pulpcore
May 5, 2026
Merged

Add migration to set gunicorn control socket paths for pulpcore#1057
evgeni merged 1 commit intotheforeman:developfrom
Odilhao:fix-puppet-gunicorn-pulpcore

Conversation

@Odilhao
Copy link
Copy Markdown
Member

@Odilhao Odilhao commented Apr 30, 2026

Gunicorn 25.1.0+ defaults to creating a control socket at $HOME/gunicorn.ctl (/var/lib/pulp/gunicorn.ctl for the pulp user), causing SELinux AVC denials. theforeman/puppet-pulpcore#403 adds api_control_socket_path and content_control_socket_path parameters; this migration sets them to /run/pulpcore-{api,content}/gunicorn.ctl for existing installations, where systemd already creates those directories with the correct pulpcore_server_var_run_t SELinux label.

@Odilhao Odilhao force-pushed the fix-puppet-gunicorn-pulpcore branch from bd408aa to 7d089a2 Compare April 30, 2026 20:36
Gunicorn 25.1.0+ defaults to creating a control socket at
\$HOME/gunicorn.ctl (/var/lib/pulp/gunicorn.ctl for the pulp user),
causing SELinux AVC denials. puppet-pulpcore PR theforeman#403 adds
api_control_socket_path and content_control_socket_path parameters;
this migration sets them to /run/pulpcore-{api,content}/gunicorn.ctl
for existing installations, where systemd already creates those
directories with the correct pulpcore_server_var_run_t SELinux label.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Odilhao Odilhao force-pushed the fix-puppet-gunicorn-pulpcore branch from 7d089a2 to 6d89ea6 Compare April 30, 2026 20:37
@ianballou
Copy link
Copy Markdown
Contributor

For this and the pulpcore change to work, Pulp needs to backport pulp/pulpcore#7591 to 3.105 , unless it was patched somewhere?

@ianballou
Copy link
Copy Markdown
Contributor

I gave this a test after patching Pulpcore to support the control socket argument, and the AVC denials are not coming back. I also applied theforeman/puppet-foreman_proxy_content#537 and theforeman/puppet-foreman_proxy_content#537.

@evgeni evgeni marked this pull request as draft May 4, 2026 06:39
@evgeni
Copy link
Copy Markdown
Member

evgeni commented May 4, 2026

Converted to a draft until pulp/pulpcore#7591 has been backported to the Pulp we're using, as otherwise merging this will break Pulp completely.

@Odilhao Odilhao marked this pull request as ready for review May 4, 2026 19:02
@Odilhao
Copy link
Copy Markdown
Member Author

Odilhao commented May 4, 2026

The pulpcore backport was done at theforeman/pulpcore-packaging@e9ca8b0 we can move this back to review ready, this will be the last piece to unlock ci.

@evgeni evgeni merged commit 25e94b8 into theforeman:develop May 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants