Uh oh!
There was an error while loading. Please reload this page.
Prioritize copying templates from other secondary storages instead of downloading them - #10363
Conversation
winterhazel
commented
Feb 11, 2025
@blueorangutan package |
blueorangutan
commented
Feb 11, 2025
@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 Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@## 4.20 #10363 +/- ##
============================================
+ Coverage 16.22% 16.23% +0.01% - Complexity 13358 13371 +13
============================================
Files 5657 5657 Lines 498686 498854 +168 Branches 60526 60539 +13 ============================================
+ Hits 80918 81003 +85 - Misses 408744 408820 +76 - Partials 9024 9031 +7
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:
|
blueorangutan
commented
Feb 11, 2025
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12401 |
DaanHoogland
left a comment
There was a problem hiding this comment.
makes functional sense, but needs testing
winterhazel
commented
Feb 24, 2025
@blueorangutan package |
blueorangutan
commented
Feb 24, 2025
@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. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
blueorangutan
commented
Feb 24, 2025
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12548 |
winterhazel
commented
Feb 25, 2025
@blueorangutan package |
blueorangutan
commented
Feb 25, 2025
@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. |
blueorangutan
commented
Feb 25, 2025
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12562 |
DaanHoogland
commented
Feb 26, 2025
@winterhazel I marked this for 4.21 as it is based off main, but would this be a good improvement for 4.20.1 as well? |
JoaoJandre
commented
Feb 26, 2025
@winterhazel could you fix the compilation errors? |
blueorangutan
commented
Feb 26, 2025
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12575 |
winterhazel
commented
Feb 26, 2025
Yeah, it would be great to have it in 4.20.1. I'll rebase. |
9501c57 to
246c850Comparewinterhazel
commented
Feb 26, 2025
@blueorangutan package |
blueorangutan
commented
Feb 26, 2025
@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. |
blueorangutan
commented
Feb 26, 2025
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12585 |
blueorangutan
commented
Sep 11, 2025
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 14954 |
DaanHoogland
commented
Sep 15, 2025
@weizhouapache , this seems a non-functional change and an improvement. Can we mark it for a future 4.20 update if it doesn’t make 4.20.2? |
weizhouapache
commented
Sep 15, 2025
@DaanHoogland |
blueorangutan
commented
Dec 9, 2025
[SF] Trillian Build Failed (tid-14934) |
winterhazel
commented
Dec 14, 2025
@blueorangutan package |
blueorangutan
commented
Dec 14, 2025
@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. |
blueorangutan
commented
Dec 14, 2025
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16039 |
harikrishna-patnala
commented
Dec 15, 2025
@blueorangutan test |
blueorangutan
commented
Dec 15, 2025
@harikrishna-patnala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
blueorangutan
commented
Dec 15, 2025
[SF] Trillian Build Failed (tid-14987) |
blueorangutan
commented
Dec 16, 2025
[SF] Trillian test result (tid-14984)
|
harikrishna-patnala
commented
Dec 16, 2025
@winterhazel can you please check if this failure is related to this PR change ? |
winterhazel
commented
Dec 16, 2025
@harikrishna-patnala it is unrelated. Also failing on other PRs: #12198 (comment) |
harikrishna-patnala
commented
Dec 18, 2025
I've tested few cases of adding a new secondary storage with few available and unavailable templates on the server. Upon adding the new storage, all the templates came to downloaded and ready state. @winterhazel for your information, I'm also working on another similar change where in the templates to be copied from a secondary storage of another zone if it is available and accessible. This case can happen when a new zone is added and a new secondary storage is added into it. Thank you. |
Uh oh!
There was an error while loading. Please reload this page.
* 4.22: Update templateConfig.sh to not break with directorys with space on t… (#10898) Fix VM and volume metrics listing regressions (#12284) packaging: use latest cmk release link directly (#11429) api:rename RegisterCmd.java => RegisterUserKeyCmd.java (#12259) Prioritize copying templates from other secondary storages instead of downloading them (#10363) Show time correctly in the backup schedule UI (#12012) kvm: use preallocation option for fat disk resize (#11986) Python exception processing static routes fixed (#11967) KVM memballooning requires free page reporting and autodeflate (#11932) api: create/register/upload template with empty template tag (#12234)
… downloading them (apache#10363) * Prioritize copying templates from other secondary storages instead of downloading them * Treat some corner cases
… downloading them (apache#10363) * Prioritize copying templates from other secondary storages instead of downloading them * Treat some corner cases
Description
After adding a new secondary storage, CloudStack will always try to download public templates/ISOs that have URLs from the source to the new secondary storage, even if it already exists on another one. Due to this behavior, if the URL does not exist anymore, the template will not become available at the new storage; and if the template has been updated at the source, it will not be installed because of checksum mismatch. This forces operators to manually copy/move templates to the new secondary storage.
To solve this issue, this PR creates the zone-scoped setting
copy.public.templates.from.other.storages. When enabled, CloudStack will try to copy templates/ISOs from other secondary storages in the same zone before attempting to downloading them from the source. It is enabled by default.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
With the setting enabled
I deleted all existing secondary storages, and registered an empty one (SS 1). I verified that the SSVM started to download the templates that were registered.
I registered another template, and immediately also registered secondary storage 2. I verified that the templates available in SS 1 were copied to SS 2, and that the last registered template was being downloaded to both secondary storages.
Inside SS 1, I deleted the first half of templates; inside SS 2, I deleted the other half of templates. Then, I added SS 3. I verified that all the templates were copied to SS 3. SS 1 and SS 2 were not synchronized yet, so they still had only half of the templates each.
I restarted the SSVM's service. I verified that the first half of templates was copied from SS 1 to SS 2, and that the other half was copied from SS 2 to SS 1.
I deleted SS 1 and SS 2. Then, I deployed a VM using each one of the templates, and verified that they were deployed successfully.
With the setting disabled
I disabled the setting and added SS 4. I verified that the SSVM started to download the templates to SS 4 from the source instead of copying them.
Migration: I marked all templates as private so that they are not downloaded to new secondary storages. Then, I added SS 5 and called
migrateSecondaryStorageDatato migrate data from SS 4 to SS 5. I verified that the templates were migrated successfully.