From 1c4e1ced6ad67a4ac095deb42b28add88d0f7bca Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 19 Apr 2018 15:09:50 +0100 Subject: [PATCH] Prefer distribution packages for Tempest dependencies Distributions provide packages for all the Tempest role dependencies so we can use these instead of the ones from PIP in order to keep the host as clean as possible. openSUSE provides suitable versions for all of them, whereas Ubuntu provides everything except for shade which we still need to get from PIP. Similarly, CentOS provides everything except from virtualenv but this is being installed in the openstack_hosts role. Since we are still mixing distribution and pip packages, we need to stop using upper-constrains when installing pip packages on the host so distro packages can be used to satisfy their dependencies. Change-Id: I5a78e2120e596d36629b4ba978b2b5df76b149b0 Implements: blueprint openstack-distribution-packages --- defaults/main.yml | 8 -------- tasks/tempest_install.yml | 1 - vars/redhat-7.yml | 7 +++++++ vars/suse-42.yml | 7 +++++++ vars/ubuntu-16.04.yml | 9 +++++++++ 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8eafb5a4..275b67e4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -154,14 +154,6 @@ tempest_volume_multi_backend_enabled: False tempest_main_group: tempest_all -tempest_requires_pip_packages: - - python-glanceclient - - python-keystoneclient - - python-neutronclient - - python-novaclient - - shade - - virtualenv - tempest_pip_packages: - ddt - junitxml diff --git a/tasks/tempest_install.yml b/tasks/tempest_install.yml index a300d4ef..988e193c 100644 --- a/tasks/tempest_install.yml +++ b/tasks/tempest_install.yml @@ -39,7 +39,6 @@ state: "{{ tempest_pip_package_state }}" extra_args: >- {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} - {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages until: install_packages|success diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index be2b3209..124ebcbb 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -16,5 +16,12 @@ tempest_distro_packages: - git - postgresql-devel + - python-glanceclient + - python-keystoneclient + - python-neutronclient + - python-novaclient + - python2-shade - rsync - which + +tempest_requires_pip_packages: [] diff --git a/vars/suse-42.yml b/vars/suse-42.yml index 43e275ba..299b4e6e 100644 --- a/vars/suse-42.yml +++ b/vars/suse-42.yml @@ -17,5 +17,12 @@ tempest_distro_packages: - git-core - postgresql-devel + - python-glanceclient + - python-keystoneclient + - python-neutronclient + - python-novaclient + - python-shade - rsync - which + +tempest_requires_pip_packages: [] diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index e0b15440..94b8174c 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -19,4 +19,13 @@ cache_timeout: 600 tempest_distro_packages: - git-core - libpq-dev + - python-glanceclient + - python-keystoneclient + - python-neutronclient + - python-novaclient - rsync + +tempest_requires_pip_packages: + - shade # ubuntu xenial provides a rather old shade library. We need >= 1.9.0 for Rocky + - virtualenv + - setuptools # Ubuntu's setuptools package does not contain pkg-resources and that's causing troubles