Skip to content
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

Migrate public templates that have URLs on data migration across secondary storages #10364

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

winterhazel
Copy link
Member

Description

Currently, data migration across secondary storages does not migrate public templates that have URLs (only private templates and public templates that do not have URLs are migrated) because, when this feature was implemented, it was assumed that these templates would automatically be downloaded when to newly added secondary storages. However, that's not always the case, as URLs can become inaccessible (unable to download the template), and their templates can be updated (unable to install due to checksum mismatch). This forces operators to manually move the templates inside the storage.

This PR solves this issue by allowing the migration of public templates that have URLs.

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?

In an environment with the following templates:

  • Public with URL: a, b, c
  • Public without URL: t
  • Private with URL: System VM Template (KVM), z

And two secondary storages:

  • nfs-1: has all the templates
  • nfs-2: has b, c (all public templates except a)

I did the following tests:

  1. I restarted the SSVM. Then, I verified that it began to download templates a and System VM Template (KVM) to nfs-2

  2. While the templates were downloading, I called migrateSecondaryStorageData to migrate the data from nfs-1 to nfs-2

  3. After the migration ended, I verified that all templates in nfs-1 were moved to nfs-2. I also verified that there were no duplicate template entries, and that the install_path of the new entries matched the template's path in nfs-2

@winterhazel
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.01%. Comparing base (2654890) to head (dd9a443).
Report is 6 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (2654890) and HEAD (dd9a443). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (2654890) HEAD (dd9a443)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #10364       +/-   ##
=============================================
- Coverage     16.02%    4.01%   -12.02%     
=============================================
  Files          5658      395     -5263     
  Lines        496312    32452   -463860     
  Branches      60109     5743    -54366     
=============================================
- Hits          79536     1302    -78234     
+ Misses       407927    31001   -376926     
+ Partials       8849      149     -8700     
Flag Coverage Δ
uitests 4.01% <ø> (-0.01%) ⬇️
unittests ?

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.

@blueorangutan
Copy link

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

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