]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-prs: ensure libvirt networks are destroyed after a job is completed 677/head
authorAlfredo Deza <adeza@redhat.com>
Wed, 12 Apr 2017 21:00:59 +0000 (17:00 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 12 Apr 2017 21:00:59 +0000 (17:00 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-ansible-prs/build/teardown

index 71026e6bb827b7e7fbc4195ce7e79c78f070027c..de5ea39037a3ddd86818a8fcc5e3382b3954b93c 100644 (file)
@@ -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