-
Notifications
You must be signed in to change notification settings - Fork 91
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
Exclude already attached VMs from the volume attachment form #409
Exclude already attached VMs from the volume attachment form #409
Conversation
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.
👍
the NOT IN query should be performant enough here, expecting this will be in thousands of records. It can have problems on higher scales
@Ladas What would be the most performant way to approach the query? |
@mansam on higher scale, I was playing with outer join of two tables (1 created from a query). But that'd be probably overkill here. :-) |
(I'm also not quite 100% sure that this is the right way to solve the bug. I need to do a little more investigating of cinder multi-attach to know for sure if this makes sense vs just greying out the option.) |
@mansam I think it should be ok? You can't attach the same vm to volume twice. For multiattach (given the volume type supports it), you can attach 1 volume to more Vms |
@Ladas Cool. That's what I thought, just wanted to double check. |
Checked commit mansam@bf034ab with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Looks good to me, merging! |
@mansam Can this be |
@mansam ^ ping |
Yes, this should go to Hammer - https://bugzilla.redhat.com/show_bug.cgi?id=1672695 |
…olume-attachment-form Exclude already attached VMs from the volume attachment form (cherry picked from commit 66f9fd1) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1672695
Thanks @aufi Hammer backport details:
|
This PR updates the Volume -> Attach to Instance form to exclude instances that are already attached to the selected volume.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1653062