Skip to content

Fix findHostsForMigration never returning hosts from other clusters#13452

Open
winterhazel wants to merge 1 commit into
apache:4.20from
scclouds:fix-findhostsformigration-regression
Open

Fix findHostsForMigration never returning hosts from other clusters#13452
winterhazel wants to merge 1 commit into
apache:4.20from
scclouds:fix-findhostsformigration-regression

Conversation

@winterhazel

@winterhazel winterhazel commented Jun 18, 2026

Copy link
Copy Markdown
Member

Description

This PR fixes a regression introduced in #12014. Before 4.20.3, if the instance supported storage migration, the API would create a deployment plan passing the clusterId as null to also list compatible hosts from other clusters. In 4.20.3, a clusterId is always provided to the plan. Due to this, hosts from other clusters are never returned.

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested by opening the migration wizard for a running instance and validating that hosts from other clusters were returned as compatible.

@winterhazel

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@winterhazel winterhazel force-pushed the fix-findhostsformigration-regression branch from cffdf71 to f6c603b Compare June 18, 2026 20:28
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.75862% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.26%. Comparing base (4244c2c) to head (f6c603b).

Files with missing lines Patch % Lines
...in/java/com/cloud/server/ManagementServerImpl.java 82.75% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #13452   +/-   ##
=========================================
  Coverage     16.25%   16.26%           
- Complexity    13432    13439    +7     
=========================================
  Files          5667     5667           
  Lines        500670   500687   +17     
  Branches      60801    60803    +2     
=========================================
+ Hits          81397    81438   +41     
+ Misses       410165   410142   -23     
+ Partials       9108     9107    -1     
Flag Coverage Δ
uitests 4.14% <ø> (ø)
unittests 17.12% <82.75%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@winterhazel winterhazel marked this pull request as ready for review June 18, 2026 21:01
@blueorangutan

Copy link
Copy Markdown

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants