From 1e1e858a22e64bd82eae56451d7fd6e18d635395 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Mon, 3 Jun 2019 16:55:53 -0700 Subject: [PATCH] Cleanup debian nova service distro package list The debian packages for individual nova services provide service configs which automatically start after install, leading to all nova services running on each compute host. Instead only install the python3-nova library package and rely on the service files OSA manages. The nova_service_distro_packages can be cleaned up further since most packages are provided as dependencies. uwsgi packages are only required on hosts running nova-api-os-compute or nova-api-metadata, so an additional key, 'nova_api' has been added for these hosts under 'nova_service_extra_distro_packages'. Beginning in the Stein release, Ubuntu distro packages are now using Python3. This requires additionally installing and using the uwsgi python3 plugin. Change-Id: Id0c7b57f0119c5213abdf3505e4644680a78d55e --- templates/nova-uwsgi.ini.j2 | 3 +++ vars/debian.yml | 14 +++++--------- vars/distro_install.yml | 4 ++++ vars/redhat-7.yml | 5 +++-- vars/suse.yml | 5 +++-- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/templates/nova-uwsgi.ini.j2 b/templates/nova-uwsgi.ini.j2 index 89a05820..86c5ee1a 100644 --- a/templates/nova-uwsgi.ini.j2 +++ b/templates/nova-uwsgi.ini.j2 @@ -6,6 +6,9 @@ gid = {{ nova_system_group_name }} {% if nova_install_method == 'source' %} virtualenv = /openstack/venvs/nova-{{ nova_venv_tag }} {% endif %} +{% if nova_install_method == 'distro' and (ansible_os_family | lower) == 'debian' %} +plugin = python3 +{% endif %} wsgi-file = {{ nova_bin }}/{{ item.wsgi_name }} http = 0.0.0.0:{{ item.uwsgi_port }} diff --git a/vars/debian.yml b/vars/debian.yml index 061aa089..366f94a7 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -33,15 +33,8 @@ nova_devel_distro_packages: - python-httplib2 nova_service_distro_packages: - - nova-api - - nova-conductor - - nova-scheduler - - python-memcache - - python-novaclient - - python-pymysql - - python-sqlalchemy - - uwsgi - - uwsgi-plugin-python + - python3-nova + - python3-memcache nova_service_extra_distro_packages: kvm: @@ -50,6 +43,9 @@ nova_service_extra_distro_packages: - nova-compute-lxd novnc: - nova-novncproxy + nova_api: + - uwsgi + - uwsgi-plugin-python3 spice: - nova-spiceproxy serialconsole: diff --git a/vars/distro_install.yml b/vars/distro_install.yml index daf2bb0c..733364d7 100644 --- a/vars/distro_install.yml +++ b/vars/distro_install.yml @@ -20,6 +20,10 @@ # nova_package_list: |- {% set packages = nova_distro_packages %} + {% if nova_services['nova-api-metadata']['group'] in group_names or + nova_services['nova-api-os-compute']['group'] in group_names %} + {% set _ = packages.extend(nova_service_extra_distro_packages['nova_api']) %} + {% endif %} {% if nova_services['nova-novncproxy']['group'] in group_names or nova_services['nova-spicehtml5proxy']['group'] in group_names or nova_services['nova-serialconsole-proxy']['group'] in group_names %} diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index c9e48676..4a3ca290 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -38,8 +38,6 @@ nova_service_distro_packages: - python-memcached - python-novaclient - python2-PyMySQL - - uwsgi - - uwsgi-plugin-python nova_service_extra_distro_packages: kvm: @@ -48,6 +46,9 @@ nova_service_extra_distro_packages: lxd: [] novnc: - openstack-nova-novncproxy + nova_api: + - uwsgi + - uwsgi-plugin-python spice: - openstack-nova-spicehtml5proxy serialconsole: diff --git a/vars/suse.yml b/vars/suse.yml index 41373eaf..0921b37f 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -40,8 +40,6 @@ nova_service_distro_packages: - python-memcached - python-novaclient - python-PyMySQL - - uwsgi - - uwsgi-python nova_service_extra_distro_packages: kvm: @@ -49,6 +47,9 @@ nova_service_extra_distro_packages: lxd: [] novnc: - openstack-nova-novncproxy + nova_api: + - uwsgi + - uwsgi-python spice: [] serialconsole: - openstack-nova-serialproxy