From 088c8e57d6fecaa0d80f95ade6baa5a9c9493466 Mon Sep 17 00:00:00 2001 From: haseeb Date: Wed, 8 Apr 2026 17:49:26 +0530 Subject: [PATCH] feat(placement): replace lazy-apps with close-on-exec/need-app in uWSGI lazy-apps=true was originally added to work around a bug where connections opened during app init (e.g. memcache sockets) were shared between uWSGI workers after forking (LP: #1600394). While effective, it defeats uWSGI's Copy-on-Write optimization from the master process and defers app loading until after fork, meaning a broken application won't be caught until workers try to serve. close-on-exec=true and close-on-exec2=true directly fix the fd-sharing problem by instructing uWSGI to close inherited file descriptors in each worker after forking, without sacrificing CoW. need-app=true causes uWSGI to exit immediately if the application fails to load, rather than leaving the master process running and appearing healthy while workers can't serve requests. This makes failures visible to liveness probes and the process manager. Ref: https://review.opendev.org/c/openstack/devstack/+/983361 Ref: https://bugs.launchpad.net/keystone/+bug/1600394 --- components/placement/values.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/placement/values.yaml b/components/placement/values.yaml index 041b7bbbf..6b2e47ca3 100644 --- a/components/placement/values.yaml +++ b/components/placement/values.yaml @@ -1,6 +1,17 @@ --- release_group: null +conf: + placement_api_uwsgi: + uwsgi: + start-time: "%t" + # Replace lazy-apps with need-app + close-on-exec per + # https://review.opendev.org/c/openstack/devstack/+/983361 + lazy-apps: false + need-app: true + close-on-exec: true + close-on-exec2: true + network: # configure OpenStack Helm to use Undercloud's ingress # instead of expecting the ingress controller provided