Fix Cross zone templates registration for Edge Zones#12874
Fix Cross zone templates registration for Edge Zones#12874vishesh92 wants to merge 4 commits intoapache:4.22from
Conversation
|
@blueorangutan package |
|
@vishesh92 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 17221 |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12874 +/- ##
=============================================
- Coverage 17.61% 3.70% -13.91%
=============================================
Files 5917 448 -5469
Lines 531430 38042 -493388
Branches 64973 7038 -57935
=============================================
- Hits 93586 1409 -92177
+ Misses 427288 36446 -390842
+ Partials 10556 187 -10369
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:
|
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@vishesh92 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17222 |
|
@blueorangutan test keepEnv |
|
@vishesh92 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15725) |
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
Show resolved
Hide resolved
|
[SF] Trillian test result (tid-15728)
|
|
@blueorangutan package |
|
@vishesh92 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17281 |
Description
This PR fixes the registration of existing Cross Zone templates for Edge Zone.
This PR also offloads the filtering of cross zones to the database.
Details
This pull request refactors how cross-zone VM templates are handled and associated with zones. The main improvement is the introduction of a new DAO method,
listAllCrossZoneTemplates(), which streamlines and centralizes the retrieval of cross-zone templates. This change eliminates repeated filtering logic across the codebase and makes the association process more efficient and maintainable. Additionally, the pull request updates the logic for associating these templates with zones, particularly in scenarios involving Edge Zones.DAO and Data Access Improvements:
listAllCrossZoneTemplates()method to theVMTemplateDaointerface and its implementation, allowing efficient retrieval of only cross-zone templates without manual filtering. [1] [2] [3]crossZoneproperty for filtering templates.Refactoring Template Association Logic:
TemplateServiceImpl,SimulatorDiscoverer,SecondaryStorageDiscoverer, andStorageManagerImpl) with calls to the newlistAllCrossZoneTemplates()method, simplifying and unifying the logic. [1] [2] [3] [4] [5]Edge Zone Handling:
ConfigurationManagerImplto associate cross-zone templates with Edge Zones immediately upon creation, since Edge Zones do not have SSVMs to trigger this association later.Dependency Injection and Imports:
TemplateServiceintoConfigurationManagerImplto support the new association logic and added the necessary import. [1] [2]Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?