From e192909b776d8c0e849f4c56cc0e4203324adcb0 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Sun, 24 Sep 2017 04:39:13 +0200 Subject: [PATCH] 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 --- ceph-ansible-prs/build/build | 12 ++++++++++++ ceph-ansible-prs/build/teardown | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) 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 -- 2.47.3