JoaoJandre commented on PR #6868:
URL: https://github.com/apache/cloudstack/pull/6868#issuecomment-1325099417

   > > > Can you please answer the question in my previous comment ?
   > > > For example, the configuration is true when you destroy a vm, the 
volume is marked as Destroy. If you change the configuraton to false 
afterwards, the volume will be removed, right ?
   > > 
   > > 
   > > Yes, if you have the configuration enabled with a root volume marked as 
destroy, and you disable the configuration, the root volume will be subject to 
the volume cleanup job. This is expected.
   > 
   > @JoaoJandre in this case, the vm is destroyed, but volume is gone. right ? 
is it expected ?
   
   Here is all the possible cases:
   
   | NÂș | Configuration state | Action | Result | Cleanup |
   | ------ | ------ | ------ | ------ | ------ |
   | 1 | Disabled | VM is destroyed | Only the VM is set to `Destroyed` state, 
its root volume remains in `Ready` state | Here the volume cleanup job will not 
expunge the volume, because the root volume is in `Ready` state, but the VM 
cleanup job will expunge both the VM and its volume |
   | 2 | Enabled | VM is destroyed | Both the VM and its root volume are set to 
`Destroyed` state | Here the volume cleanup job will not expunge the VM's root 
volume, because the volume's type is `ROOT` and the configuration is enabled, 
but the VM cleanup job will expunge both the VM and its volume |
   | 3 | Enabled | VM is destroyed, then the configuration is disabled | Both 
the VM and its root volume are set to Destroyed state | Here the volume cleanup 
job will expunge the VM's root volume, because the configuration was disabled, 
the VM cleanup job will expunge the VM (and its volume, if this runs before the 
volume cleanup job)| 
   
   The first case is current behavior, this PR does not change that. This PR 
introduces cases 2 and 3.
   
   So answering your question:
   > @JoaoJandre in this case, the vm is destroyed, but volume is gone. right ? 
is it expected ?
   
   Yes, this will happen in case 3, that is expected.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to