weizhouapache commented on pull request #4493:
URL: https://github.com/apache/cloudstack/pull/4493#issuecomment-732226548
> @harikrishna-patnala
>
> I'm not following the logic of what you're trying to achieve here.
>
> If a user deletes a VM which has data disks (without expunging) then the
disks get detached - as expected.
> Disks are seen as first-class citizens; they can be attached to a VM, but
they do not **_belong_** to a VM.
>
> Therefore, at best a warning in the UI that the disks will be detached and
will have to be re-attached to be used again is the most that could be required.
>
> Restoring a VM is a fix for deleting something that you didn't mean to; so
if:
>
> A user has deleted their VM, then attaches the disks to another VM - which
(because of above) is very likely (as otherwise, they would have deleted the
data disks as well). Then they realise that they need the old VM back for some
reason maybe get a config off it, - how are the disk(s) going to be reattached
without breaking the second VM?
>
> so right now i'm -1 on the PR and it's premise.
so the question is,
if we destroy a vm ("Expunge" is not checked), should the volumes checked on
UI be detached or not ?
I prefer not to detach the volumes

if we expunge a vm, it is clear that the volumes will be detached and
removed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]