From 44c9bd5b6d8871c2b7af4a17b26771bff72bcf19 Mon Sep 17 00:00:00 2001 From: Spike Curtis Date: Thu, 11 Jan 2024 09:45:22 +0400 Subject: [PATCH] chore: nodeUpdater logging --- tailnet/configmaps.go | 4 ++++ tailnet/node.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tailnet/configmaps.go b/tailnet/configmaps.go index 028ba7dfff339..2a2266913b9df 100644 --- a/tailnet/configmaps.go +++ b/tailnet/configmaps.go @@ -137,6 +137,7 @@ func (c *configMaps) configLoop() { c.Wait() } if c.closing { + c.logger.Debug(context.Background(), "closing configMaps configLoop") return } // queue up the reconfiguration actions we will take while we have @@ -146,12 +147,14 @@ func (c *configMaps) configLoop() { if c.derpMapDirty { derpMap := c.derpMapLocked() actions = append(actions, func() { + c.logger.Debug(context.Background(), "updating engine DERP map", slog.F("derp_map", derpMap)) c.engine.SetDERPMap(derpMap) }) } if c.netmapDirty { nm := c.netMapLocked() actions = append(actions, func() { + c.logger.Debug(context.Background(), "updating engine network map", slog.F("network_map", nm)) c.engine.SetNetworkMap(nm) c.reconfig(nm) }) @@ -159,6 +162,7 @@ func (c *configMaps) configLoop() { if c.filterDirty { f := c.filterLocked() actions = append(actions, func() { + c.logger.Debug(context.Background(), "updating engine filter", slog.F("filter", f)) c.engine.SetFilter(f) }) } diff --git a/tailnet/node.go b/tailnet/node.go index 5b00367ebbecc..8f7810f80adcd 100644 --- a/tailnet/node.go +++ b/tailnet/node.go @@ -52,6 +52,7 @@ func (u *nodeUpdater) updateLoop() { u.Wait() } if u.closing { + u.logger.Debug(context.Background(), "closing nodeUpdater updateLoop") return } node := u.nodeLocked() @@ -68,6 +69,7 @@ func (u *nodeUpdater) updateLoop() { } u.L.Unlock() + u.logger.Debug(context.Background(), "calling nodeUpdater callback", slog.F("node", node)) u.callback(node) u.L.Lock() } @@ -126,6 +128,8 @@ func (u *nodeUpdater) setNetInfo(ni *tailcfg.NetInfo) { if u.preferredDERP != ni.PreferredDERP { dirty = true u.preferredDERP = ni.PreferredDERP + u.logger.Debug(context.Background(), "new preferred DERP", + slog.F("preferred_derp", u.preferredDERP)) } if !maps.Equal(u.derpLatency, ni.DERPLatency) { dirty = true pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy