From 7f58e337de088e47bc33a7fdcdba8099221f64a0 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 15 Mar 2018 16:17:56 +0000 Subject: [PATCH] Use constraints for all pip package installations Currently we're installing pip packages into the venv unconstrained, resulting in the possibility of an inconsistent build. This has luckily been covered by the repo build process only making a single, correct version of a python package available. However, for role tests it is now failing because it's pulling in a new version of libvirt-python which doesn't work with the libvirt version used in newton. Change-Id: I1607685ac6b30b698dacf5f05c4f5639ae53df44 --- tasks/nova_compute_kvm_install.yml | 5 ++++- tasks/nova_compute_powervm_install.yml | 5 ++++- tasks/nova_console_novnc_install.yml | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tasks/nova_compute_kvm_install.yml b/tasks/nova_compute_kvm_install.yml index 6697ce01..f46ff4ac 100644 --- a/tasks/nova_compute_kvm_install.yml +++ b/tasks/nova_compute_kvm_install.yml @@ -51,7 +51,10 @@ state: latest virtualenv: "{{ nova_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options|default('') }}" + extra_args: >- + {{ nova_developer_mode | ternary('--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 retries: 5 diff --git a/tasks/nova_compute_powervm_install.yml b/tasks/nova_compute_powervm_install.yml index bbdb9814..6beadf89 100644 --- a/tasks/nova_compute_powervm_install.yml +++ b/tasks/nova_compute_powervm_install.yml @@ -108,7 +108,10 @@ state: latest virtualenv: "{{ nova_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options|default('') }}" + extra_args: >- + {{ nova_developer_mode | ternary('--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 retries: 5 diff --git a/tasks/nova_console_novnc_install.yml b/tasks/nova_console_novnc_install.yml index edee8272..b935eeb3 100644 --- a/tasks/nova_console_novnc_install.yml +++ b/tasks/nova_console_novnc_install.yml @@ -62,7 +62,10 @@ state: latest virtualenv: "{{ nova_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options|default('') }}" + extra_args: >- + {{ nova_developer_mode | ternary('--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 retries: 5