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

   > > DATADISK and ROOT disks are different. When you destroy a vm, DATADISK 
will be detached from the VM, but ROOT disk will not. The VM can be recovered, 
no matter what the state of DATADISK is, because DATADISK is not attached.
   > 
   > @weizhouapache default behavior is that the datadisk is not detached. 
Datadisks will only be detached if you pass the Datadisk id to the 
destroyVIrtualMachine API, then they will be detached and destroyed.
   > 
   @JoaoJandre 
   I just had a quick test. The datadisk id is not passed to 
destroyVIrtualMachine API, but it is detached when destroy a vm.
   
   > > I prefer to make changes with minimum impact. If you want to change the 
calculation of resource count, add a global config in ResourceLimitService, and 
use it in ResourceLimitManagerImpl.
   > 
   > Your solution is almost the same as mine, but without changing the root 
volume's state, which could make thinks confusing for users, because not 
counting a volume which is in ready state is almost an inconsistency. What do 
you think @DaanHoogland ?
   
   @JoaoJandre 
   there is a big difference: the root volume is set to Destroy state in your 
PR, which is what I disagree.
   
   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 ?
   ```
   


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