Clean tempest dir before cloning.

This ensures that the code is recloned and if a venv is used, it is
unpacked into a clean clone. If a venv is unpacked multiple times (eg
multiple runs of the playbook) into the same dir then that venv may
become inconsistent.

This is a minimal fix for liberty as the full patch didn't backport
cleanly.

Bug: #1592509
Change-Id: I6f3c36a8150b83afabae8d397d5fc7340dbc93fd
Related-to: 13edcc092597b7109d0f75435ab4d07d56149998
This commit is contained in:
Hugh Saunders 2016-07-27 11:58:12 +01:00
parent 7055f79509
commit bf8d8f7d87
1 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,15 @@
- tempest-install
- tempest-pip-packages
# This ensures a clean clone, and that only one venv is ever unpacked
# over the checkout. (previous problems were caused when multiple runs of this
# playbook caused a venv to be expanded into a modifed clone which lead to an
# inconsistent state)
- name: Remove tempest git clone
file:
path: "{{ tempest_git_dest }}"
state: absent
- name: Get tempest from git
git:
repo: "{{ tempest_git_repo }}"
@ -47,6 +56,7 @@
get_url:
url: "{{ tempest_venv_download_url }}"
dest: "/var/cache/{{ tempest_venv_download_url | basename }}"
force: yes
ignore_errors: true
register: get_venv
tags: