Constrain the pip/setuptools/wheel versions in the venvs

The installation of these packages are currently not constrained,
resulting in inconsistent experiences at deploy time.

This patch ensures that the venv preparation process properly
constrains the installation so that results are consistent.

Change-Id: I744e43d8a1b85d5bdaf7019a6420a39222911330
Partial-Bug: #1764470
This commit is contained in:
Jesse Pretorius 2018-04-17 19:12:22 +01:00
parent b7aa8d4eef
commit 30ac05c5b0
2 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@
src: "venv-build-script.sh.j2"
dest: "/opt/venv-build-script.sh"
mode: "0755"
register: _create_venv_build_script
- name: Create venv build options files
template:
@ -48,6 +49,7 @@
executable: "/bin/bash"
when:
- (item | changed) or
(_create_venv_build_script | changed) or
(ansible_local['openstack_ansible']['repo_build']['need_venv_build'] | bool)
with_items:
- "{{ _create_venv_options_files.results }}"

View File

@ -85,7 +85,9 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null
${ROLE_VENV_PATH}/bin/python {{ repo_build_release_path }}/get-pip.py \
pip setuptools wheel \
--find-links {{ repo_build_release_path }} \
${PIP_INSTALL_OPTIONS} &>${ROLE_VENV_LOG}
${PIP_INSTALL_OPTIONS} \
--constraint {{ repo_build_release_path }}/requirements_constraints.txt \
&>${ROLE_VENV_LOG}
# Install the packages into the venv
${ROLE_VENV_PATH}/bin/pip install \