From 04e57f169646dff5309177ce5dfa444f668bf8a1 Mon Sep 17 00:00:00 2001 From: Dan Wendlandt Date: Thu, 1 Mar 2012 11:52:33 -0800 Subject: libvirt driver calls unplug() twice on vm reboot. bug 944168 Also prevents OVS vif plugging driver from raising an exception if deleting the OVS port fails. We already log an error and print the exception, and there's no reason that failing to delete the OVS port should cause the whole operation to fail. Change-Id: I01c22ab8627762831a106b407f758f6592363f33 --- nova/virt/libvirt/connection.py | 1 - nova/virt/libvirt/vif.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 356bcdacf..bd675608b 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -668,7 +668,6 @@ class LibvirtConnection(driver.ComputeDriver): # better because we cannot ensure flushing dirty buffers # in the guest OS. But, in case of KVM, shutdown() does not work... self._destroy(instance, network_info, cleanup=False) - self.unplug_vifs(instance, network_info) self.plug_vifs(instance, network_info) self.firewall_driver.setup_basic_filtering(instance, network_info) self.firewall_driver.prepare_instance_filter(instance, network_info) diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py index 886eea77f..268a84525 100644 --- a/nova/virt/libvirt/vif.py +++ b/nova/virt/libvirt/vif.py @@ -153,9 +153,8 @@ class LibvirtOpenVswitchDriver(VIFDriver): FLAGS.libvirt_ovs_bridge, dev, run_as_root=True) utils.execute('ip', 'link', 'delete', dev, run_as_root=True) except exception.ProcessExecutionError: - LOG.warning(_("Failed while unplugging vif of instance '%s'"), + LOG.exception(_("Failed while unplugging vif of instance '%s'"), instance['name']) - raise class LibvirtOpenVswitchVirtualPortDriver(VIFDriver): -- cgit