-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Linstor: implement volume and storage stats #10850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linstor: implement volume and storage stats #10850
Conversation
Using storage stats not every agent has to query the controller for current used and capacity storage. Volume stats will show physical used size for thin volume in Cloudstack. This volume stats are cached to not query the Linstor controller each time a volume is asked for.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10850 +/- ##
============================================
+ Coverage 4.28% 15.17% +10.88%
- Complexity 0 11343 +11343
============================================
Files 371 5415 +5044
Lines 29700 475407 +445707
Branches 5211 58007 +52796
============================================
+ Hits 1274 72133 +70859
- Misses 28281 395210 +366929
- Partials 145 8064 +7919
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements volume and storage statistics for Linstor to reduce controller queries for storage usage.
- Updated dependency version for cs.java-linstor in pom.xml
- Added new utility methods in LinstorUtil to calculate storage stats and check for diskless resources
- Updated LinstorPrimaryDataStoreDriverImpl to offer storage and volume stats with caching, and introduced a new configuration for cache time
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pom.xml | Bumped cs.java-linstor version to 0.6.1 to support enhancements |
LinstorUtil.java | Added methods for calculating storage stats and determining diskless resources |
LinstorConfigurationManager.java | Introduced new configuration key for caching volume stats |
LinstorPrimaryDataStoreDriverImpl.java | Enabled storage stats, implemented volume stats caching and retrieval logic |
CHANGELOG.md | Updated changelog with new storage/volume stats feature |
Comments suppressed due to low confidence (1)
plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/driver/LinstorPrimaryDataStoreDriverImpl.java:1579
- Ensure that the cache key constructed with LinstorUtil.RSC_PREFIX matches the keys used when populating the cache in fillVolumeStatsCache. If the resource names stored in the cache already include the expected prefix, the extra concatenation could lead to cache misses.
return volumeStats.get(LinstorUtil.RSC_PREFIX + volumeId);
...n/java/org/apache/cloudstack/storage/datastore/driver/LinstorPrimaryDataStoreDriverImpl.java
Show resolved
Hide resolved
@blueorangutan package |
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13346 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM.
no core code is touched, GHA passes, merging as is. |
Description
Using storage stats not every agent has to query the controller
for current used and capacity storage.
Volume stats will show physical used size for thin volume in Cloudstack.
This volume stats are cached to not query the Linstor controller each
time a volume is asked for.
Fixes: #10142
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Fresh Linstor cluster, basic operations
How did you try to break this feature and the system with this change?