Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Attachment info upon Get/List #1199

Closed
akutz opened this issue Apr 27, 2017 · 2 comments
Closed

Attachment info upon Get/List #1199

akutz opened this issue Apr 27, 2017 · 2 comments

Comments

@akutz
Copy link
Contributor

akutz commented Apr 27, 2017

Hi,

When inspecting a volume (VMDK) using the vmdk driver's Get or List functions, it would be fantastic if the device(s) to which that VMDK is attached is/are included in the returned information.

Upon attaching a VMDK to a VM, the device to which the VMDK is attached is returned: {"ControllerPciSlotNumber": "192", "Unit": "0"}. However, this information is not currently available for a VMDK after the initial attach call. The result is there's no way to map a VMDK to the device to which it's attached after the initial attach operation.

@msterin and I discussed storing the above information in the VMDK's associated metadata file and then removing said info upon a detach. The vol_info function would then be updated to retrieve this information as part of a standard Get or List operation.

While you're at it, it would also be wonderful if the Get/List operations would retrieve a VM's MoRef assuming that's available easily on the backend. This would enable the use of GoVmomi or any other tool to act upon the VM and its disks.

Thank you.

@msterin
Copy link
Contributor

msterin commented Apr 27, 2017

@akutz - can you add a couple of words or a link to explain how it will be used ? I understand it's something in Rex/Ray , but what is it ? It would help a lot if we understood the use case better.

@akutz
Copy link
Contributor Author

akutz commented Apr 27, 2017

Hi @msterin,

Sure thing. I am going to submit a PR for it soon anyway, but I don't mind expounding a bit on its purpose.

Essentially we need to be able to map a VMDK to the device to which it's attached on a VM. While the attach call provided that information at the time of the attach operation, that information is not available at any other time, such as when a VMDK is introspected via the vmdkops service.

We use this information to provide details about a volume's status and to which instance (client/node/VM) the volume is currently attached.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants