From c93df107736398617d1e4f0aa25d66453df48fd9 Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Wed, 15 May 2024 16:44:42 -0500 Subject: [PATCH] Align horizon chart with 2024.1 - Update pymysql version info. Horizon requiers newer mysql client version than we had previously - Update scripts to use sysconfig.get_path instead of distutils.sysconfig.get_python_lib which is deprecated Story: 2011130 Depends-On: Ibd278f64b49c445dbbf774240a38c6c5ef3a4548 Change-Id: Ic763b72268042bda029c373d2b54c4c309fc70d2 --- horizon/Chart.yaml | 2 +- horizon/templates/bin/_db-sync.sh.tpl | 2 +- horizon/templates/bin/_django.wsgi.tpl | 2 +- horizon/templates/bin/_horizon.sh.tpl | 2 +- horizon/templates/bin/_manage.py.tpl | 2 +- horizon/values.yaml | 4 ++-- releasenotes/notes/horizon.yaml | 1 + zuul.d/project.yaml | 1 + 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/horizon/Chart.yaml b/horizon/Chart.yaml index 3c3712ef74..0c16bf55ee 100644 --- a/horizon/Chart.yaml +++ b/horizon/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Horizon name: horizon -version: 0.3.21 +version: 0.3.22 home: https://docs.openstack.org/horizon/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Horizon/OpenStack_Project_Horizon_vertical.png sources: diff --git a/horizon/templates/bin/_db-sync.sh.tpl b/horizon/templates/bin/_db-sync.sh.tpl index 7ef6a84da7..33e8be1de1 100644 --- a/horizon/templates/bin/_db-sync.sh.tpl +++ b/horizon/templates/bin/_db-sync.sh.tpl @@ -16,7 +16,7 @@ limitations under the License. set -ex -SITE_PACKAGES_ROOT=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +SITE_PACKAGES_ROOT=$(python -c "from sysconfig import get_path; print(get_path('platlib'))") rm -f ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/local_settings.py ln -s /etc/openstack-dashboard/local_settings ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/local_settings.py diff --git a/horizon/templates/bin/_django.wsgi.tpl b/horizon/templates/bin/_django.wsgi.tpl index 4626f21a94..8975ed7cfb 100644 --- a/horizon/templates/bin/_django.wsgi.tpl +++ b/horizon/templates/bin/_django.wsgi.tpl @@ -23,7 +23,7 @@ import sys import pymysql -pymysql.version_info = (1, 4, 0, "final", 0) +pymysql.version_info = (2, 2, 4, 'final', 0) pymysql.install_as_MySQLdb() from django.core.wsgi import get_wsgi_application diff --git a/horizon/templates/bin/_horizon.sh.tpl b/horizon/templates/bin/_horizon.sh.tpl index 0c2035a38e..62dc21614c 100644 --- a/horizon/templates/bin/_horizon.sh.tpl +++ b/horizon/templates/bin/_horizon.sh.tpl @@ -18,7 +18,7 @@ set -ex COMMAND="${@:-start}" function start () { - SITE_PACKAGES_ROOT=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") + SITE_PACKAGES_ROOT=$(python -c "from sysconfig import get_path; print(get_path('platlib'))") rm -f ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/local_settings.py ln -s /etc/openstack-dashboard/local_settings ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/local_settings.py ln -s ${SITE_PACKAGES_ROOT}/openstack_dashboard/conf/default_policies /etc/openstack-dashboard/default_policies diff --git a/horizon/templates/bin/_manage.py.tpl b/horizon/templates/bin/_manage.py.tpl index 105a32c8c8..c065ca6a85 100644 --- a/horizon/templates/bin/_manage.py.tpl +++ b/horizon/templates/bin/_manage.py.tpl @@ -23,7 +23,7 @@ import os import sys import pymysql -pymysql.version_info = (1, 4, 0, "final", 0) +pymysql.version_info = (2, 2, 4, 'final', 0) pymysql.install_as_MySQLdb() from django.core.management import execute_from_command_line diff --git a/horizon/values.yaml b/horizon/values.yaml index 69fe497ca3..024e57cee4 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -262,7 +262,7 @@ conf: template: | import os - from django.utils.translation import ugettext_lazy as _ + from django.utils.translation import gettext_lazy as _ from openstack_dashboard import exceptions @@ -394,7 +394,7 @@ conf: CACHES = { 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', 'LOCATION': '{{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}', } } diff --git a/releasenotes/notes/horizon.yaml b/releasenotes/notes/horizon.yaml index 83785a3ffd..c757d9b04d 100644 --- a/releasenotes/notes/horizon.yaml +++ b/releasenotes/notes/horizon.yaml @@ -58,4 +58,5 @@ horizon: - 0.3.19 Add 2024.1 overrides - 0.3.20 Enable custom annotations for Openstack secrets - 0.3.21 Update images used by default + - 0.3.22 Align with 2024.1 requirements ... diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 52961dd154..74af02edd0 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -45,6 +45,7 @@ - openstack-helm-compute-kit-2024-1-ubuntu_jammy # 3 nodes - openstack-helm-compute-kit-metallb-2024-1-ubuntu_jammy # 1 node + 2 nodes - openstack-helm-compute-kit-helm-repo-local-2024-1-ubuntu_jammy # 1 node + 2 nodes + - openstack-helm-horizon-2024-1-ubuntu_jammy # 1 node gate: jobs: - openstack-helm-lint