commit 56055ede03fff633020e0f34fa4da5c8457a89c6
Author: Fabian Wiesel <email address hidden>
Date: Sat Mar 5 13:53:18 2022 +0000
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.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /832164 /opendev. org/openstack/ nova/commit/ 56055ede03fff63 3020e0f34fa4da5 c8457a89c6
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 56055ede03fff63 3020e0f34fa4da5 c8457a89c6
Author: Fabian Wiesel <email address hidden>
Date: Sat Mar 5 13:53:18 2022 +0000
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 instanceUuid` attribute
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.
of the shadow-vm.
Stable VM Ref - By encapsulating all the parameters for searching for ctNotFound exception.
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
ManagedObje
Use refs as index for fakedb - It was previously using the object-id object- reference like you could over the vmware-api. Now the
to lookup an object, meaning that you couldn't pass a newly created
Managed-
lookup happens over the ref-id string, and in turn some functions
were refactored to take that into account.
Partial-Bug: #1962771
Change-Id: I2a3ddf95b7fe07 630855b06e732f8 764efb13e91