From ba48398552b73d4392f508e31304685cace72269 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 6 Feb 2013 10:55:50 +0000 Subject: Don't call 'vif.plug' twice during VM startup When starting a VM, the 'get_guest_config' method would end up calling both the 'plug' and 'get_config' methods on the VIF driver impl. The 'plug' method was, however, already being called by the 'create_domain_and_network' method in libvirt/driver.py. The result was that when starting a VM, Nova would be invoking 'plug' twice. Fortunately this does not currently cause any serious problems, but it could well do in the future. Change-Id: I4b044a6d44801a27362e3bf8531962ba85e79466 Signed-off-by: Daniel P. Berrange --- nova/virt/libvirt/driver.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 485f661e5..8b6a1d7da 100755 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -1892,7 +1892,6 @@ class LibvirtDriver(driver.ComputeDriver): guest.add_device(cfg) for (network, mapping) in network_info: - self.vif_driver.plug(instance, (network, mapping)) cfg = self.vif_driver.get_config(instance, network, mapping) guest.add_device(cfg) -- cgit