Skip to content

Conversation

@Damans227
Copy link
Contributor

Description

This PR fixes an issue where the SystemVM template is not automatically downloaded to S3 secondary storage when adding it to a CloudStack zone.

Root Cause:
S3 stores use REGION scope but DefaultEndPointSelector only returned LocalHostEndpoint for ZONE scope, so no endpoint was found to download the SystemVM template.

Fix:
Allow LocalHostEndpoint to handle SYSTEM template downloads for REGION-scoped stores, plus added null checks for S3 stores without URLs and enabled path-style access for S3-compatible storage.

Fixes: #9002

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):

Broken:

image

Fixed:

Screencast.from.2026-01-14.13-52-40.mp4

How Has This Been Tested?

Test Environment:

  • CloudStack 4.20.3.0
  • KVM hypervisor (Ubuntu 22.04)
  • MinIO S3-compatible storage

Test Steps:

  1. Started with a fresh CloudStack zone with no secondary storage configured
  2. Added NFS staging store (required for S3)
  3. Added S3 image store (MinIO) via UI
  4. Verified SystemVM template automatically downloaded to S3
  5. Verified SSVM booted successfully using the template from S3
  6. Verified Console Proxy VM also booted successfully

@nvazquez
Copy link
Contributor

@blueorangutan package

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

@blueorangutan
Copy link

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

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.23%. Comparing base (6a324da) to head (9a2ba84).
⚠️ Report is 2 commits behind head on 4.20.

Files with missing lines Patch % Lines
...tack/storage/endpoint/DefaultEndPointSelector.java 0.00% 3 Missing ⚠️
.../main/java/com/cloud/utils/storage/S3/S3Utils.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12426      +/-   ##
============================================
- Coverage     16.23%   16.23%   -0.01%     
- Complexity    13382    13385       +3     
============================================
  Files          5657     5657              
  Lines        498999   499001       +2     
  Branches      60566    60569       +3     
============================================
- Hits          81035    81033       -2     
- Misses       408928   408931       +3     
- Partials       9036     9037       +1     
Flag Coverage Δ
uitests 4.03% <ø> (ø)
unittests 17.09% <33.33%> (-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.

@nvazquez
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@apache apache deleted a comment from blueorangutan Jan 15, 2026
@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-15187)

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.

3 participants