You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "Pearl1594 (via GitHub)" <gi...@apache.org> on 2025/12/10 14:43:01 UTC
[PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Pearl1594 opened a new pull request, #12228:
URL: https://github.com/apache/cloudstack/pull/12228
### 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.
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [X] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#discussion_r2731236953
##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java:
##########
@@ -973,9 +973,12 @@ private Network getKubernetesClusterNetworkIfMissing(final String clusterName, f
CallContext networkContext = CallContext.register(CallContext.current(), ApiCommandResourceType.Network);
try {
+ Long zoneId = zone.getId();
Review Comment:
The variable 'zoneId' is only assigned values of primitive type and is never 'null', but it is declared with the boxed type 'Long'.
```suggestion
long zoneId = zone.getId();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#issuecomment-3804233130
@Pearl1594 is this ready (everybody but you seems to think so ;)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#issuecomment-3637972402
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15979
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#discussion_r2607245801
##########
server/src/main/java/com/cloud/network/NetworkServiceImpl.java:
##########
@@ -1869,6 +1869,18 @@ public Network createGuestNetwork(long networkOfferingId, String name, String di
null, null, null, null, null, null, null, null, null, null);
}
+ @Override
+ @DB
+ @ActionEvent(eventType = EventTypes.EVENT_NETWORK_CREATE, eventDescription = "creating network")
+ public Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
+ PhysicalNetwork physicalNetwork, long zoneId, ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs) throws
+ InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException {
+ return _networkMgr.createGuestNetwork(networkOfferingId, name, displayText,
Review Comment:
I did consider that, but found value in creating a method that takes MTU as a parameter - which "probably" could be reused in future at other places, and it's simpler as it hides a lot of the low level parameters that NetworkManager::createGuestNetwork expects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#issuecomment-3637732141
## [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=12228) **Quality Gate failed**
Failed conditions
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=12228&metric=new_coverage&view=list) (required ≥ 40%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=12228)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#discussion_r2607204982
##########
server/src/main/java/com/cloud/network/NetworkServiceImpl.java:
##########
@@ -1869,6 +1869,18 @@ public Network createGuestNetwork(long networkOfferingId, String name, String di
null, null, null, null, null, null, null, null, null, null);
}
+ @Override
+ @DB
+ @ActionEvent(eventType = EventTypes.EVENT_NETWORK_CREATE, eventDescription = "creating network")
+ public Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
+ PhysicalNetwork physicalNetwork, long zoneId, ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs) throws
+ InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException {
+ return _networkMgr.createGuestNetwork(networkOfferingId, name, displayText,
Review Comment:
We can call this directly in KubernetesClusterManagerImpl?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#issuecomment-3637443732
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/12228?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 4.00%. Comparing base ([`4348386`](https://app.codecov.io/gh/apache/cloudstack/commit/43483869705c92c4f8cf7648fe16c8f6235a9308?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a3cba04`](https://app.codecov.io/gh/apache/cloudstack/commit/a3cba0475c2272914e6213da8ea20029ef5e1e72?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (4348386) and HEAD (a3cba04). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (4348386) | HEAD (a3cba04) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.20 #12228 +/- ##
=============================================
- Coverage 16.21% 4.00% -12.22%
=============================================
Files 5657 402 -5255
Lines 498647 32677 -465970
Branches 60533 5812 -54721
=============================================
- Hits 80863 1309 -79554
+ Misses 408771 31213 -377558
+ Partials 9013 155 -8858
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/12228/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/12228/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.00% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/12228/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/12228?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#issuecomment-3800785957
Created a PR test environment and tested against it. Set zone-level MTU to 1400 (`vr.public.interface.max.mtu` and `vr.private.interface.max.mtu`), then created a CKS cluster without specifying a network. The auto-created network correctly inherited the zone MTU settings (publicmtu=1400, privatemtu=1400) instead of the default 1500. LGTM
<img width="1609" height="1272" alt="image" src="https://github.com/user-attachments/assets/88bbac50-ce40-44a7-a25d-ccd5da05314d" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#issuecomment-3637536118
@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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CKS: Use Zone MTUs when network is created at the time of CKS cluster creation [cloudstack]
Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on PR #12228:
URL: https://github.com/apache/cloudstack/pull/12228#issuecomment-3637533146
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org