bugfix(controller): configure MTU (#3114)#3118
Open
bgm-malbeclabs wants to merge 2 commits intomainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the controller-rendered interface MTU configurable by sourcing MTU from the interface model rather than hardcoding 2048, and updates related fixtures/tests accordingly.
Changes:
- Render per-interface MTU in the device config template (instead of hardcoded
2048). - Extend the controller
Interfacemodel to carry MTU from on-chain/serviceability data (and propagate it to generated parent interfaces). - Update unit test inputs and expected fixture outputs to use a non-default MTU (e.g.,
9100), plus a changelog entry.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| controlplane/controller/internal/controller/templates/tunnel.tmpl | Switches interface MTU rendering from hardcoded value to model-driven MTU. |
| controlplane/controller/internal/controller/server_test.go | Updates test interface objects to include MTU. |
| controlplane/controller/internal/controller/render_test.go | Updates render tests to include MTU on interfaces. |
| controlplane/controller/internal/controller/models.go | Adds Mtu to controller Interface and maps it from serviceability interfaces / into parent derivation. |
| controlplane/controller/internal/controller/fixtures/interfaces.txt | Updates expected rendered interface MTU values. |
| controlplane/controller/internal/controller/fixtures/e2e.tmpl | Updates expected rendered interface MTU values in e2e fixture template. |
| controlplane/controller/internal/controller/fixtures/base.config.txt | Updates expected base config MTU values. |
| controlplane/controller/internal/controller/fixtures/base.config.drained.txt | Updates expected drained base config MTU values. |
| CHANGELOG.md | Notes that MTU is now configurable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
controlplane/controller/internal/controller/templates/tunnel.tmpl
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
MTU 2048 was hardcoded and now it's configurable
Testing Verification