Fix KVM incremental volume snapshot migration between secondary storages#12086
Fix KVM incremental volume snapshot migration between secondary storages#12086hsato03 wants to merge 3 commits intoapache:4.22from
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12086 +/- ##
============================================
- Coverage 17.92% 17.92% -0.01%
- Complexity 16154 16158 +4
============================================
Files 5939 5942 +3
Lines 533181 533435 +254
Branches 65237 65257 +20
============================================
+ Hits 95585 95597 +12
- Misses 426856 427098 +242
Partials 10740 10740
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:
|
|
@blueorangutan package |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where KVM incremental volume snapshots were not being migrated when data was transferred between secondary storages. The implementation extends the existing migration process to handle KVM-specific incremental snapshots and their checkpoint files, ensuring the entire snapshot chain is correctly migrated and rebased.
Key changes:
- Added support for migrating KVM incremental snapshot chains with their checkpoint files
- Implemented single-threaded execution per zone for KVM incremental snapshot migrations to maintain chain integrity
- Added new command classes and wrapper for handling snapshot migration between secondary storages
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| StorageManagerImpl.java | Added new configuration key for agent migration timeout |
| QemuImg.java | Enhanced convert method to support backing file specification during conversion |
| LibvirtStorageAdaptor.java | Updated convert call to include new backing file parameter |
| LibvirtMigrateSnapshotsBetweenSecondaryStoragesCommandWrapper.java | New handler for executing snapshot migration commands on KVM agents |
| SnapshotObject.java | Added methods to retrieve parent and child snapshot chains |
| SnapshotDataFactoryImpl.java | Sets KVM incremental snapshot flag based on checkpoint path presence |
| StorageOrchestrator.java | Core migration orchestration logic for handling KVM incremental snapshots |
| DataMigrationUtility.java | Updated to identify and build KVM incremental snapshot chains for migration |
| StorageManager.java | Defined new configuration key for migration timeout |
| SnapshotInfo.java | Added interface methods for retrieving snapshot chain relationships |
| MigrateSnapshotsBetweenSecondaryStoragesCommand.java | New command class for snapshot migration requests |
| MigrateBetweenSecondaryStoragesCommandAnswer.java | New answer class for migration command responses |
Comments suppressed due to low confidence (1)
plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java:1
- [nitpick] Extra whitespace before 'new QemuImageOptions' parameter. Should have consistent single-space separation between parameters.
// Licensed to the Apache Software Foundation (ASF) under one
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ns/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
Outdated
Show resolved
Hide resolved
...hestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15849 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-14880) |
...hestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java
Show resolved
Hide resolved
...isor/kvm/resource/wrapper/LibvirtMigrateSnapshotsBetweenSecondaryStoragesCommandWrapper.java
Show resolved
Hide resolved
|
[SF] Trillian test result (tid-14882)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@hsato03 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16432 |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@hsato03 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16929 |
|
@hsato03 , Do you want thios in 23 or an earlier release? (seems like 22.1 would make sense to me) |
@DaanHoogland I agree. Since it is a bug fix, I think it could be included in 4.22.1. I will rebase and change the target branch. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
7d71730 to
cb075ec
Compare
|
@blueorangutan package |
|
@hsato03 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. |
Description
ACS allows data to be migrated from one secondary storage to another; however, this process disregards incremental volume snapshots created using the KVM hypervisor.
Since then, the migration process has been extended to also allow the migration of these resources.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
migrateResourceToAnotherSecondaryStoragemigrateSecondaryStorageDatamigrateSecondaryStorageDataHow did you try to break this feature and the system with this change?