From de919181b8240e91eaf3d7b9f3223e57639ba6c6 Mon Sep 17 00:00:00 2001 From: Jan Jasek Date: Wed, 21 Oct 2026 16:33:35 +0200 Subject: [PATCH] Bump Horizon dashboard site-packages path to Python 3.12 The Horizon image now runs on Python 3.12, so the hardcoded python3.9 mount path no longer matches where Django loads panels. --- internal/horizon/volumes.go | 4 ++-- templates/horizon/bin/dashboard_setup | 2 +- test/kuttl/tests/tls-deployment/01-assert.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/horizon/volumes.go b/internal/horizon/volumes.go index 945c58a2..29b38e8e 100644 --- a/internal/horizon/volumes.go +++ b/internal/horizon/volumes.go @@ -309,8 +309,8 @@ func GetVarLogHttpdVolumeMount() corev1.VolumeMount { // Python version ever changes, this constant needs updating to match, or the // dashboard-setup init container will fail loudly (permission denied writing // to the real, unshadowed site-packages path) rather than silently -// misbehave. Confirmed via a real WSGI traceback: Python 3.9. -const SitePackagesPath = "/usr/lib/python3.9/site-packages" +// misbehave. Confirmed via a real WSGI traceback: Python 3.12. +const SitePackagesPath = "/usr/lib/python3.12/site-packages" // DashboardEnabledFinalPath is where dashboard_setup's config_dashboard // function copies/removes per-service dashboard panel files diff --git a/templates/horizon/bin/dashboard_setup b/templates/horizon/bin/dashboard_setup index e42b099b..9df7a7de 100755 --- a/templates/horizon/bin/dashboard_setup +++ b/templates/horizon/bin/dashboard_setup @@ -24,7 +24,7 @@ MANAGE_PY="/usr/bin/python3 /usr/bin/manage.py" # a Kubernetes VolumeMount path must be a fixed string decided at # pod-spec-build time, so if this ever needs to change, both places need # updating together. -SITE_PACKAGES="/usr/lib/python3.9/site-packages" +SITE_PACKAGES="/usr/lib/python3.12/site-packages" # There may not be an ENABLE_WATCHER variable. Defaulting it to no. ENABLE_WATCHER="${ENABLE_WATCHER:-no}" # There may not be an ENABLE_CLOUDKITTY variable. Defaulting it to no. diff --git a/test/kuttl/tests/tls-deployment/01-assert.yaml b/test/kuttl/tests/tls-deployment/01-assert.yaml index b1837a91..1cb9df07 100644 --- a/test/kuttl/tests/tls-deployment/01-assert.yaml +++ b/test/kuttl/tests/tls-deployment/01-assert.yaml @@ -88,7 +88,7 @@ spec: name: var-log-httpd - mountPath: /usr/share/openstack-dashboard/openstack_dashboard/themes name: themes - - mountPath: /usr/lib/python3.9/site-packages/openstack_dashboard/local/enabled + - mountPath: /usr/lib/python3.12/site-packages/openstack_dashboard/local/enabled name: dashboard-enabled - mountPath: /usr/share/openstack-dashboard/static name: dashboard-static @@ -171,7 +171,7 @@ spec: name: var-log-httpd - mountPath: /usr/share/openstack-dashboard/openstack_dashboard/themes name: themes - - mountPath: /usr/lib/python3.9/site-packages/openstack_dashboard/local/enabled + - mountPath: /usr/lib/python3.12/site-packages/openstack_dashboard/local/enabled name: dashboard-enabled - mountPath: /usr/share/openstack-dashboard/static name: dashboard-static