Skip to content

Commit d79792c

Browse files
pedro-psbclaude
andcommitted
Fix gunicorn control socket path causing Permission denied on k8s rolling updates
gunicorn 23.x introduced a control socket (gunicornc) that defaults to gunicorn.ctl relative to the working directory. Since pulpcore-content sets its CWD to WORKING_DIRECTORY (/var/lib/pulp/tmp by default), the socket lands on the shared PVC and persists across pod restarts, causing Permission denied when a new pod tries to recreate it during a rolling update. Default to /tmp/pulpcore-content.ctl, which is pod-local ephemeral storage. Users who want a different path can override via gunicorn.conf.py. Assisted-by: Claude Code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> fixes: #7574
1 parent fc59772 commit d79792c

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGES/7574.bugfix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed gunicorn control socket being placed on persistent location.
2+
This could cause `Control server error: [Errno 13]` errors on kubernetes environements on pod restarts.

pulpcore/content/entrypoint.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ def load_app_specific_config(self):
1515
)
1616
self.set_option("default_proc_name", "pulpcore-content", enforced=True)
1717
self.set_option("worker_class", worker_class, enforced=True)
18+
# On k8s, the default location may persist across restarts and cause permission errors
19+
# See: <https://github.com/pulp/pulpcore/issues/7574>
20+
self.set_option("control_socket", "/tmp/pulpcore-content.ctl")
1821

1922
def load(self):
2023
import pulpcore.content

0 commit comments

Comments
 (0)