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

   ### Description
   
   This PR updates primary_storage resource counter to include correct size 
after volume creation/resize and other improvements.
   
   - Recalculate resource counters for root domain in the periodic task
   - Update correct size in the primary_storage resource counter after volume 
creation/resize
   - Some code improvements
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
*********************************************************************************
 -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
*********************************************************************************
 -->
   
   ### Types of changes
   
   - [ ] 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)
   - [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
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   <!-- see how your change affects other areas of the code, etc. -->
   
   Manually tested VM/Volume operations using ScaleIO pool and checked the 
primary_storage resource counters for different domains.
   
   Before fix (_primarystorageavailable_ counter is not shown appropriately for 
unlimited):
   
   ```
   (testenv) 🐱 > list domains 
filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
   {
     "count": 3,
     "domain": [
       {
         "name": "ROOT",
         "primarystorageavailable": "Unlimited",
         "primarystoragelimit": "Unlimited",
         "primarystoragetotal": -5
       },
       {
         "name": "Domain01",
         "primarystorageavailable": "-1",
         "primarystoragelimit": "-1",
         "primarystoragetotal": 0
       },
       {
         "name": "Domain02",
         "primarystorageavailable": "-1",
         "primarystoragelimit": "-1",
         "primarystoragetotal": 0
       }
     ]
   }
   (testenv) 🐱 > list domains 
filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
   {
     "count": 3,
     "domain": [
       {
         "name": "ROOT",
         "primarystorageavailable": "Unlimited",
         "primarystoragelimit": "Unlimited",
         "primarystoragetotal": 3
       },
       {
         "name": "Domain01",
         "primarystorageavailable": "-9",
         "primarystoragelimit": "-1",
         "primarystoragetotal": 8
       },
       {
         "name": "Domain02",
         "primarystorageavailable": "-1",
         "primarystoragelimit": "-1",
         "primarystoragetotal": 0
       }
     ]
   }
   (testenv) 🐱 > list domains 
filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
   {
     "count": 3,
     "domain": [
       {
         "name": "ROOT",
         "primarystorageavailable": "Unlimited",
         "primarystoragelimit": "Unlimited",
         "primarystoragetotal": 6
       },
       {
         "name": "Domain01",
         "primarystorageavailable": "-25",
         "primarystoragelimit": "-1",
         "primarystoragetotal": 24
       },
       {
         "name": "Domain02",
         "primarystorageavailable": "-1",
         "primarystoragelimit": "-1",
         "primarystoragetotal": 0
       }
     ]
   }
   ```
   
   After fix =>
   
   ```
   (testenv) 🐱 > list domains 
filter=name,primarystoragetotal,primarystoragelimit,primarystorageavailable
   {
     "count": 3,
     "domain": [
       {
         "name": "ROOT",
         "primarystorageavailable": "Unlimited",
         "primarystoragelimit": "Unlimited",
         "primarystoragetotal": 88
       },
       {
         "name": "Domain01",
         "primarystorageavailable": "Unlimited",
         "primarystoragelimit": "Unlimited",
         "primarystoragetotal": 40
       },
       {
         "name": "Domain02",
         "primarystorageavailable": "Unlimited",
         "primarystoragelimit": "Unlimited",
         "primarystoragetotal": 24
       }
     ]
   }
   ```
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to