Use upper-constraints file in developer mode
Last week, keystone was failing to install in developer mode due to us not specifying upper constraints. This was due to an upcapped version of pysaml2 being installed which is causing problems. This commit first clones the requirements repo and then uses the upper constraints file when installing packages. Note that we only update pip_install_options when in developer mode if the constraints aren't already set. This is because in developer mode you could have a container with multiple services running on it and the pip_install_options fact would get updated when already set, resulting in pip failing to install packages. Change-Id: Iadb01964d2a23ab6457862545eaea5fed77678a5 Partial-Bug: #1553970
This commit is contained in:
parent
605a6c1fe5
commit
111c1d945a
@ -35,6 +35,9 @@ neutron_lbaas_git_install_branch: master
|
||||
neutron_vpnaas_git_repo: https://git.openstack.org/openstack/neutron-vpnaas
|
||||
neutron_vpnaas_git_install_branch: master
|
||||
|
||||
neutron_requirements_git_repo: https://git.openstack.org/openstack/requirements
|
||||
neutron_requirements_git_install_branch: "{{ requirements_git_install_branch | default(master) }}"
|
||||
|
||||
neutron_developer_mode: false
|
||||
neutron_developer_constraints:
|
||||
- "git+{{ neutron_git_repo }}@{{ neutron_git_install_branch }}#egg=neutron"
|
||||
|
@ -85,15 +85,30 @@
|
||||
- neutron-install
|
||||
- neutron-pip-packages
|
||||
|
||||
- name: Set constraint file fact for developer mode
|
||||
set_fact:
|
||||
pip_install_options: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt"
|
||||
- name: Clone requirements git repository
|
||||
git:
|
||||
repo: "{{ neutron_requirements_git_repo }}"
|
||||
dest: "/opt/requirements"
|
||||
clone: yes
|
||||
update: yes
|
||||
version: "{{ neutron_requirements_git_install_branch }}"
|
||||
when:
|
||||
- neutron_developer_mode | bool
|
||||
tags:
|
||||
- neutron-install
|
||||
- neutron-pip-packages
|
||||
|
||||
- name: Add constraints to pip_install_options fact for developer mode
|
||||
set_fact:
|
||||
pip_install_options: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt"
|
||||
when:
|
||||
- neutron_developer_mode | bool
|
||||
- "'/opt/developer-pip-constraints.txt' not in pip_install_options|default('')"
|
||||
- "'/opt/requirements/upper-constraints.txt' not in pip_install_options|default('')"
|
||||
tags:
|
||||
- neutron-install
|
||||
- neutron-pip-packages
|
||||
|
||||
- name: Install requires pip packages
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
|
Loading…
Reference in New Issue
Block a user