-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow cloud volume to provide a list of volumes for attach #14058
Allow cloud volume to provide a list of volumes for attach #14058
Conversation
While opening the view to attach a selected volume to a new instance, the UI will currently ask for the VMs that are available in the cloud tenant of the chosen volume. While it works for OpenStack, Amazon has no notion of tenants currently. Instead of relying on the tenant's VMs, this patch proposes a new method in the cloud volume allowing it to specify the list of VMs this volume can be attached to. In case of OpenStack, this will be delagated to `cloud_tenant` and on Amazon it will be delagated to `availability_zone` (because the volume has to reside in the same AZ). A simple spec test is provided to validate the `available_vms` only return the list of VMs in the same cloud tenant. Signed-off-by: Gregor Berginc <[email protected]>
5b2fe35
to
aa343b2
Compare
Checked commit gberginc@aa343b2 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@blomquisg Do you think this is safe to merge? I'd like to add AWS support and then update the UI to get the list of allowed VMs from the volume itself. |
@tzumainn can you look over this and make sure that it works for OpenStack? |
When considering this, keep in mind that a change in this line will be made in the UI to ask the volume for the VMs that can be used to attach the volume to, i.e.
If you prefer, I can push PRs for the UI and Amazon EBS provider. |
@mansam what do you think? you're probably far more experienced with openstack volume shenanigans than I am. |
@gberginc yeah, if you could push the simultaneous PRs and reference back to this one as a dependency that would be good. In general, this looks good to me. Once I get confirmation from @mansam, then I'll merge this. I won't hold this up on seeing the simultaneous PRs. |
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.
Dependent on confirmation from @mansam
@blomquisg Two additional PRs created in the UI and Amazon repositories to better show the goal of this PR. |
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.
This looks like a good solution. 👍
While opening the view to attach a selected volume to a new instance, the UI will currently ask for the VMs that are available in the cloud tenant of the chosen volume. While it works for OpenStack, Amazon has no notion of tenants currently.
Instead of relying on the tenant's VMs, this patch proposes a new method in the cloud volume allowing it to specify the list of VMs this volume can be attached to. In case of OpenStack, this will be delagated to
cloud_tenant
and on Amazon it will be delagated toavailability_zone
(because the volume has to reside in the same AZ).A simple spec test is provided to validate the
available_vms
only return the list of VMs in the same cloud tenant. I've got the counterpart ready for Amazon, but will wait to see if this change is acceptable.Is there any alternative to this approach?
@miq-bot add_label providers/openstack/cloud, providers/amazon, providers/storage, ui