From e711ce4f510de71da39e011ffdbf358a6b4e50bb Mon Sep 17 00:00:00 2001 From: German Eichberger Date: Wed, 30 May 2018 08:52:26 -0700 Subject: [PATCH] Adds constraints to all pip installs Recently we ran into trouble with the cmd2 extension's latest version being python3 only. This exposed the need to constrain all pip installs (as it should have been) Change-Id: I8f27bddd45905c14bec486c515b5b190c66eaf20 --- tasks/octavia_certs_install.yml | 4 ++++ tests/test-configure-octavia.yml | 4 ++++ tests/test-octavia.yml | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/tasks/octavia_certs_install.yml b/tasks/octavia_certs_install.yml index 36e3329f..18beab26 100644 --- a/tasks/octavia_certs_install.yml +++ b/tasks/octavia_certs_install.yml @@ -17,6 +17,10 @@ pip: name: pyOpenSSL state: present + extra_args: >- + {{ octavia_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} + {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} + {{ pip_install_options | default('') }} - name: Generate Cert Dirs file: diff --git a/tests/test-configure-octavia.yml b/tests/test-configure-octavia.yml index fa2f1d04..d808421f 100644 --- a/tests/test-configure-octavia.yml +++ b/tests/test-configure-octavia.yml @@ -22,6 +22,10 @@ pip: name: "shade" state: "{{ octavia_pip_package_state }}" + extra_args: >- + {{ octavia_developer_mode | ternary(pip_install_developer_constraints | default('--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/tests/test-octavia.yml b/tests/test-octavia.yml index 58efcd46..33e6ccef 100644 --- a/tests/test-octavia.yml +++ b/tests/test-octavia.yml @@ -37,6 +37,10 @@ pip: name: "{{ item }}" state: "{{ octavia_pip_package_state }}" + extra_args: >- + {{ octavia_developer_mode | ternary(pip_install_developer_constraints | default('--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 @@ -47,6 +51,7 @@ - "shade" - "python-octaviaclient" - "python-openstackclient" + - "cmd2<0.9.0" # >=0.9.0 is python3 only - name: Ensure public network exists os_network: