Python 3: Use distro_python_version for WSGI python_path
Currently the WSGI configuration for binary images uses python2.7 site-packages in some places. This change uses distro_python_version to select the correct python path. Change-Id: Id5f3f0ede106498b9264942fa0399d7c7862c122 Partially-Implements: blueprint python-3
This commit is contained in:
parent
5a786436be
commit
c56d273c93
@ -1,6 +1,6 @@
|
||||
{% set aodh_log_dir = '/var/log/kolla/aodh' %}
|
||||
{% if aodh_install_type == 'binary' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% else %}
|
||||
{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% endif %}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% if cinder_install_type == 'binary' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% else %}
|
||||
{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% endif %}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set cloudkitty_log_dir = '/var/log/kolla/cloudkitty' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if cloudkitty_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if cloudkitty_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% set binary_path = '/usr/bin' if cloudkitty_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ cloudkitty_api_port }}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set freezer_log_dir = '/var/log/kolla/freezer' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if freezer_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if freezer_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ freezer_api_port }}
|
||||
|
||||
ServerSignature Off
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% set gnocchi_log_dir = '/var/log/kolla/gnocchi' %}
|
||||
{% if gnocchi_install_type == 'binary' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% else %}
|
||||
{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% endif %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% set keystone_log_dir = '/var/log/kolla/keystone' %}
|
||||
{% if keystone_install_type == 'binary' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% else %}
|
||||
{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% endif %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% if kolla_base_distro in ['debian', 'ubuntu'] %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if masakari_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% else %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if masakari_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if masakari_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% endif %}
|
||||
{% set binary_path = '/usr/bin' if masakari_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set monasca_log_path = '/var/log/kolla/monasca' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if monasca_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if monasca_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% set wsgi_path = '/usr/bin' if monasca_install_type == 'binary' else '/monasca-api/monasca_api/api' %}
|
||||
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ monasca_api_port }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set monasca_log_path = '/var/log/kolla/monasca' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if monasca_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if monasca_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% set wsgi_path = '/usr/bin' if monasca_install_type == 'binary' else '/monasca-log/monasca_log_api/app' %}
|
||||
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ monasca_log_api_port }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set panko_log_dir = '/var/log/kolla/panko' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if panko_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if panko_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% set binary_path = '/usr/bin' if panko_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ panko_api_port }}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% set log_dir = '/var/log/kolla/placement' %}
|
||||
{% if placement_install_type == 'binary' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% else %}
|
||||
{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
|
||||
{% endif %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% if kolla_base_distro == 'ubuntu' %}
|
||||
{% set python_path = '/usr/lib/python3/dist-packages' if qinling_install_type == 'binary' else '/var/lib/kolla/venv/lib/python3.6/site-packages' %}
|
||||
{% else %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if qinling_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if qinling_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
{% endif %}
|
||||
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ qinling_api_port }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set vitrage_log_dir = '/var/log/kolla/vitrage' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if vitrage_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if vitrage_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
Listen {{ 'api' | kolla_address | put_address_in_context('url') }}:{{ vitrage_api_port }}
|
||||
|
||||
ServerSignature Off
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set zun_log_dir = '/var/log/kolla/zun' %}
|
||||
{% set python_path = '/usr/lib/python2.7/site-packages' if zun_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' if zun_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages' %}
|
||||
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ zun_api_port }}
|
||||
|
||||
ServerSignature Off
|
||||
|
Loading…
x
Reference in New Issue
Block a user