Skip to content

Infer single conversion storage pool for VMware import#13235

Open
andrijapanicsb wants to merge 1 commit into
apache:mainfrom
andrijapanicsb:vddk-auto-select-single-pool
Open

Infer single conversion storage pool for VMware import#13235
andrijapanicsb wants to merge 1 commit into
apache:mainfrom
andrijapanicsb:vddk-auto-select-single-pool

Conversation

@andrijapanicsb
Copy link
Copy Markdown
Contributor

Description

This improves the VMware import workflow when forceconverttopool=true and the caller does not provide convertinstancepoolid.

Previously, the API always failed in that case, even when the destination environment had exactly one suitable primary storage pool. With this change, CloudStack infers that single suitable pool and proceeds. If no suitable pool exists, or if multiple suitable pools exist, the API still fails with a clear message so the caller can provide convertinstancepoolid explicitly.

No API parameters are added or removed.

API behavior

When forceconverttopool=true:

  • If convertinstancepoolid is supplied, the selected pool is used and validated as before.
  • If convertinstancepoolid is omitted and exactly one suitable KVM primary storage pool exists for the destination cluster or zone, that pool is used automatically.
  • If no suitable pool exists, the request fails with a clear error.
  • If multiple suitable pools exist, the request fails and asks the caller to provide convertinstancepoolid.

UI behavior

  • Direct conversion opens the primary storage selection path.
  • If the returned storage-pool list contains exactly one pool, the UI selects it automatically.
  • If multiple pools are available, the operator still chooses the intended pool.

Testing

  • mvn -pl server -am -Dtest=UnmanagedVMsManagerImplTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false test

@andrijapanicsb andrijapanicsb requested review from harikrishna-patnala and nvazquez and removed request for nvazquez May 25, 2026 18:33
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 82.14286% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.10%. Comparing base (a0aafe2) to head (28a993f).

Files with missing lines Patch % Lines
.../apache/cloudstack/vm/UnmanagedVMsManagerImpl.java 82.14% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13235      +/-   ##
============================================
- Coverage     18.10%   18.10%   -0.01%     
- Complexity    16746    16751       +5     
============================================
  Files          6037     6037              
  Lines        542933   542974      +41     
  Branches      66487    66493       +6     
============================================
+ Hits          98283    98290       +7     
- Misses       433602   433641      +39     
+ Partials      11048    11043       -5     
Flag Coverage Δ
uitests 3.51% <ø> (-0.01%) ⬇️
unittests 19.26% <82.14%> (+<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.

@andrijapanicsb
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

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