CKS: Use Zone MTUs when network is created at the time of CKS cluster creation#12228
CKS: Use Zone MTUs when network is created at the time of CKS cluster creation#12228DaanHoogland merged 1 commit into4.20from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12228 +/- ##
=========================================
Coverage 16.21% 16.21%
- Complexity 13353 13354 +1
=========================================
Files 5657 5657
Lines 498647 498654 +7
Branches 60533 60533
=========================================
+ Hits 80863 80869 +6
+ Misses 408771 408766 -5
- Partials 9013 9019 +6
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 package |
|
@Pearl1594 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 15979 |
Damans227
left a comment
There was a problem hiding this comment.
I tested it manually and posted my findings. LGTM.
|
@Pearl1594 is this ready (everybody but you seems to think so ;) |
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where Kubernetes cluster default networks don't respect zone-level MTU restrictions. When a CKS cluster is created without specifying a network, an isolated network is automatically created. Previously, this network would always use the default 1500 MTU regardless of zone-level MTU settings. Now, the network creation respects the zone's configured MTU values.
Changes:
- Added a new overload of
createGuestNetworkmethod that accepts zone MTU values as a parameter - Updated Kubernetes cluster network creation to retrieve and pass zone MTU values when automatically creating networks
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| api/src/main/java/com/cloud/network/NetworkService.java | Added new method signature to the NetworkService interface that accepts MTU values for VR interfaces |
| server/src/main/java/com/cloud/network/NetworkServiceImpl.java | Implemented the new method overload that delegates to the network manager with MTU parameters |
| plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java | Updated network creation logic to retrieve zone-level MTU values and pass them when creating the network |
| server/src/test/java/com/cloud/vpc/MockNetworkManagerImpl.java | Added mock implementation of the new interface method for test purposes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| CallContext networkContext = CallContext.register(CallContext.current(), ApiCommandResourceType.Network); | ||
| try { | ||
| Long zoneId = zone.getId(); |
There was a problem hiding this comment.
The variable 'zoneId' is only assigned values of primitive type and is never 'null', but it is declared with the boxed type 'Long'.
| Long zoneId = zone.getId(); | |
| long zoneId = zone.getId(); |




Description
This PR fixes: #12205
When a cluster is created without specifying a network, then an isolated network is created automatically with the default MTU. However, if there is an MTU set at zone level, then it would be ideal to use that instead.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?