From 5ce4d64150e2636da06d3fb61a20b20ced971cef Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 4 May 2016 10:38:50 +0100 Subject: [PATCH] Change pip install task state to 'latest' Currently all pip install tasks only require the package to be present. This means that when an environment undergoes a minor upgrade the package is not upgraded to the same version that was tested with. This ultimately results in a deployed environment that does not match the tested environment. While for the services installed into venvs this is not an issue, it does affect those which do not use venvs and any packages which are installed outside of a venv or on top of a venv. This patch changes the behaviour to ensure that the install task will always use the latest available package. In developer_mode this will mean using the version specified in upper-constraints, and in an integrated build this will mean the version which is available in the wheel repo's folder for the tag. Change-Id: I22821cb24642aad4bface0ae0838351cd0cce257 --- tasks/neutron_install.yml | 6 +++--- tasks/nuage_neutron_config.yml | 4 ++-- tasks/plumgrid_config.yml | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index 9a1b199b..94e402be 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -135,7 +135,7 @@ - name: Install requires pip packages pip: name: "{{ item }}" - state: present + state: latest extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success @@ -250,7 +250,7 @@ - name: Install pip packages (venv) pip: name: "{{ item }}" - state: present + state: latest virtualenv: "{{ neutron_venv_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "{{ pip_install_options_fact }}" @@ -270,7 +270,7 @@ - name: Install pip packages (no venv) pip: name: "{{ item }}" - state: present + state: latest extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success diff --git a/tasks/nuage_neutron_config.yml b/tasks/nuage_neutron_config.yml index 428fa4e3..ad6264aa 100644 --- a/tasks/nuage_neutron_config.yml +++ b/tasks/nuage_neutron_config.yml @@ -15,7 +15,7 @@ - name: Install nuage neutron pip packages (venv) pip: name: "{{ item }}" - state: present + state: latest virtualenv: "{{ neutron_venv_bin | dirname }}" virtualenv_site_packages: "no" retries: 5 @@ -32,7 +32,7 @@ - name: Install nuage neutron pip packages (no venv) pip: name: "{{ item }}" - state: present + state: latest retries: 5 delay: 2 with_items: diff --git a/tasks/plumgrid_config.yml b/tasks/plumgrid_config.yml index 20caa0ab..79c70937 100644 --- a/tasks/plumgrid_config.yml +++ b/tasks/plumgrid_config.yml @@ -35,7 +35,7 @@ - name: Install plumgrid pip packages (venv) pip: name: "{{ item }}" - state: present + state: latest virtualenv: "{{ neutron_venv_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "{{ pip_install_options|default('') }}" @@ -56,7 +56,7 @@ - name: Install plumgrid pip packages fall back (venv) pip: name: "{{ item }}" - state: present + state: latest virtualenv: "{{ neutron_venv_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "--isolated" @@ -77,7 +77,7 @@ - name: Install plumgrid pip packages (no venv) pip: name: "{{ item }}" - state: present + state: latest extra_args: "{{ pip_install_options|default('') }}" register: install_packages until: install_packages|success @@ -96,7 +96,7 @@ - name: Install plumgrid pip packages fall back (no venv) pip: name: "{{ item }}" - state: present + state: latest extra_args: "--isolated" register: install_packages_fall_back until: install_packages_fall_back|success