-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update physical size for the snapshots of the volumes on ceph primary storage #12465
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
base: 4.20
Are you sure you want to change the base?
Update physical size for the snapshots of the volumes on ceph primary storage #12465
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12465 +/- ##
============================================
- Coverage 16.23% 16.23% -0.01%
- Complexity 13381 13383 +2
============================================
Files 5657 5657
Lines 499024 499067 +43
Branches 60562 60573 +11
============================================
+ Hits 81029 81033 +4
- Misses 408959 408996 +37
- Partials 9036 9038 +2
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 adds functionality to capture and store the physical size of snapshots on Ceph (RBD) primary storage by executing the rbd du command to retrieve actual snapshot disk usage. It also includes various code style improvements, fixing spacing inconsistencies around if statements and braces throughout the KVM storage processor and resource classes.
Changes:
- Added a new method to retrieve RBD snapshot physical size using shell commands
- Modified snapshot creation to capture and set physical size for RBD snapshots
- Fixed code formatting inconsistencies (spacing around if statements, braces alignment)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java | Added getRdbSnapshotSize method to fetch physical size via rbd du command; updated createSnapshot to set physical size; fixed code spacing |
| plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java | Fixed spacing around if statements for consistency |
| engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotObject.java | Added null and positive value check before setting physical size in CreateObjectAnswer path; fixed indentation |
| core/src/main/java/org/apache/cloudstack/storage/to/SnapshotObjectTO.java | Removed extra blank lines for cleaner formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@sureshanaparti 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. |
b25bddd to
905335e
Compare
|
@blueorangutan package |
|
@sureshanaparti 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16423 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Description
This PR updates the physical size for the snapshots of the volumes on ceph primary storage, and has some code improvements .
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested the snapshots for the volumes on ceph primary storage with the config 'snapshot.backup.to.secondary' - true & false. Notice the physical size is properly set in both the cases.
DB:
Ceph Dashboard:
ROOT-8 Volume =>
ROOT-9 Volume =>
Ceph cmd output:
ROOT-8 Volume =>
ROOT-9 Volume =>
How did you try to break this feature and the system with this change?