-
Notifications
You must be signed in to change notification settings - Fork 1.2k
XCP-NG / XenServer live migration of unattached volumes #6833
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: main
Are you sure you want to change the base?
Conversation
Live migrate unattached volumes without going through secondary storage. Co-authored-by: Arthur Halet <[email protected]>
Codecov Report
@@ Coverage Diff @@
## 4.18 #6833 +/- ##
============================================
- Coverage 10.81% 10.80% -0.02%
- Complexity 7083 7084 +1
============================================
Files 2485 2487 +2
Lines 245346 245475 +129
Branches 38313 38325 +12
============================================
- Hits 26525 26513 -12
- Misses 215556 215699 +143
+ Partials 3265 3263 -2
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
SonarCloud Quality Gate failed. |
|
||
package com.cloud.agent.api; | ||
|
||
public class CleanForMigrationStorageCommandAnswer extends Answer { |
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.
public class CleanForMigrationStorageCommandAnswer extends Answer { | |
public class CleanForMigrationStorageAnswer extends Answer { |
@dpassante would you see an opportunity to add a marvin/integration test? |
@DaanHoogland a 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: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4499 |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4505 |
@blueorangutan test centos7 xenserver74 |
@DaanHoogland unsupported parameters provided. Supported mgmt server os are: |
@blueorangutan test centos7 xenserver-74 |
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + xenserver-74) has been kicked to run smoke tests |
@DaanHoogland We can try but we would need a lead on how to do it. Do you have an example of integration testing on something similar? |
@dpassante a Jenkins job has been kicked to build packages. It will be bundled with @DaanHoogland We can try but we would need a lead on how to do it. Do you have an example of integration testing on something similar? SystemVM template(s). I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4508 |
any examples can be found in |
@blueorangutan test |
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-5177)
|
Trillian test result (tid-5175)
|
package build and smoke tests overlapped. retrying |
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + xenserver-74) has been kicked to run smoke tests |
Trillian test result (tid-5180)
|
@dpassante can you look at the failed test?
|
@DaanHoogland I could be wrong but I don't feel like the |
You are right, I thought this one was failing twce, but I was not looking ..., just to make sure |
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + xenserver-74) has been kicked to run smoke tests |
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.
Apart from the leftover comment, LGTM
|
||
MigrateWithStorageReceiveCommand receiveCmd = new MigrateWithStorageReceiveCommand(to, volumeToStorageUuid); | ||
MigrateWithStorageReceiveAnswer receiveAnswer = (MigrateWithStorageReceiveAnswer)agentMgr.send(destHost.getId(), receiveCmd); | ||
// s_logger.error("Migration with storage of vm " + vm + " to host " + destHost + " failed."); |
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.
// s_logger.error("Migration with storage of vm " + vm + " to host " + destHost + " failed."); |
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
@dpassante , this could still go into 4.18.1 . Do you want to? cc @weizhouapache |
@blueorangutan package |
@rohityadavcloud a [SF] 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]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6708 |
@blueorangutan test rocky8 xenserver-74 |
@DaanHoogland a [SF] Trillian-Jenkins test job (rocky8 mgmt + xenserver-74) has been kicked to run smoke tests |
[SF] Trillian Build Failed (tid-7354) |
[SF] Trillian Build Failed (tid-7362) |
|
||
return new CleanForMigrationStorageCommandAnswer(command); | ||
} | ||
} |
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.
@dpassante , the lint check fails because of this; no eol before eof
@@ -0,0 +1,295 @@ | |||
#!/usr/bin/env python | |||
|
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.
license missing
[SF] Trillian Build Failed (tid-7364) |
@dpassante can you please address the outstanding comments and build failures? |
@dpassante are you still interested in this for 4.19? I'll move it to unplanned otherwise. |
@dpassante could you please address the outstanding comments and build failures? |
As this hasn't been touched on by the author since October 2022, I'll be moving the milestone to unplanned. |
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Live migrate unattached volumes without going through secondary storage.
Description
This PR includes:
When attaching a volume to a virtual machine belonging to a remote storage pool or when moving volumes from one storage pool to another, the VDI is first copied to the secondary storage and then from secondary storage to the destination storage pool, which can be very long when migrating large volumes.
With this PR, volumes can be live migrated (StorageXenMotion) by attaching them to a temporary transport VM.
A small transport vm (without OS) is created and the volume is attached to it. Thus, the volume can be moved by live migrating the transport vm to the destination cluster.
A new global setting
xen.live.migrate.unattached.volumes
has been added to indicate whether to activate the plugin or not.The module itself can be used standalone as below:
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
The feature has been running for several months on Cloudstack 4.13.1/4.16.1 + XenServer 7.1 in production.
The module, which relied on the xenserver-transfer-vm package which was removed from xcp 8.2.1, has just been rewritten to work on xcp/xenserver 8.2.1. It was manually tested on Cloudstack 4.16.1 / xcp-ng 8.2.1.
I currently don't have an environment available to test with the main branch.
cc @ArthurHlt