rakgenius opened a new pull request #3669: Fix resource count of expunged volume
URL: https://github.com/apache/cloudstack/pull/3669
 
 
   ## Description
   
   If the volume of a VM is in "Expunged" state then it should not be
   considered towards total resource count of "primarystoragetotal"
   field of a domain.\
   Currently, CloudStack takes into resource calculation even if the
   volume is expunged. The volume itself doesn't exist in primary
   storage and hence it should not be considered towards resource
   calculation.
   
   <!-- In case of bug fix, the expected and actual behaviors, steps to 
reproduce. -->
   
   Steps to reproduce the issue:
   
   1 . Get the resource count of "primarystoragetotal" of a particular domain.
   2 . Create a VM with 5GB root disk size and stop it.
   3 . Now the value of "primarystoragetotal" should be intitial value plus 5.
   4 . Navigate to "volumes" of the VM and select "Download Volume" option.
   5 . Once the volume is downloaded, expunge the VM.
   6 . Get the resource count of "primarystoragetotal". it will be same value 
as in step 3
       But it should be same as initial value obtained in step 1.
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the 
boxes that apply: -->
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## Screenshots (if appropriate):
   
   ## How Has This Been Tested?
   This has been tested using the cloudmonkey api commands.
   
   ```
   list domains id=<ID> 
filter=primarystorageavailable,primarystoragelimit,primarystoragetotal
   ```
   
   We can also run ```update resourcecount domainid=<ID>``` to update the 
resource before running the above command.
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md)
 document -->
   

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


With regards,
Apache Git Services

Reply via email to