aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Arbet <michal.arbet@ultimum.io>2025-04-01 15:15:41 +0200
committerMichal Nasiadka <mnasiadka@gmail.com>2025-10-29 06:20:19 +0000
commit23514cef8592c0a011fb2f27de2a10be9656556e (patch)
treeee331ebc311b17dc98205ce3842cdd0e57fb8a3d
parent977febad189394b49f6fc1fb2ffef5907599be4b (diff)
downloadkolla-ansible-23514cef8592c0a011fb2f27de2a10be9656556e.tar.gz
kolla-ansible-23514cef8592c0a011fb2f27de2a10be9656556e.zip
Remove distro_python_version variable
This patch drops the ``distro_python_version`` variable from Kolla Ansible, as it is no longer needed, the paths have already been handled at the image level. More details can be found in [1]. [1] https://review.opendev.org/q/topic:%22kolla-distro-python-version%22 Change-Id: I1b972c607c1d9fd387e977b73a7529c3e2574387 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
-rw-r--r--ansible/group_vars/all/common.yml2
-rw-r--r--ansible/roles/horizon/templates/horizon.conf.j26
-rw-r--r--ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j27
-rw-r--r--ansible/roles/skyline/templates/nginx.conf.j22
-rw-r--r--ansible/roles/skyline/templates/skyline-console.json.j22
-rw-r--r--releasenotes/notes/remove-distro-python-version-09adac8895cb87d1.yaml4
6 files changed, 11 insertions, 12 deletions
diff --git a/ansible/group_vars/all/common.yml b/ansible/group_vars/all/common.yml
index 4a82c29ea..021df28cf 100644
--- a/ansible/group_vars/all/common.yml
+++ b/ansible/group_vars/all/common.yml
@@ -213,8 +213,6 @@ kolla_base_distro_version_default_map: {
"ubuntu": "noble",
}
-distro_python_version: "3"
-
kolla_base_distro_version: "{{ kolla_base_distro_version_default_map[kolla_base_distro] }}"
####################
diff --git a/ansible/roles/horizon/templates/horizon.conf.j2 b/ansible/roles/horizon/templates/horizon.conf.j2
index e5f851aeb..2f6380da2 100644
--- a/ansible/roles/horizon/templates/horizon.conf.j2
+++ b/ansible/roles/horizon/templates/horizon.conf.j2
@@ -1,5 +1,3 @@
-{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
-
{% if horizon_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
@@ -23,7 +21,7 @@ TraceEnable off
WSGIScriptReloading On
WSGIDaemonProcess horizon-http processes={{ horizon_wsgi_processes }} threads={{ horizon_wsgi_threads }} user=horizon group=horizon display-name=horizon
WSGIProcessGroup horizon-http
- WSGIScriptAlias / {{ python_path }}/openstack_dashboard/wsgi.py
+ WSGIScriptAlias / /var/lib/kolla/venv/lib/python3/site-packages/openstack_dashboard/wsgi.py
WSGIPassAuthorization On
WSGIApplicationGroup %{GLOBAL}
@@ -35,7 +33,7 @@ TraceEnable off
Require local
</Location>
- Alias /static {{ python_path }}/static
+ Alias /static /var/lib/kolla/venv/lib/python3/site-packages/static
<Location "/static">
SetHandler None
</Location>
diff --git a/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2 b/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2
index ace7fd9a1..319bf2f88 100644
--- a/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2
+++ b/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2
@@ -1,12 +1,11 @@
{% set ironic_log_dir = '/var/log/kolla/ironic' %}
-{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ ironic_prometheus_exporter_port }}
ServerSignature Off
ServerTokens Prod
TraceEnable off
-<Directory "{{ python_path }}/ironic_prometheus_exporter/app">
+<Directory "/var/lib/kolla/venv/lib/python3/site-packages/ironic_prometheus_exporter/app">
<FilesMatch "^wsgi$">
AllowOverride None
Options None
@@ -28,9 +27,9 @@ LogLevel info
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog "{{ ironic_log_dir }}/ironic-prometheus-exporter-wsgi-access.log" logformat
- WSGIDaemonProcess ironic-prometheus-exporter processes={{ openstack_service_workers }} threads=1 user=ironic display-name=%{GROUP} python-path={{ python_path }}
+ WSGIDaemonProcess ironic-prometheus-exporter processes={{ openstack_service_workers }} threads=1 user=ironic display-name=%{GROUP} python-path=/var/lib/kolla/venv/lib/python3/site-packages
WSGIProcessGroup ironic-prometheus-exporter
- WSGIScriptAlias / {{ python_path }}/ironic_prometheus_exporter/app/wsgi.py
+ WSGIScriptAlias / /var/lib/kolla/venv/lib/python3/site-packages/ironic_prometheus_exporter/app/wsgi.py
WSGIApplicationGroup %{GLOBAL}
<Location "/">
Require all granted
diff --git a/ansible/roles/skyline/templates/nginx.conf.j2 b/ansible/roles/skyline/templates/nginx.conf.j2
index 944480464..711c7fbe6 100644
--- a/ansible/roles/skyline/templates/nginx.conf.j2
+++ b/ansible/roles/skyline/templates/nginx.conf.j2
@@ -68,7 +68,7 @@ http {
server {
listen {{ api_interface_address | put_address_in_context('url') }}:{{ skyline_console_listen_port }}{% if skyline_ssl_certfile and skyline_ssl_keyfile %} ssl http2{% endif %} default_server;
- root /var/lib/kolla/venv/lib/python{{ distro_python_version }}/site-packages/skyline_console/static;
+ root /var/lib/kolla/venv/lib/python3/site-packages/skyline_console/static;
# Add index.php to the list if you are using PHP
index index.html;
diff --git a/ansible/roles/skyline/templates/skyline-console.json.j2 b/ansible/roles/skyline/templates/skyline-console.json.j2
index 6d9e0a082..3cab04905 100644
--- a/ansible/roles/skyline/templates/skyline-console.json.j2
+++ b/ansible/roles/skyline/templates/skyline-console.json.j2
@@ -15,7 +15,7 @@
}{% if skyline_custom_logos | length > 0 %},
{
"source": "{{ container_config_directory}}/logos",
- "dest": "/var/lib/kolla/venv/lib/python{{ distro_python_version }}/site-packages/skyline_console/static",
+ "dest": "/var/lib/kolla/venv/lib/python3/site-packages/skyline_console/static",
"owner": "root",
"perm": "0644",
"merge": true
diff --git a/releasenotes/notes/remove-distro-python-version-09adac8895cb87d1.yaml b/releasenotes/notes/remove-distro-python-version-09adac8895cb87d1.yaml
new file mode 100644
index 000000000..6f19718c3
--- /dev/null
+++ b/releasenotes/notes/remove-distro-python-version-09adac8895cb87d1.yaml
@@ -0,0 +1,4 @@
+---
+upgrade:
+ - |
+ The global variable ``distro_python_version`` has been removed