Skip to content

Conversation

winterhazel
Copy link
Member

Description

The secondary storage selectors allow operators to specify, for instance, that templates should go to secondary storage A and snapshots to secondary storage B. When registering a template, it will be downloaded only to secondary storage A.

During the startup of the SSVM's service, the MS executes a template synchronization process to verify what templates are in which secondary storage in order to download them to secondary storages in which they do not exist. However, this process does not consider the secondary storage selectors. Hence, templates will be downloaded to secondary storage B.

This PR makes the MS consider the secondary storage selectors during the template synchronization process.

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

How Has This Been Tested?

  1. I created a secondary storage selector directing templates to secondary storage A, and another directing snapshots to secondary storage B.

  2. I registered two new templates. Both were downloaded only to secondary storage A.

  3. I restarted the SSVM's service. I validated that the MS did not begin downloading the two templates to secondary storage B.

  4. I took some volume snapshots. I validated that they went to secondary storage B.

  5. I removed the selector that was directing templates to secondary storage A, and restarted the SSVM's service. I validated that they were downloaded to secondary storage B.

@winterhazel
Copy link
Member Author

@blueorangutan package

Copy link

codecov bot commented Jun 4, 2025

Codecov Report

❌ Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.15%. Comparing base (823080c) to head (3fc1356).
⚠️ Report is 163 commits behind head on 4.20.

Files with missing lines Patch % Lines
.../cloudstack/storage/image/TemplateServiceImpl.java 90.90% 1 Missing and 1 partial ⚠️
.../com/cloud/template/HypervisorTemplateAdapter.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #10956   +/-   ##
=========================================
  Coverage     16.14%   16.15%           
- Complexity    13253    13259    +6     
=========================================
  Files          5656     5656           
  Lines        497893   497906   +13     
  Branches      60374    60376    +2     
=========================================
+ Hits          80405    80419   +14     
+ Misses       408529   408523    -6     
- Partials       8959     8964    +5     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.00% <90.32%> (+<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.

@sureshanaparti sureshanaparti added this to the 4.20.2 milestone Jun 5, 2025
@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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 ✖️ debian ✔️ suse15. SL-JID 13610

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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 ✔️ debian ✔️ suse15. SL-JID 13666

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
all_test_vpc_vpn Skipped --- test_vpc_vpn.py
all_test_webhook_delivery Skipped --- test_webhook_delivery.py
all_test_webhook_lifecycle Skipped --- test_webhook_lifecycle.py
all_test_host_maintenance Skipped --- test_host_maintenance.py
all_test_hostha_kvm Skipped --- test_hostha_kvm.py

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache 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 14955

@weizhouapache weizhouapache modified the milestones: 4.20.2, 4.20.3 Sep 12, 2025
@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

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.

5 participants