diff options
| -rw-r--r-- | nova/compute/manager.py | 2 | ||||
| -rw-r--r-- | nova/virt/driver.py | 5 | ||||
| -rw-r--r-- | nova/virt/libvirt/connection.py | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 2ade43503..cc5cf747c 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1212,7 +1212,7 @@ class ComputeManager(manager.SchedulerDependentManager): max_retry = FLAGS.live_migration_retry_count for cnt in range(max_retry): try: - self.driver.plug_vifs(context, instance_ref, network_info) + self.driver.plug_vifs(instance_ref, network_info) break except exception.ProcessExecutionError: if cnt == max_retry - 1: diff --git a/nova/virt/driver.py b/nova/virt/driver.py index 61f26ad96..e8dcf138b 100644 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -253,3 +253,8 @@ class ComputeDriver(object): def set_host_enabled(self, host, enabled): """Sets the specified host's ability to accept new instances.""" raise NotImplementedError() + + def plug_vifs(self, instance, network_info): + """Plugs in VIFs to networks.""" + raise NotImplementedError() + diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 5cedcf2c1..3f6230e95 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -259,7 +259,7 @@ class LibvirtConnection(driver.ComputeDriver): infos.append(info) return infos - def plug_vifs(self, ctxt, instance, network_info): + def plug_vifs(self, instance, network_info): """Plugin VIFs into networks.""" for (network, mapping) in network_info: self.vif_driver.plug(instance, network, mapping) @@ -493,6 +493,7 @@ 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.plug_vifs(instance, network_info) self.firewall_driver.setup_basic_filtering(instance) self.firewall_driver.prepare_instance_filter(instance) self._create_new_domain(xml) |
