[PR #6913] [management] expose disableLegacyPort in YAML config #30018

Open
opened 2026-08-05 08:09:42 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6913
Author: @josipstojanovic-boop
Created: 7/27/2026
Status: 🔄 Open

Base: mainHead: combined-disable-legacy-port


📝 Commits (3)

  • e9baf6e [combined] expose disableLegacyPort in YAML config
  • 393a877 Merge branch 'main' into combined-disable-legacy-port
  • 9b5ec76 Merge branch 'main' into combined-disable-legacy-port

📊 Changes

3 files changed (+17 additions, -8 deletions)

View changed files

📝 combined/cmd/config.go (+3 -0)
📝 combined/cmd/root.go (+9 -8)
📝 combined/config.yaml.example (+5 -0)

📄 Description

Describe your changes

Follow-up to #5372, which added --disable-legacy-port to the standalone management binary and DisableLegacyManagementPort to server.Config, but did not expose it in the combined server's YAML config. The combined server therefore always starts the backward-compatibility gRPC listener on 0.0.0.0:33073 with no way to turn it off.

Because a failed bind of 33073 is fatal, this makes it impossible to run two combined servers on one host (e.g. two independent meshes for different user populations behind one reverse proxy), even though every other listener the combined server opens is configurable (listenAddress, metricsPort, healthcheckAddress, STUN).

This PR adds server.disableLegacyPort to the combined YAML config and passes it through to the management server. Default false, preserving current behavior.

Tested: built the image from combined/Dockerfile.multistage and ran it with a minimal config.

  • disableLegacyPort: false (and unset): running gRPC backward compatibility server: [::]:33073 is logged and 33073 is listening.
  • disableLegacyPort: true: no compat listener; only the configured ports (11480/11490/11491 in the test) are bound.

n/a (completes #5372 for the combined server)

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

The new field is documented in combined/config.yaml.example in this PR; it is an opt-out flag mirroring the already-documented standalone --disable-legacy-port.

Docs PR URL (required if "docs added" is checked)

n/a


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features
    • Added a configuration option to disable the legacy management listener on port 33073.
    • Available as server.disableLegacyPort (defaults to false), preserving existing behavior unless explicitly enabled.
  • Documentation
    • Updated the sample combined-server configuration (combined/config.yaml.example) to include server.disableLegacyPort and its default value.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/6913 **Author:** [@josipstojanovic-boop](https://github.com/josipstojanovic-boop) **Created:** 7/27/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `combined-disable-legacy-port` --- ### 📝 Commits (3) - [`e9baf6e`](https://github.com/netbirdio/netbird/commit/e9baf6e7745e12396b121aeb21a83aebbe955d4a) [combined] expose disableLegacyPort in YAML config - [`393a877`](https://github.com/netbirdio/netbird/commit/393a8773d741f764c3edf08494e9f2a17529293b) Merge branch 'main' into combined-disable-legacy-port - [`9b5ec76`](https://github.com/netbirdio/netbird/commit/9b5ec76516d4f2e74a79f82a319556e2fb51db18) Merge branch 'main' into combined-disable-legacy-port ### 📊 Changes **3 files changed** (+17 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `combined/cmd/config.go` (+3 -0) 📝 `combined/cmd/root.go` (+9 -8) 📝 `combined/config.yaml.example` (+5 -0) </details> ### 📄 Description ## Describe your changes Follow-up to #5372, which added `--disable-legacy-port` to the standalone management binary and `DisableLegacyManagementPort` to `server.Config`, but did not expose it in the combined server's YAML config. The combined server therefore always starts the backward-compatibility gRPC listener on `0.0.0.0:33073` with no way to turn it off. Because a failed bind of 33073 is fatal, this makes it impossible to run two combined servers on one host (e.g. two independent meshes for different user populations behind one reverse proxy), even though every other listener the combined server opens is configurable (`listenAddress`, `metricsPort`, `healthcheckAddress`, STUN). This PR adds `server.disableLegacyPort` to the combined YAML config and passes it through to the management server. Default `false`, preserving current behavior. Tested: built the image from `combined/Dockerfile.multistage` and ran it with a minimal config. - `disableLegacyPort: false` (and unset): `running gRPC backward compatibility server: [::]:33073` is logged and 33073 is listening. - `disableLegacyPort: true`: no compat listener; only the configured ports (11480/11490/11491 in the test) are bound. ## Issue ticket number and link n/a (completes #5372 for the combined server) ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) The new field is documented in `combined/config.yaml.example` in this PR; it is an opt-out flag mirroring the already-documented standalone `--disable-legacy-port`. ### Docs PR URL (required if "docs added" is checked) n/a <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/netbirdio/codesmith/netbird/pr/6913"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1787736735&installation_model_id=427504&pr_number=6913&repository=netbirdio%2Fnetbird&return_to=https%3A%2F%2Fgithub.com%2Fnetbirdio%2Fnetbird%2Fpull%2F6913&signature=1bca77c1d1f75cbdef3c4a2ead3caf235a9cad79f850b973818de00da54cfd9c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a configuration option to disable the legacy management listener on port `33073`. * Available as `server.disableLegacyPort` (defaults to `false`), preserving existing behavior unless explicitly enabled. * **Documentation** * Updated the sample combined-server configuration (`combined/config.yaml.example`) to include `server.disableLegacyPort` and its default value. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 08:09:42 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#30018