summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Pretorius <jesse.pretorius@rackspace.co.uk>2018-08-27 20:55:42 +0100
committerJesse Pretorius <jesse.pretorius@rackspace.co.uk>2018-08-27 21:06:33 +0100
commitca0211a08ba362145ad4ed7be5404863dc02843c (patch)
treeb1c316b4550ccdd1f319f8732bfe199cbcbe6325
parentfd195749284129aebdca2f21ca0887b4e7a1c24d (diff)
Upgrade pip/setuptools/wheel in role test venv
In the integrated build, the repo build process upgrades pip/setuptools/wheel in the venv to our preferred pinned version, but the role tests using developer mode does not. Gnocchi, since 4.3.0 [1] requires setuptools > 30.3.0 - but CentOS only has 28.8.0 when it builds the venv, so the package install fails. In this patch we create the venv, then upgrade pip, setuptools and wheel, then install the keystone packages. Doing this for all roles is impractical, but it will be necessary to unblock patches from merging into this role today. In the future when we use the python_venv_build role we can do all this there instead of repeating this patch across all the roles. [1] https://github.com/gnocchixyz/gnocchi/commit/3f8a22a51bec3a60709bcbf26648c4fd6a66d2b8 Change-Id: Ibb5a068350b30f0d74ef26a55528527bd9e646a3
Notes
Notes (review): Code-Review+2: Markos Chandras (hwoarang) <mchandras@suse.de> Code-Review+2: Jean-Philippe Evrard <jean-philippe@evrard.me> Workflow+1: Jean-Philippe Evrard <jean-philippe@evrard.me> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 31 Aug 2018 13:47:30 +0000 Reviewed-on: https://review.openstack.org/596885 Project: openstack/openstack-ansible-os_gnocchi Branch: refs/heads/master
-rw-r--r--tasks/gnocchi_install.yml56
1 files changed, 40 insertions, 16 deletions
diff --git a/tasks/gnocchi_install.yml b/tasks/gnocchi_install.yml
index d2050ac..2ab4d7d 100644
--- a/tasks/gnocchi_install.yml
+++ b/tasks/gnocchi_install.yml
@@ -72,23 +72,47 @@
72 - Restart gnocchi services 72 - Restart gnocchi services
73 - Restart web server 73 - Restart web server
74 74
75- name: Install pip packages 75- name: Create the python venv and install packages into it
76 pip:
77 name: "{{ gnocchi_pip_packages }}"
78 state: "{{ gnocchi_pip_package_state }}"
79 virtualenv: "{{ gnocchi_bin | dirname }}"
80 virtualenv_site_packages: "no"
81 extra_args: >-
82 {{ gnocchi_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
83 {{ pip_install_options | default('') }}
84 register: install_packages
85 until: install_packages is success
86 retries: 5
87 delay: 2
88 when: gnocchi_get_venv | failed or gnocchi_get_venv | skipped 76 when: gnocchi_get_venv | failed or gnocchi_get_venv | skipped
89 notify: 77 block:
90 - Restart gnocchi services 78 - name: Create the virtualenv (if it does not exist)
91 - Restart web server 79 command: "virtualenv --never-download --no-site-packages {{ gnocchi_bin | dirname }}"
80 args:
81 creates: "{{ gnocchi_bin }}/activate"
82
83 - name: Upgrade pip/setuptools/wheel to the versions we want
84 pip:
85 name:
86 - pip
87 - setuptools
88 - wheel
89 state: "{{ gnocchi_pip_package_state }}"
90 virtualenv: "{{ gnocchi_bin | dirname }}"
91 virtualenv_site_packages: "no"
92 extra_args: >-
93 {{ gnocchi_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
94 {{ pip_install_options | default('') }}
95 register: install_packages
96 until: install_packages is success
97 retries: 5
98 delay: 2
99
100 - name: Install pip packages
101 pip:
102 name: "{{ gnocchi_pip_packages }}"
103 state: "{{ gnocchi_pip_package_state }}"
104 virtualenv: "{{ gnocchi_bin | dirname }}"
105 virtualenv_site_packages: "no"
106 extra_args: >-
107 {{ gnocchi_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
108 {{ pip_install_options | default('') }}
109 register: install_packages
110 until: install_packages is success
111 retries: 5
112 delay: 2
113 notify:
114 - Restart gnocchi services
115 - Restart web server
92 116
93- name: Remove python from path first (CentOS, openSUSE) 117- name: Remove python from path first (CentOS, openSUSE)
94 file: 118 file: