Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: Condition for aborting migration, resume paused VMs on destination #12331

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

Open
nvazquez wants to merge 1 commit into apache:4.20
base: 4.20
Choose a base branch
Loading
from shapeblue:420-fix-libvirtmigratewrapper

Conversation

@nvazquez
Copy link
Contributor

@nvazquez nvazquez commented Dec 24, 2025

Description

This PR addresses the following:

  • Change the logic for checking if the sleepTime is absolutely equal to 1s to greater than or equal to 1s in case of thread’s duration skips to make it more robust
  • In the Abort Migration logic, it only checks for VMs in Running state. This doesn’t allow migration to be aborted if the VM has already been paused by the ‘Pause VM’ logic below it and migration still hasn’t completed by the timeout for aborting migration has been reached.
  • Resuming the VM on the destination host on migration successfully completing if it is in the Paused state -- avoiding manual restart of the VM upon successful migration.

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)
  • 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?

How did you try to break this feature and the system with this change?

Copy link
Contributor Author

@blueorangutan package

Copy link

@nvazquez 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.

Copy link

codecov bot commented Dec 24, 2025
edited
Loading

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.23%. Comparing base (b394b5b) to head (0960b4c).

Files with missing lines Patch % Lines
...resource/wrapper/LibvirtMigrateCommandWrapper.java 0.00% 14 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## 4.20 #12331 +/- ##
=========================================
 Coverage 16.23% 16.23% 
- Complexity 13377 13378 +1 
=========================================
 Files 5657 5657 
 Lines 498865 498878 +13 
 Branches 60545 60546 +1 
=========================================
+ Hits 80991 81011 +20 
+ Misses 408843 408834 -9 
- Partials 9031 9033 +2 
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.09% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16145

Comment on lines +317 to +331
DomainState dmState = null;
try {
dmState = destDomain.getInfo().state;
} catch (final LibvirtException e) {
logger.info("Failed to get domain state for VM: " + vmName + " due to: " + e.getMessage());
}

if (dmState == DomainState.VIR_DOMAIN_PAUSED) {
logger.info("Resuming VM " + vmName + " on destination after migration");
try {
destDomain.resume();
} catch (final Exception e) {
logger.error("Failed to resume vm " + vmName + " on destination after migration due to : " + e.getMessage());
}
}
Copy link
Contributor

@DaanHoogland DaanHoogland Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new method..?

final int migrateDowntime = libvirtComputingResource.getMigrateDowntime();
if (migrateDowntime > 0 ) {
try {
final int setDowntime = dm.migrateSetMaxDowntime(migrateDowntime);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to call this every 100ms. We can use a variable to check and call this block only once.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nvazquez would you consider making this change?

Copy link
Contributor Author

nvazquez commented Jan 8, 2026

Copy link

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

Copy link

[SF] Trillian test result (tid-15139)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 52255 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12331-t15139-kvm-ol8.zip
Smoke tests completed. 139 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestClusterDRS>:setup Error 0.00 test_cluster_drs.py
test_list_system_vms_metrics_history Failure 0.18 test_metrics_api.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@DaanHoogland DaanHoogland DaanHoogland left review comments

@kiranchavala kiranchavala Awaiting requested review from kiranchavala

@Pearl1594 Pearl1594 Awaiting requested review from Pearl1594

+1 more reviewer

@abh1sar abh1sar abh1sar approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.20.3

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /