nova/nova/virt
Fabian Wiesel 56055ede03 VMware: StableMoRefProxy for moref recovery
The vmwareapi driver uses Managed-Object references throughout the code
with the assumption that they are stable. It is however a database id,
which may change during the runtime of the compute node. e.g. If an
instance is unregistered and re-registerd in the vcenter, the moref will
change. By wrapping a moref in a proxy object, with an additional method
to resolve the openstack object to a moref, we can hide those changes
from a caller.

MoRef implementation with closure - should ease the transition to stable
mo-refs One simply has to pass the search function as a closure to the
MoRef instance, and the very same method will be called when an
exception is raised for the stored reference.

Stable Volume refs - The connection_info['data'] contains the
managed-object reference (moref) as well as the uuid of the volume.
When the moref become invalid for some reason, we can recover it by
searching for the volume-uuid as the `config.instanceUuid` attribute
of the shadow-vm.

Stable VM Ref - By encapsulating all the parameters for searching for
the vm-ref again, we can move the retry logic to the session object,
where we can try to recover the vm-ref should it result in a
ManagedObjectNotFound exception.

Use refs as index for fakedb -  It was previously using the object-id
to lookup an object, meaning that you couldn't pass a newly created
Managed-object-reference like you could over the vmware-api. Now the
lookup happens over the ref-id string, and in turn some functions
were refactored to take that into account.

Partial-Bug: #1962771

Change-Id: I2a3ddf95b7fe07630855b06e732f8764efb13e91
2022-04-29 08:14:39 +00:00
..
disk Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
hyperv Add supports_remote_managed_ports capability 2022-02-09 01:23:27 +03:00
image libvirt: virtuozzo instance resize support 2016-06-28 22:13:49 +03:00
ironic Add supports_remote_managed_ports capability 2022-02-09 01:23:27 +03:00
libvirt Merge "Fix the PCI device capability dict creation" 2022-04-14 12:10:30 +00:00
powervm Add supports_remote_managed_ports capability 2022-02-09 01:23:27 +03:00
vmwareapi VMware: StableMoRefProxy for moref recovery 2022-04-29 08:14:39 +00:00
zvm Add supports_remote_managed_ports capability 2022-02-09 01:23:27 +03:00
__init__.py
arch.py Added ability to configure default architecture for ImagePropertiesFilter 2018-05-14 16:55:13 -04:00
block_device.py block_device: Ignore VolumeAttachmentNotFound during detach 2021-12-03 12:07:33 +00:00
configdrive.py Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
driver.py Add supports_remote_managed_ports capability 2022-02-09 01:23:27 +03:00
event.py Port binding based on events during live migration 2018-07-19 09:09:55 -04:00
fake.py Add supports_remote_managed_ports capability 2022-02-09 01:23:27 +03:00
hardware.py Merge "Fix to implement 'pack' or 'spread' VM's NUMA cells" 2022-02-17 20:28:04 +00:00
imagecache.py Include removal of ephemeral backing files in the image cache manager 2020-10-09 12:24:06 +01:00
images.py images: Make JSON the default output format of calls to qemu-img info 2020-04-16 16:38:24 +01:00
interfaces.template
netutils.py nova-net: Remove final references to nova-network 2020-01-08 13:54:12 +00:00
osinfo.py Stop sending bad values from libosinfo to libvirt 2019-07-04 15:30:51 +01:00
storage_users.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
virtapi.py Add a way to exit early from a wait_for_instance_event() 2019-12-02 07:00:26 -08:00