]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts: Be more aggressive with libvirt network destruction 730/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 18 May 2017 19:47:05 +0000 (15:47 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Fri, 19 May 2017 14:57:59 +0000 (10:57 -0400)
See https://github.com/vagrant-libvirt/vagrant-libvirt/issues/670#issuecomment-261964248

Can confirm that deleting the default network still allows
vagrant-libvirt to run fine on Ubuntu 16.04.

Signed-off-by: David Galloway <dgallowa@redhat.com>
scripts/build_utils.sh

index 6817bbfc98908f972da647bdc3ce0305f8f2c8ec..6cc5258b11274994cd1ec9f90ed830154ea35cde 100644 (file)
@@ -423,7 +423,7 @@ delete_libvirt_vms() {
 
 clear_libvirt_networks() {
     # 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`
+    networks=`sudo virsh net-list --all --name`
     for network in $networks; do
         sudo virsh net-destroy $network || true
         sudo virsh net-undefine $network || true