Skip to content

Commit c41bf04

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. fixes: #7574 Assisted-by: Claude Code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fc59772 commit c41bf04

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGES/7574.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed gunicorn control socket being placed on the shared PVC by defaulting to `/tmp/pulpcore-content.ctl`, preventing Permission denied errors during k8s rolling updates.

pulpcore/content/entrypoint.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ 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+
# Use /tmp for the gunicornc control socket (see https://gunicorn.org/guides/gunicornc/).
19+
# The default (relative to CWD) places it on the shared PVC, causing Permission denied
20+
# during k8s rolling updates. Users can override this via gunicorn.conf.py.
21+
self.set_option("control_socket", "/tmp/pulpcore-content.ctl")
1822

1923
def load(self):
2024
import pulpcore.content

0 commit comments

Comments
 (0)