From 78dbfa9885ba43e1bf4580179e35516fb1974fd1 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 12 Apr 2017 17:00:59 -0400 Subject: [PATCH] ceph-ansible-prs: ensure libvirt networks are destroyed after a job is completed Signed-off-by: Alfredo Deza --- ceph-ansible-prs/build/teardown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ceph-ansible-prs/build/teardown b/ceph-ansible-prs/build/teardown index 71026e6b..de5ea390 100644 --- a/ceph-ansible-prs/build/teardown +++ b/ceph-ansible-prs/build/teardown @@ -11,3 +11,9 @@ for scenario in $scenarios; do vagrant destroy -f cd - done + +# Sometimes, networks may linger around, so we must ensure they are killed: +networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2` +for network in $networks; do + sudo virsh net-destroy $network +done -- 2.39.5