From d79792c0914449a3849624f0bfd852c222a2b842 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Tue, 14 Apr 2026 15:39:58 -0300 Subject: [PATCH] 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 fixes: #7574 --- CHANGES/7574.bugfix | 2 ++ pulpcore/content/entrypoint.py | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 CHANGES/7574.bugfix diff --git a/CHANGES/7574.bugfix b/CHANGES/7574.bugfix new file mode 100644 index 00000000000..202507a9974 --- /dev/null +++ b/CHANGES/7574.bugfix @@ -0,0 +1,2 @@ +Fixed gunicorn control socket being placed on persistent location. +This could cause `Control server error: [Errno 13]` errors on kubernetes environements on pod restarts. diff --git a/pulpcore/content/entrypoint.py b/pulpcore/content/entrypoint.py index 0965ee7fccc..6b690c2ed48 100644 --- a/pulpcore/content/entrypoint.py +++ b/pulpcore/content/entrypoint.py @@ -15,6 +15,9 @@ def load_app_specific_config(self): ) self.set_option("default_proc_name", "pulpcore-content", enforced=True) self.set_option("worker_class", worker_class, enforced=True) + # On k8s, the default location may persist across restarts and cause permission errors + # See: + self.set_option("control_socket", "/tmp/pulpcore-content.ctl") def load(self): import pulpcore.content