Merge "Fix venv build fallback mechanism"

This commit is contained in:
Jenkins 2017-01-10 10:57:43 +00:00 committed by Gerrit Code Review
commit 6d58a28c3d
2 changed files with 6 additions and 3 deletions

View File

@ -56,6 +56,9 @@ neutron_developer_constraints:
neutron_venv_tag: untagged
neutron_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
neutron_venv_download: "{{ not neutron_developer_mode | bool }}"
neutron_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/neutron.tgz
# Set the lib dir path to that of the local python path where neutron is installed.

View File

@ -157,7 +157,7 @@
dest: "/var/cache/{{ neutron_venv_download_url | basename }}"
checksum: "sha1:{{ lookup('url', neutron_venv_download_url | replace('tgz', 'checksum')) }}"
register: neutron_get_venv
when: not neutron_developer_mode | bool
when: neutron_venv_download | bool
- name: Remove existing venv
file:
@ -179,7 +179,7 @@
copy: "no"
when:
- not neutron_developer_mode | bool
- neutron_get_venv | changed or neutron_venv_dir | changed
- neutron_get_venv | changed
notify: Restart neutron services
- name: Install pip packages
@ -196,7 +196,7 @@
until: install_packages|success
retries: 5
delay: 2
when: neutron_developer_mode | bool
when: not neutron_get_venv | success or neutron_developer_mode | bool
notify: Restart neutron services
- name: CentOS remove python from path first