mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 18:56:52 +01:00
multiport: say when lanes are on and what was negotiated
Every multiport log line so far was a reason it turned itself off, so a node running it looked identical to one that never tried. Add the other half: - an Info at startup with the lane count and port range - the negotiated lanes on both "Handshake message received" lines, which required allocating the lane set before the log rather than after; it still lands before CheckAndComplete/Complete, which was the ordering requirement - multiport.lanes.up and multiport.lanes.tunnels gauges The lane field is a slog.Attr so it vanishes on a node without multiport, and reads zeros when we offered lanes and the peer had none - the case an operator is actually looking for. The gauges walk the hostmap instead of keeping a counter at promote/demote: a tunnel torn down while its lanes are up never demotes them, so a counter would drift upward forever. Only a multiport node pays for the walk.
This commit is contained in:
1 parent
e3efe0c53d
commit
a304f370f4
5 files changed
+100
-5
No files matched your search
@@ -325,6 +325,11 @@ func Main(c *config.C, configTest bool, buildVersion string, l *slog.Logger, dev
|
||||
handshakeConfig.laneCount = lanes
|
||||
handshakeConfig.lanePortCount = uint16(routines)
|
||||
handshakeConfig.laneBasePort = uint16(port)
|
||||
|
||||
// Every other multiport log line is a reason it turned itself off, so say
|
||||
// plainly when it is on and with what. A peer only gets lanes if it also
|
||||
// advertises a port range, so this is our half of the negotiation.
|
||||
l.Info("multiport enabled", "lanes", lanes, "basePort", port, "ports", routines)
|
||||
}
|
||||
|
||||
handshakeManager := NewHandshakeManager(l, hostMap, lightHouse, udpConns[0], handshakeConfig)
|
||||
|
||||
Reference in new issue
Block a user