bugfix(controller): configure MTU (#3114)#3118
Conversation
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
|
@bgm-malbeclabs please ensure that the MTU on CYOA and/or DIA interfaces are defaulting to 1500 bytes unless specified. |
It defaults to 1500: |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9d5f43a to
f4dc154
Compare
f4dc154 to
2be1ebc
Compare
Summary of Changes
MTU 2048 was hardcoded but now for WAN / DZX interfaces it's 2048 and for CYOA/DIA it's set to 1500.
Closes #3114
Testing Verification