Why
Doc work-plan item 2.a (see Notion design). The constant in controlplane/controller/config/constants.go:8 currently sizes per-device tunnel slices (models.go:213, models.go:225). The stress controller needs to run with the EOS hard cap of 1024 without touching production code paths.
Scope
- Replace the
MaxUserTunnelSlots constant with a field on the controller's runtime Config.
- Add a flag (
--max-user-tunnel-slots) and an equivalent config-file key, default 128. Validate 1 ≤ value ≤ 1024.
- Thread the value through all current uses (search
MaxUserTunnelSlots — primary call sites in controlplane/controller/internal/controller/models.go:213 and :225).
- Update
controlplane/controller/internal/controller/server_test.go and controlplane/controller/internal/controller/render_test.go to inject the value through the controller fixture rather than reading the constant; cross-check e2e/ibrl_with_allocated_ip_test.go.
- Keep
StartUserTunnelNum = 500 unchanged.
Acceptance
- Default behavior unchanged when flag/config-key is unset (still 128).
- Stress controller can be started with
--max-user-tunnel-slots=1024 and renders 1024 slots end-to-end.
- All existing tests pass; tests that hard-coded the constant now read it from a fixture.
Notes
Onchain serviceability program is not changed by this issue (doc explicitly excludes that). The cap is enforced controller-side only.
Tracker: #3744.
Why
Doc work-plan item 2.a (see Notion design). The constant in
controlplane/controller/config/constants.go:8currently sizes per-device tunnel slices (models.go:213,models.go:225). The stress controller needs to run with the EOS hard cap of 1024 without touching production code paths.Scope
MaxUserTunnelSlotsconstant with a field on the controller's runtimeConfig.--max-user-tunnel-slots) and an equivalent config-file key, default128. Validate1 ≤ value ≤ 1024.MaxUserTunnelSlots— primary call sites incontrolplane/controller/internal/controller/models.go:213and:225).controlplane/controller/internal/controller/server_test.goandcontrolplane/controller/internal/controller/render_test.goto inject the value through the controller fixture rather than reading the constant; cross-checke2e/ibrl_with_allocated_ip_test.go.StartUserTunnelNum = 500unchanged.Acceptance
--max-user-tunnel-slots=1024and renders 1024 slots end-to-end.Notes
Onchain serviceability program is not changed by this issue (doc explicitly excludes that). The cap is enforced controller-side only.
Tracker: #3744.