Update python_path for "source" install type

Both ubuntu source and binary install type support python3 now,
python_path should be updated.

Depends-On: https://review.opendev.org/675581
Partially Implements: blueprint python3-support

Change-Id: I4bf721b44220bde2d25d4d985f5ca411699a5a72
This commit is contained in:
chenxing 2019-08-12 14:45:43 +08:00
parent b16bb0d787
commit 16d0d4c361
5 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{% if aodh_install_type == 'binary' %} {% if aodh_install_type == 'binary' %}
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == '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/python2.7/site-packages' %}
{% else %} {% else %}
{% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
{% endif %} {% endif %}
{% set binary_path = '/usr/bin' if aodh_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} {% set binary_path = '/usr/bin' if aodh_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
Listen {{ api_interface_address }}:{{ aodh_api_listen_port }} Listen {{ api_interface_address }}:{{ aodh_api_listen_port }}
@ -27,7 +27,7 @@ TraceEnable off
WSGIApplicationGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess aodh group=aodh processes={{ openstack_service_workers }} threads=1 user=aodh python-path={{ python_path }} WSGIDaemonProcess aodh group=aodh processes={{ openstack_service_workers }} threads=1 user=aodh python-path={{ python_path }}
WSGIProcessGroup aodh WSGIProcessGroup aodh
{% if aodh_install_type == 'binary' and kolla_base_distro == 'ubuntu' %} {% if aodh_install_type == 'binary' and kolla_base_distro in ['debian', 'ubuntu'] %}
WSGIScriptAlias / "{{ binary_path }}/python3-aodh-api" WSGIScriptAlias / "{{ binary_path }}/python3-aodh-api"
{% else %} {% else %}
WSGIScriptAlias / "{{ binary_path }}/aodh-api" WSGIScriptAlias / "{{ binary_path }}/aodh-api"

View File

@ -1,7 +1,7 @@
{% if cinder_install_type == 'binary' %} {% if cinder_install_type == 'binary' %}
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == '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/python2.7/site-packages' %}
{% else %} {% else %}
{% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
{% endif %} {% endif %}
Listen {{ api_interface_address }}:{{ cinder_api_listen_port }} Listen {{ api_interface_address }}:{{ cinder_api_listen_port }}

View File

@ -1,7 +1,7 @@
{% if gnocchi_install_type == 'binary' %} {% if gnocchi_install_type == 'binary' %}
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == '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/python2.7/site-packages' %}
{% else %} {% else %}
{% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
{% endif %} {% endif %}
{% set wsgi_path = '/usr/bin' if gnocchi_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} {% set wsgi_path = '/usr/bin' if gnocchi_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
Listen {{ api_interface_address }}:{{ gnocchi_api_listen_port }} Listen {{ api_interface_address }}:{{ gnocchi_api_listen_port }}
@ -18,7 +18,7 @@ TraceEnable off
WSGIApplicationGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess gnocchi group=gnocchi processes={{ openstack_service_workers }} threads=1 user=gnocchi python-path={{ python_path }} WSGIDaemonProcess gnocchi group=gnocchi processes={{ openstack_service_workers }} threads=1 user=gnocchi python-path={{ python_path }}
WSGIProcessGroup gnocchi WSGIProcessGroup gnocchi
{% if gnocchi_install_type == 'binary' and kolla_base_distro == 'ubuntu' %} {% if gnocchi_install_type == 'binary' and kolla_base_distro in ['debian', 'ubuntu'] %}
WSGIScriptAlias / "{{ wsgi_path }}/python3-gnocchi-api" WSGIScriptAlias / "{{ wsgi_path }}/python3-gnocchi-api"
{% else %} {% else %}
WSGIScriptAlias / "{{ wsgi_path }}/gnocchi-api" WSGIScriptAlias / "{{ wsgi_path }}/gnocchi-api"

View File

@ -1,8 +1,8 @@
{% set keystone_log_dir = '/var/log/kolla/keystone' %} {% set keystone_log_dir = '/var/log/kolla/keystone' %}
{% if keystone_install_type == 'binary' %} {% if keystone_install_type == 'binary' %}
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == '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/python2.7/site-packages' %}
{% else %} {% else %}
{% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
{% endif %} {% endif %}
{% set binary_path = '/usr/bin' if keystone_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} {% set binary_path = '/usr/bin' if keystone_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
Listen {{ api_interface_address }}:{{ keystone_public_listen_port }} Listen {{ api_interface_address }}:{{ keystone_public_listen_port }}

View File

@ -1,8 +1,8 @@
{% set log_dir = '/var/log/kolla/placement' %} {% set log_dir = '/var/log/kolla/placement' %}
{% if placement_install_type == 'binary' %} {% if placement_install_type == 'binary' %}
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == '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/python2.7/site-packages' %}
{% else %} {% else %}
{% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
{% endif %} {% endif %}
{% set wsgi_directory = '/usr/bin' if placement_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} {% set wsgi_directory = '/usr/bin' if placement_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}