mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-11 16:09:07 +02:00
[management,client] Carry the debug upload destination on PeerConfig
A destination set from the dashboard never reached a connected peer. The peer fan-out that follows a settings change builds its sync with a nil server config, and toNetbirdConfig returns nil for that, so no NetbirdConfig went out at all and the peer kept whatever it had. The new URL only arrived when the peer reconnected, and until then its bundles kept going to NetBird's upload service — which is the disclosure this PR exists to close. PeerConfig is the message the fan-out already fills from the account settings, alongside the other knobs an operator flips at runtime: lazy connection, MTU, routing-peer DNS resolution, auto-update. The destination belongs with them. Sending a partial NetbirdConfig from the fan-out instead would be worse: clients treat a non-nil one as authoritative for relay and would drop their relay URLs. Start now reads the destination off the PeerConfig it was given in the previous commit, for the same reason it used to read it off NetbirdConfig: without it, a bundle collected between login and the first sync sees no destination, and the first seconds after a start are exactly when someone collects a bundle about a start that went wrong. DebugConfig is removed rather than deprecated. It was added earlier in this branch and has never been in a release, so no deployed client reads it.
This commit is contained in:
+1281
-1343
File diff suppressed because it is too large
Load Diff
@@ -337,8 +337,6 @@ message NetbirdConfig {
|
||||
FlowConfig flow = 5;
|
||||
|
||||
MetricsConfig metrics = 6;
|
||||
|
||||
DebugConfig debug = 7;
|
||||
}
|
||||
|
||||
// HostConfig describes connection properties of some server (e.g. STUN, Signal, Management)
|
||||
@@ -381,18 +379,6 @@ message MetricsConfig {
|
||||
bool enabled = 1;
|
||||
}
|
||||
|
||||
// DebugConfig carries the deployment-wide debug settings the operator of this
|
||||
// management server publishes to its peers.
|
||||
message DebugConfig {
|
||||
// upload_url is the debug-bundle upload service this peer's account uses,
|
||||
// taken from the account settings or, failing that, from the management
|
||||
// server config. Setting it keeps a deployment's bundles — which carry peer
|
||||
// logs, routes, DNS and firewall state — inside infrastructure the operator
|
||||
// controls. An empty value means no destination is published, and the peer
|
||||
// uploads to the service NetBird runs.
|
||||
string upload_url = 1;
|
||||
}
|
||||
|
||||
// JWTConfig represents JWT authentication configuration for validating tokens.
|
||||
message JWTConfig {
|
||||
string issuer = 1;
|
||||
@@ -437,6 +423,18 @@ message PeerConfig {
|
||||
|
||||
// IPv6 overlay address as compact bytes: 16 bytes IP + 1 byte prefix length.
|
||||
bytes address_v6 = 9;
|
||||
|
||||
// debugBundleUploadUrl is the debug-bundle upload service this peer's account
|
||||
// uses, taken from the account settings or, failing that, from the management
|
||||
// server config. Setting it keeps a deployment's bundles — which carry peer
|
||||
// logs, routes, DNS and firewall state — inside infrastructure the operator
|
||||
// controls. An empty value means no destination is published, and the peer
|
||||
// uploads to the service NetBird runs.
|
||||
//
|
||||
// It rides PeerConfig rather than NetbirdConfig because the peer fan-out that
|
||||
// follows a settings change builds its sync with a nil server config, so a
|
||||
// NetbirdConfig field only reaches a peer when that peer reconnects.
|
||||
string debugBundleUploadUrl = 10;
|
||||
}
|
||||
|
||||
message AutoUpdateSettings {
|
||||
|
||||
Reference in New Issue
Block a user