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
Bug 1820192: ask before deleting referenced VM resources #5457
Bug 1820192: ask before deleting referenced VM resources #5457
Conversation
atiratree
commented
May 15, 2020
@suomiy: This pull request references Bugzilla bug 1820192, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This looks at resources which are referenced through volumes (most notably DataVolume and PVC, but also Secret, Config Map etc.). And investigates if the VM owns the resource, and gives user an option of preserving that resources and separating it from VM lifecycle. Option of keeping that resource when VM owns the resource (when checkbox deselected)DV: Secret No option when VM doesn't own the resourceSame behaviour when deleting the VM, but has only possibility of selecting the resources in bulk.when VM owns 2 disks (one DV and one Secret)No option when VM doesn't own any resource |
Please review @yaacov @pcbailey @glekner @irosenzw The main problem is that we do not offer such option for cdroms and also for environment tab (less priority). How could we present that with our cdrom UI? Would it make sense to align it with the disk flow as it allows more features (also bus editing)? We could use disk filtering which @yaacov added in #5453 and send them to disks tab filtered for CDs only, when the user clicks on CDs editing button in VM details tab |
1444d57
to
dd68f6f
Compare
Hey @suomiy this is awesome! I really think these type of effort is exactly what we need to ensure the user is more informed on their actions, nice work! I have some questions/ comments :)
Can we show just the disk name here and not the name of the vm (makes it easier to read and we can assume they already know that it's for this VM b/c they took the action) I think we need to come up with an overall strategy on how we are presenting data volumes and PVCs to the user. When they create a disk they aren't informed of the backing DV/PVC so it could confuse them here. I like adding DV/PVC exposure but I don't think we should do it at the end like this but rather the beginning when they create the Disk.
What about adding some clarity : This will also delete the example-secret connected to this VM.
Can we add some assurance here for the user where we state that it won't be deleted entirely but just from the VM?
|
Nice, added. I like the idea of making this clear to the user at the beginning, but I still think it has a value of emphasizing this when deleting too.
I think this might indicate a wrong action if the checkbox is deselected.
It is not that straightforward, because we would have to mention that some disks reference different resource, but some might not. So the VM might reference something, or in case of container image nothing.
The VM will be always deleted and is not dependent on the checkbox. We would like to add a list of disks and possibility to pick them in the future. Currently there is also stale VirtualMachineImport resource marked for deletion. So we have actually 2 checkboxes (forgot to show it) as it is better to have them listed separately. |
I might be thinking of these checkboxes wrong. |
we are providing additional options (what to delete/preserve) when they delete the VM/disk |
This looks like a feature, we may want to consider this after 4.5, added notes about this bug in the BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1820192#c8 Un-targeting the BZ from 4.5 (see comment in BZ). |
@yaacov: This pull request references Bugzilla bug 1820192, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Re-targeting the BZ to 4.5 (see comment in BZ). |
@yaacov: This pull request references Bugzilla bug 1820192, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@suomiy ah I think what's confusing me here is the pattern that we see in other places in OCP where the user is required to check the checkbox to ensure they are aware of the destructive action they are about to take.
We could also have something like |
- on disk removal - remove owner reference if delete checkbox is off
- allow freeing up volume resources on VM/Template delete - add option for cleaning up vm import - add hooks for vmlike entity and vmimport
So when they uncheck items do we change the text above? and if they uncheck them all we remove the text? Or is this just in cases where the modal is shown and only some (or none) of the check boxes are checked? |
it is checked by default and we change the text if they get unchecked
I think it is preferable to have them checked by default (especially VMImport resource - as they probably will not know what it is for) For example, oVirt has the same behaviour - has deletion of disks checked by default. |
Yes I agree, checked by default is the best. I Would say we don't need to change the text string though it could be a bit weird to see it shifting around. I think this string could work:
WDYT?
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: suomiy, yaacov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@suomiy: All pull requests linked via external trackers have merged: openshift/console#5457. Bugzilla bug 1820192 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |