-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Migrate public templates that have URLs on data migration across secondary storages #10364
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
Conversation
@blueorangutan package |
@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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #10364 +/- ##
=========================================
Coverage 16.01% 16.02%
- Complexity 13115 13125 +10
=========================================
Files 5651 5651
Lines 495863 495898 +35
Branches 60049 60051 +2
=========================================
+ Hits 79405 79448 +43
+ Misses 407595 407586 -9
- Partials 8863 8864 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12402 |
...age/image/src/main/java/org/apache/cloudstack/storage/image/SecondaryStorageServiceImpl.java
Outdated
Show resolved
Hide resolved
dd9a443
to
55eaba0
Compare
@blueorangutan package |
@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. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12587 |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12597 |
…tes-on-data-migration
@blueorangutan package |
@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. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12885 |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12893 |
@winterhazel , it seems something in https://github.com/apache/cloudstack/pull/10364/files#diff-70d3c567cc7f97b4ac1a9e41f86723ba74291feacc95c0a2c0a6623458eaa92d causes timeouts .
|
Will take a look. |
Should be fixed now :) @blueorangutan package |
@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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12902 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-12834)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, manually checked it
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
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
In an environment with the following templates:
a
,b
,c
t
System VM Template (KVM)
,z
And two secondary storages:
nfs-1
: has all the templatesnfs-2
: hasb
,c
(all public templates excepta
)I did the following tests:
I restarted the SSVM. Then, I verified that it began to download templates
a
andSystem VM Template (KVM)
tonfs-2
While the templates were downloading, I called
migrateSecondaryStorageData
to migrate the data fromnfs-1
tonfs-2
After the migration ended, I verified that all templates in
nfs-1
were moved tonfs-2
. I also verified that there were no duplicate template entries, and that theinstall_path
of the new entries matched the template's path innfs-2