mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-04 00:41:46 +01:00
tstest/integration/testcontrol: de-flake TestUserMetricsRouteGauges
SetSubnetRoutes was not sending update notifications to nodes when their approved routes changed, causing nodes to not fetch updated netmaps with PrimaryRoutes populated. This resulted in TestUserMetricsRouteGauges flaking because it waited for PrimaryRoutes to be set, which only happened if the node happened to poll for other reasons. Now send updateSelfChanged notification to affected nodes so they fetch an updated netmap immediately. Fixes #17962 Signed-off-by: Andrew Dunham <andrew@tailscale.com>
This commit is contained in:
parent
16587746ed
commit
a20cdb5c93
@ -464,6 +464,9 @@ func (s *Server) SetSubnetRoutes(nodeKey key.NodePublic, routes []netip.Prefix)
|
||||
defer s.mu.Unlock()
|
||||
s.logf("Setting subnet routes for %s: %v", nodeKey.ShortString(), routes)
|
||||
mak.Set(&s.nodeSubnetRoutes, nodeKey, routes)
|
||||
if node, ok := s.nodes[nodeKey]; ok {
|
||||
sendUpdate(s.updates[node.ID], updateSelfChanged)
|
||||
}
|
||||
}
|
||||
|
||||
// MasqueradePair is a pair of nodes and the IP address that the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user