From: Guillaume Abrioux Date: Sun, 24 Sep 2017 02:39:13 +0000 (+0200) Subject: ceph-ansible-prs: fix leftover X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F870%2Fhead;p=ceph-build.git ceph-ansible-prs: fix leftover sometimes, it happens that the Jenkins Slave processes crashes before teardown is executed (ie. `java.io.EOFException`), it means we keep leftofver from previous build. This commit ensures before the test is launched that no fetch directory from previous build is present. Signed-off-by: Guillaume Abrioux --- diff --git a/ceph-ansible-prs/build/build b/ceph-ansible-prs/build/build index 4cea7f09d..11a41a1c9 100644 --- a/ceph-ansible-prs/build/build +++ b/ceph-ansible-prs/build/build @@ -13,6 +13,18 @@ delete_libvirt_vms clear_libvirt_networks restart_libvirt_services +# This was initially in teardown but sometimes, it happens that the Jenkins Slave process +# crashes before teardown is executed, it means we keep leftofver from previous build. +# We ensure before the test is launched that no fetch directory from previous build is present. +pushd $WORKSPACE/tests +scenarios=$(find . -name Vagrantfile | xargs dirname) +for scenario in $scenarios; do + pushd $scenario + rm -rf fetch/ + popd +done +popd + # the $SCENARIO var is injected by the job template. It maps # to an actual, defined, tox environment if ! timeout 3h $VENV/tox -rv -e=$RELEASE-$ANSIBLE_VERSION-$SCENARIO --workdir=$WORKDIR -- --provider=libvirt; then diff --git a/ceph-ansible-prs/build/teardown b/ceph-ansible-prs/build/teardown index d33c32f0b..595e2f9e1 100644 --- a/ceph-ansible-prs/build/teardown +++ b/ceph-ansible-prs/build/teardown @@ -9,7 +9,6 @@ scenarios=$(find . -name Vagrantfile | xargs dirname) for scenario in $scenarios; do pushd $scenario vagrant destroy -f - rm -rf fetch/ popd done