Uh oh!
There was an error while loading. Please reload this page.
server: fix clone network offerings with detail internetProtocol=IPv4 - #13615
Conversation
weizhouapache
commented
Jul 14, 2026
@blueorangutan package |
blueorangutan
commented
Jul 14, 2026
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
There was a problem hiding this comment.
Pull request overview
This PR fixes cloning of network offerings when the source offering contains details like internetProtocol=IPv4, which previously could trigger a ClassCastException in NetworkOfferingBaseCmd.getDetails() due to an unexpected details-map structure during clone.
Changes:
- Stop injecting source offering details into the API
detailsparameter structure during clone; instead, carry them via a dedicated internalsourceDetailsMap. - Update
NetworkOfferingBaseCmd.getDetails()to fall back tosourceDetailsMapwhen no APIdetailswere provided. - Exclude
internetProtocol,domainid, andzoneidfrom the cloned details map (these are handled via dedicated command fields / parameters).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java | Adjusts clone parameter population to avoid mis-shaping details and filters out special-case detail keys. |
| api/src/main/java/org/apache/cloudstack/api/command/admin/network/NetworkOfferingBaseCmd.java | Adds an internal fallback details map and changes getDetails() to return it when API details are absent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #13615 +/- ##
=========================================
Coverage 19.64% 19.64% Complexity 19793 19793 =========================================
Files 6368 6368 Lines 575100 575102 +2 Branches 70370 70371 +1 =========================================
+ Hits 113002 113006 +4
Misses 449815 449815 + Partials 12283 12281 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
weizhouapache
commented
Jul 14, 2026
@blueorangutan package |
blueorangutan
commented
Jul 14, 2026
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
| public Map<String, String> getDetails() { | ||
| if (details == null || details.isEmpty()) { | ||
| return null; | ||
| return sourceDetailsMap; | ||
| } |
blueorangutan
commented
Jul 14, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18569 |
blueorangutan
commented
Jul 14, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18571 |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
dbdf6a8 to
297185eCompare| public Map<String, String> getDetails() { | ||
| if (details == null || details.isEmpty()) { | ||
| return null; | ||
| return sourceDetailsMap; | ||
| } |
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM
Tested manually
Able to clone the network offering and vpc offerings
weizhouapache
commented
Jul 15, 2026
@blueorangutan package |
blueorangutan
commented
Jul 15, 2026
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 15, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18580 |
weizhouapache
commented
Jul 15, 2026
@blueorangutan test |
blueorangutan
commented
Jul 15, 2026
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
blueorangutan
commented
Jul 16, 2026
[SF] Trillian test result (tid-16572)
|
winterhazel
commented
Jul 20, 2026
Merging based on manual testing by @kiranchavala and approvals |
Description
This PR fixes#13610
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?