]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa/tasks/workunit: clear clone dir before retrying checkout
authorSage Weil <sage@redhat.com>
Thu, 22 Dec 2016 18:05:22 +0000 (13:05 -0500)
committerNathan Cutler <ncutler@suse.com>
Mon, 2 Jan 2017 09:39:58 +0000 (10:39 +0100)
commita3e9865058e12fff18ee7674fcfd8435a1a37bf4
tree8bb234c5ed8b81dea4ebda2cae309fb189a3aa6f
parenta70e0d58e10184b0903ba36c047a237be3c7cc19
qa/tasks/workunit: clear clone dir before retrying checkout

If we checkout ceph-ci.git, and don't find a branch,
we'll try again from ceph.git. But the checkout will
already exist and the clone will fail, so we'll still
fail to find the branch.

The same can happen if a previous workunit task already
checked out the repo.

Fix by removing the repo before checkout (the first and
second times).  Note that this may break if there are
multiple workunit tasks running in parallel on the same
role.  That is already racy, so if it's happening, we'll
want to switch to using a truly unique clonedir for each
instantiation.

Fixes: http://tracker.ceph.com/issues/18336
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 2a7013cd5a033c5be43350505d75f088e831e201)
qa/tasks/workunit.py