VMware: fix exception when using multiple compute nodes
When there is more than one compute node running and one of the nodes restarts it terminates on an exception that the resource is not found. The cause of the issue is that a vif plug was being attempted for a resource that did not exist. The vif plug should have raised an "NotImplemented" exception. Change-Id: I5a3f1cc73a981173b6c2fa493de3aad10a7e97fd Closes-bug: #1272286
This commit is contained in:
parent
aa833a9843
commit
d46f4a5b6d
@ -331,14 +331,6 @@ class VMwareESXDriver(driver.ComputeDriver):
|
||||
"""inject network info for specified instance."""
|
||||
self._vmops.inject_network_info(instance, network_info)
|
||||
|
||||
def plug_vifs(self, instance, network_info):
|
||||
"""Plug VIFs into networks."""
|
||||
self._vmops.plug_vifs(instance, network_info)
|
||||
|
||||
def unplug_vifs(self, instance, network_info):
|
||||
"""Unplug VIFs from networks."""
|
||||
self._vmops.unplug_vifs(instance, network_info)
|
||||
|
||||
def list_instance_uuids(self):
|
||||
"""List VM instance UUIDs."""
|
||||
uuids = self._vmops.list_instances()
|
||||
@ -698,16 +690,6 @@ class VMwareVCDriver(VMwareESXDriver):
|
||||
_vmops = self._get_vmops_for_compute_node(instance['node'])
|
||||
_vmops.inject_network_info(instance, network_info)
|
||||
|
||||
def plug_vifs(self, instance, network_info):
|
||||
"""Plug VIFs into networks."""
|
||||
_vmops = self._get_vmops_for_compute_node(instance['node'])
|
||||
_vmops.plug_vifs(instance, network_info)
|
||||
|
||||
def unplug_vifs(self, instance, network_info):
|
||||
"""Unplug VIFs from networks."""
|
||||
_vmops = self._get_vmops_for_compute_node(instance['node'])
|
||||
_vmops.unplug_vifs(instance, network_info)
|
||||
|
||||
|
||||
class VMwareAPISession(object):
|
||||
"""
|
||||
|
@ -1635,16 +1635,6 @@ class VMwareVMOps(object):
|
||||
client_factory = self._session._get_vim().client.factory
|
||||
self._set_machine_id(client_factory, instance, network_info)
|
||||
|
||||
def plug_vifs(self, instance, network_info):
|
||||
"""Plug VIFs into networks."""
|
||||
msg = _("VIF plugging is not supported by the VMware driver.")
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
def unplug_vifs(self, instance, network_info):
|
||||
"""Unplug VIFs from networks."""
|
||||
msg = _("VIF unplugging is not supported by the VMware driver.")
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
|
||||
class VMwareVCVMOps(VMwareVMOps):
|
||||
"""Management class for VM-related tasks.
|
||||
|
Loading…
Reference in New Issue
Block a user