-
Notifications
You must be signed in to change notification settings - Fork 23
Include metadata as part of create_vm and create_disk #48
base: master
Are you sure you want to change the base?
Conversation
Hey nehagjain15! Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA. |
I'm not sure I fully understand the motivation behind this. So far, we have ensured that after creating a VM and after creating a disk the Director calls the method to set the metadata. This sets all IaaS specific tags on the infrastructures which support it.
|
Hi @voelzmo - Sorry about the delay on getting back to you. As Neha mentioned there are similar requests for the other IaaSes as well. What we are looking for is the ability to accept a prefix/suffix strings that can be specified in the VMTypes / Deployment manifest so that all the VMs that belong to a particular Instance Group get a certain prefix or suffix added to their names. There are several usecases for these -
Please let me know your thoughts. cc: @mfine30 |
@friegger @beyhan @voelzmo - forgot to mention this earlier today. Do you have any objections around this potential CPI change to provide VM metadata as part of the initial A related issue was raised in the AWS CPI as an example of how it could be used in other IaaSes. cloudfoundry/bosh-aws-cpi-release#93 refers to locking down EC2 operations based on tags (and those tags would need to be present on the initial @voelzmo mentions that cloudfoundry/bosh#1163 is orthogonal, which I'd mostly agree. I think there's the caveat that some IaaSes might not support renaming things after the resource is created, and this would help that situation. I think this is the case in vCenter for VM names where they can't be changed after creation. (Whether or not that property should be a director-level property is a different topic) Anyways, I'd rather consider implementing this change before CPIs start relying on the |
@voelzmo if we get metadata as part of create_vm call we could
|
I don't have any. I would like to have VM creation and tagging possible with one call on BOSH side. CPIs could decide whether they want/can support this or not. |
Sounds good to me. OpenStack does allow for setting metadata on With the questions above I just wanted to understand where the request is coming from: Which problem are we solving and for whom? I'm perfectly fine with helping vSphere pick better names for VMs and folders and also help lock down security on AWS. This would most likely also help with better VM names for GCP: cloudfoundry/bosh-google-cpi-release#217 (comment). Thanks for following up on this and helping me understand! |
proposals/include-metadata.md
Outdated
|
||
# Details | ||
|
||
Metadata will include basic information about director, deployment and instance_group. E.g |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also all user-defined tags from manifest and runtime config? Or will those still be set with a later call to set_vm_metadata
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd expect create_vm
to receive any tags that the immediate followup set_vm_metadata
call would send.
proposals/include-metadata.md
Outdated
|
||
# Unresolved questions | ||
|
||
What other information can be added as part of this set? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potention other question: The director currently calls set_vm_metadata
and set_disk_metadata
. How does the director determine to not call these anymore? Based on CPI API version returned by the info
method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it bad to still call them? It'd effectively be a no-op. One thing to keep in mind is that it's possible for some metadata to change, and I think CPIs should still support that. It does call out that we should probably have a recommendation on which metadata keys are used in resource-permanent fields that cannot be changed later (to avoid confusing users if the values change).
For example, compilation VMs will have their metadata updated to reflect what they're currently compiling (in the case of reuse_compilation_vms
).
I don't think disk metadata is currently updated at any point, but I think we should support it. For example, I think disk metadata can get out of sync with manual attach-disk
calls; might be something director wants to fix/change at some point.
@voelzmo & @dpb587-pivotal I updated the proposal based on your conversation. What would be the next steps to get this added to tracker so that the change can be implemented? |
|
||
# Unresolved questions | ||
|
||
How should set_vm_metadata and set_disk_metadat methods be updated? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think they should (or need) to be updated. I'd expect them to remain the same and be called in the same places as they currently are. I think this is cheapest to support both older/newer CPIs and avoid director dealing with complex versioning behaviors, all with minimal impact to the actual IaaS calls. Happy to talk more about that if anyone has concerns or objections with that approach.
I think the general recommendation for CPIs should be "avoid making unnecessary metadata changes" to help cover scenarios where its going to be a no-op in the traditional create_vm
+ set_vm_metadata
case. Although there's probably not much difference between querying for current tags and sending changed ones vs sending the full list of tags to the IaaS every time.
Reposting from internal Slack where I didn't hear any response... From my perspective, I think there's enough of an understanding of what changes are necessary and desired for it, and I think it makes sense. Conceptually, I think the two pieces are:
@nehagjain15 @yeshwantbabar, I know you're interested in the vSphere CPI support, at least. Are you also interested in implementing the director-side stuff as well? Otherwise, I'd recommend you and @mfine30 chat more about where it'd fall in prioritization between your teams, here or in your next sync. |
@dpb587-pivotal I'd still be interested in a concept on how to avoid unnecessary calls from director to CPI (and therefore to the IaaS API). This would also help with other issues e.g. rate limiting on AWS. |
@voelzmo seems reasonable. Want to document your thoughts here, or discuss it elsewhere? And do you want it to be a blocker on any initial release of CPI+director for this functionality, or would you consider it something that can be improved on later? |
No description provided.