JoaoJandre opened a new pull request, #6868:
URL: https://github.com/apache/cloudstack/pull/6868

   ### Description
   
   When a user removes a VM, ACS puts it in a `Destroy` state and stops 
counting it towards the user resource limit. However, the VM root volume 
remains in `Ready` state and consuming resources until the VM cleanup task runs 
on ACS. 
   
   The `destroy.root.volume.on.vm.destruction` setting was created so that when 
it is set to true, when destroying a VM its root volume will also be placed in 
the `Destroy` state, no longer counting towards the user resource limit.
   
   Also, while this setting is active, root volumes in the destroy state will 
not be removed by the ACS volume cleanup task, so that it is possible to 
restore the VM again. However, the VM cleanup task will still remove the VMs 
along with their respective volumes.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   This was tested in a local lab.
   | NÂș | Test | Result |
   | ------ | ------ | ------ |
   |1| With the setting disabled, a VM was destroyed | the VM was in `Destroy` 
state and its root volume in `Ready` |
   |2| With the setting enabled, a VM was destroyed | the VM was in `Destroy` 
state and its root volume in `Destroy` too |
   |3| With the setting enabled, the test 2 VM was restored | The VM was 
correctly restored along with its root volume |
   |4| Test 1 VM was restored | The VM was correctly restored |
   |5| With the setting enabled, the test 3 VM was destroyed, its volume 
restored, and then the VM restored | When the volume was restored, it became 
`DATADISK` type (since it is detached when being recovered), then the VM was 
restored, the volume was reattached and the VM worked correctly |
   |6| With the setting enabled, a VM was destroyed, and the cleanup task had 
its interval shortened | The cleanup task did not purge ROOT volume from VM |
   |7| With the setting disabled, and with a ROOT volume in `Destroy` state the 
cleanup task had its interval shortened | ROOT volume was purged |
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to