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

   ### Description
   
   Adds framework layer change to allow retrieving and storing IOPS stats for 
storage pools. Custom `PrimaryStoreDriver` can implement method - 
`getStorageIopsStats` for returning IOPS stats. Existing method `getUsedIops` 
can also be overridden by such plugins when only used IOPS is returned. For 
testing purpose, implementation has been added for simulator hypervisor plugin 
to return capacity and used IOPS for a pool. For local storage pool, 
implementation has been added using iostat to return currently used IOPS. 
StoragePoolResponse class has been updated to return IOPS values which allows 
showing IOPS values in UI for different storage pool related views and APIs.
   
   ### 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)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   
   
   With local storage (used iops returned by listStoragePools API):
   
   ```
   (localcloud) 🐱 > list storagepools scope=HOST
   {
     "count": 1,
     "storagepool": [
       {
         "clusterid": "3c21973f-de72-4196-af20-a8d13bd043a2",
         "clustername": "p1-c1",
         "created": "2024-12-03T06:31:52+0000",
         "disksizeallocated": 0,
         "disksizetotal": 20386414592,
         "disksizeused": 10423214080,
         "hasannotations": false,
         "hypervisor": "KVM",
         "id": "124992d7-8710-4c58-bafd-24efa7b79570",
         "ipaddress": "10.0.32.118",
         "name": "ol8.localdomain-local-124992d7",
         "overprovisionfactor": "2.0",
         "path": "/var/lib/libvirt/images",
         "podid": "42791654-5ace-4f1e-89e4-62bc2c3e6396",
         "podname": "Pod1",
         "provider": "DefaultPrimary",
         "scope": "HOST",
         "state": "Up",
         "storagecapabilities": {
           "VOLUME_SNAPSHOT_QUIESCEVM": "false"
         },
         "type": "Filesystem",
         "usediops": 2600140,
         "zoneid": "7fd98beb-22f0-4fb7-9740-8ec6290c7500",
         "zonename": "pr488-t11753-kvm-ol8"
       }
     ]
   }
   ```
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- 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