summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Wendlandt <dan@nicira.com>2012-03-01 11:52:33 -0800
committerDan Wendlandt <dan@nicira.com>2012-03-01 11:52:39 -0800
commit04e57f169646dff5309177ce5dfa444f668bf8a1 (patch)
tree2cebe62f09fe772bd770e3696250a2cd1d392ba1
parentfc0f5bdc15d41dbed489a9a4fcbc6149672065b7 (diff)
downloadnova-04e57f169646dff5309177ce5dfa444f668bf8a1.tar.gz
nova-04e57f169646dff5309177ce5dfa444f668bf8a1.tar.xz
nova-04e57f169646dff5309177ce5dfa444f668bf8a1.zip
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
-rw-r--r--nova/virt/libvirt/connection.py1
-rw-r--r--nova/virt/libvirt/vif.py3
2 files changed, 1 insertions, 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):