<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/nova.git/nova/virt/vmwareapi/volumeops.py, branch master</title>
<subtitle>opendev.org: openstack/nova.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/'/>
<entry>
<title>VMware: StableMoRefProxy for moref recovery</title>
<updated>2022-04-29T08:14:39+00:00</updated>
<author>
<name>Fabian Wiesel</name>
<email>fabian.wiesel@sap.com</email>
</author>
<published>2022-03-05T13:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=56055ede03fff633020e0f34fa4da5c8457a89c6'/>
<id>56055ede03fff633020e0f34fa4da5c8457a89c6</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>VMware: Support volumes backed by VStorageObject</title>
<updated>2022-02-15T09:44:38+00:00</updated>
<author>
<name>alecorps</name>
<email>alban.lecorps@ubisoft.com</email>
</author>
<published>2021-09-13T15:01:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=d5faf45e9df00528e6e3aa55cd2edd184181a249'/>
<id>d5faf45e9df00528e6e3aa55cd2edd184181a249</id>
<content type='text'>
vSphere 6.5 introduced APIs to manage virtual disks (volumes)
as first class objects. The new managed disk entity is called
VStorageObject aka First Class Disk (FCD). Adding support for
volumes backed by VStorageObject.

Change-Id: I4a5a9d3537dc175508f0a0fd82507c498737d1a5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vSphere 6.5 introduced APIs to manage virtual disks (volumes)
as first class objects. The new managed disk entity is called
VStorageObject aka First Class Disk (FCD). Adding support for
volumes backed by VStorageObject.

Change-Id: I4a5a9d3537dc175508f0a0fd82507c498737d1a5
</pre>
</div>
</content>
</entry>
<entry>
<title>VMWare: Use get_hardware_devices throughout</title>
<updated>2021-08-18T13:01:27+00:00</updated>
<author>
<name>Fabian Wiesel</name>
<email>fabian.wiesel@sap.com</email>
</author>
<published>2021-08-18T13:01:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=1f2aa3e9d83219a2f504907c2ff02a04aefde7d6'/>
<id>1f2aa3e9d83219a2f504907c2ff02a04aefde7d6</id>
<content type='text'>
Instead of retrieving the hardware devices
through a get_object_property directly,
and then inconsistently handling the normalisation
in the called function or in the caller,
use get_hardware_devices everywhere and handle
the normalisation there.

Change-Id: I221013216c4bdd241a894fb0a68c95d98d649c33
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of retrieving the hardware devices
through a get_object_property directly,
and then inconsistently handling the normalisation
in the called function or in the caller,
use get_hardware_devices everywhere and handle
the normalisation there.

Change-Id: I221013216c4bdd241a894fb0a68c95d98d649c33
</pre>
</div>
</content>
</entry>
<entry>
<title>vmware: Use oslo.vmware's get_moref_value()</title>
<updated>2021-04-19T09:35:54+00:00</updated>
<author>
<name>Johannes Kulik</name>
<email>johannes.kulik@sap.com</email>
</author>
<published>2021-04-16T10:45:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=0997ad15fcaff33443d31d1dc26516b3aed8a802'/>
<id>0997ad15fcaff33443d31d1dc26516b3aed8a802</id>
<content type='text'>
With switching the SOAP library backing oslo.vmware [1], the internal
representation of ManagedObjectReference's attributes changes. To be able
to make the switch without interruption, we introduced helper functions
in oslo.vmware. This commit uses one of those - get_moref_value()
- to make the access to the "value" attribute compatible with both
backing libraries.

Bump oslo.vmware lower-constraint to a version containing the helper
function. We bump one version higher, because we already merged a patch
(I3c769d3499f906b33725171a57313c8ae35b6a1d) that uses the cookiejar
access contained in that version.

[1] https://specs.openstack.org/openstack/oslo-specs/specs/victoria/oslo-vmware-soap-library-switch.html

Change-Id: I48841a777aaa2e515c141857099c16483ab619e0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With switching the SOAP library backing oslo.vmware [1], the internal
representation of ManagedObjectReference's attributes changes. To be able
to make the switch without interruption, we introduced helper functions
in oslo.vmware. This commit uses one of those - get_moref_value()
- to make the access to the "value" attribute compatible with both
backing libraries.

Bump oslo.vmware lower-constraint to a version containing the helper
function. We bump one version higher, because we already merged a patch
(I3c769d3499f906b33725171a57313c8ae35b6a1d) that uses the cookiejar
access contained in that version.

[1] https://specs.openstack.org/openstack/oslo-specs/specs/victoria/oslo-vmware-soap-library-switch.html

Change-Id: I48841a777aaa2e515c141857099c16483ab619e0
</pre>
</div>
</content>
</entry>
<entry>
<title>VMware VMDK detach: get adapter type from instance VM</title>
<updated>2019-09-25T13:20:24+00:00</updated>
<author>
<name>Ivaylo Mitev</name>
<email>imitev@vmware.com</email>
</author>
<published>2019-04-18T12:36:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=ec93474a84aff1c184a58fe436ea4a0842bd9825'/>
<id>ec93474a84aff1c184a58fe436ea4a0842bd9825</id>
<content type='text'>
Detach VMDK using adapter type from instance instead of shadow VM.

