prober: log client pubkeys on derp mesh probe failures

Updates https://github.com/tailscale/corp/issues/9916

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
pull/7619/head
Anton Tolchanov 2 years ago committed by Anton Tolchanov
parent 60a028a4f6
commit e59dc29a55

@ -273,6 +273,17 @@ func derpProbeNodePair(ctx context.Context, dm *tailcfg.DERPMap, from, to *tailc
time.Sleep(100 * time.Millisecond) // pretty arbitrary time.Sleep(100 * time.Millisecond) // pretty arbitrary
} }
latency, err = runDerpProbeNodePair(ctx, from, to, fromc, toc)
if err != nil {
// Record pubkeys on failed probes to aid investigation.
err = fmt.Errorf("%s -> %s: %w",
fromc.SelfPublicKey().ShortString(),
toc.SelfPublicKey().ShortString(), err)
}
return latency, err
}
func runDerpProbeNodePair(ctx context.Context, from, to *tailcfg.DERPNode, fromc, toc *derphttp.Client) (latency time.Duration, err error) {
// Make a random packet // Make a random packet
pkt := make([]byte, 8) pkt := make([]byte, 8)
crand.Read(pkt) crand.Read(pkt)

Loading…
Cancel
Save