Closes-Bug: #1835733
Change-Id: I8668d57f6b302ad8cdc1e4af28cf6bb8145a738d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Detach VMDK using adapter type from instance instead of shadow VM.

Closes-Bug: #1835733
Change-Id: I8668d57f6b302ad8cdc1e4af28cf6bb8145a738d
</pre>
</div>
</content>
</entry>
<entry>
<title>VMware: Factor out relocate_vm()</title>
<updated>2017-09-20T10:43:09+00:00</updated>
<author>
<name>Radoslav Gerganov</name>
<email>rgerganov@vmware.com</email>
</author>
<published>2016-01-15T11:41:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=766d13218763f43ba91c2a15adff438a0dd84e37'/>
<id>766d13218763f43ba91c2a15adff438a0dd84e37</id>
<content type='text'>
VM relocation is not volume specific operation and should be moved to
vm_util.py

Change-Id: Ic129a8da2b3e6eed3635f3d8b07f32a60ec9d8e3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
VM relocation is not volume specific operation and should be moved to
vm_util.py

Change-Id: Ic129a8da2b3e6eed3635f3d8b07f32a60ec9d8e3
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "VMware: Handle missing volume vmdk during detach"</title>
<updated>2017-08-28T19:17:26+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2017-08-28T19:17:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=2a053cf7afbdb167ea2e06eff1486f2644cd20f1'/>
<id>2a053cf7afbdb167ea2e06eff1486f2644cd20f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bug on vmware driver attach volume failed</title>
<updated>2017-08-25T07:53:50+00:00</updated>
<author>
<name>DamonLi</name>
<email>damonl@vmware.com</email>
</author>
<published>2017-08-22T07:48:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=8aa3133e4515cd30f47bea8f3fed9ce4ec883c53'/>
<id>8aa3133e4515cd30f47bea8f3fed9ce4ec883c53</id>
<content type='text'>
The function "get_vm_state" in vmwareapi returns the index of the vm state in
nova InstancePowerState. The "int" value do not have .lower() function. This
will cause error when attach volume.

Closes-Bug: #1712281

Change-Id: I7b6d581904219d1ba4615054f9676390170ab1bc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function "get_vm_state" in vmwareapi returns the index of the vm state in
nova InstancePowerState. The "int" value do not have .lower() function. This
will cause error when attach volume.

Closes-Bug: #1712281

Change-Id: I7b6d581904219d1ba4615054f9676390170ab1bc
</pre>
</div>
</content>
</entry>
<entry>
<title>VMware: Handle missing volume vmdk during detach</title>
<updated>2017-07-20T14:30:03+00:00</updated>
<author>
<name>Radoslav Gerganov</name>
<email>rgerganov@vmware.com</email>
</author>
<published>2017-07-18T08:35:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=fee8409208af77f1f01c7ef3c5438cb7ef493b3d'/>
<id>fee8409208af77f1f01c7ef3c5438cb7ef493b3d</id>
<content type='text'>
During storage vMotion (live migration of a virtual machine and its disk
files from one datastore to another), the volume's vmdk may be moved
to the instance's datastore folder. We handle this case during detach
volume by catching FileNotFoundException raised by shadow VM relocate
operation. The shadow VM relocate will be NOP if the source and the
destination datastores are the same. In this case, the subsequent
detach disk device from shadow VM will fail if the volume vmdk is
missing. Handling this case by catching and ignoring
FileNotFoundException raised by the detach operation.

Change-Id: I33ad36b147f040364514d8097a1dfc363c50b0b7
Closes-Bug: #1704196
Co-Authored-By: vbala@vmware.com
Co-Authored-By: mrstarke@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During storage vMotion (live migration of a virtual machine and its disk
files from one datastore to another), the volume's vmdk may be moved
to the instance's datastore folder. We handle this case during detach
volume by catching FileNotFoundException raised by shadow VM relocate
operation. The shadow VM relocate will be NOP if the source and the
destination datastores are the same. In this case, the subsequent
detach disk device from shadow VM will fail if the volume vmdk is
missing. Handling this case by catching and ignoring
FileNotFoundException raised by the detach operation.

Change-Id: I33ad36b147f040364514d8097a1dfc363c50b0b7
Closes-Bug: #1704196
Co-Authored-By: vbala@vmware.com
Co-Authored-By: mrstarke@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove translation of log messages</title>
<updated>2017-06-13T04:20:28+00:00</updated>
<author>
<name>Ngo Quoc Cuong</name>
<email>cuongnq@vn.fujitsu.com</email>
</author>
<published>2017-05-23T03:18:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=6c3520ac5ba789dd40d51c0d20a30d0dc44a8c07'/>
<id>6c3520ac5ba789dd40d51c0d20a30d0dc44a8c07</id>
<content type='text'>
The i18n team has decided not to translate the logs because it
seems like it not very useful; operators prefer to have them in
English so that they can search for those strings on the internet.

Partially fix on nova/virt other paths will be fixed on next commits

Change-Id: Ie7821aa4a5147cdb0616741bd1a1b1fc22080440
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i18n team has decided not to translate the logs because it
seems like it not very useful; operators prefer to have them in
English so that they can search for those strings on the internet.

Partially fix on nova/virt other paths will be fixed on next commits

Change-Id: Ie7821aa4a5147cdb0616741bd1a1b1fc22080440
</pre>
</div>
</content>
</entry>
</feed>
