Skip to content

Commit d47c697

Browse files
committed
ipn/ipnlocal: skip TKA bootstrap request if Tailnet Lock is unavailable
If you run tailscaled without passing a `--statedir`, Tailnet Lock is unavailable -- we don't have a folder to store the AUMs in. This causes a lot of unnecessary requests to bootstrap TKA, because every time the node receives a NetMap with some TKA state, it tries to bootstrap, fetches the bootstrap TKA state from the control plane, then fails with the error: TKA sync error: bootstrap: network-lock is not supported in this configuration, try setting --statedir We can't prevent the error, but we can skip the control plane request that immediately gets dropped on the floor. In local testing, a new node joining a tailnet caused *three* control plane requests which were unused. Updates tailscale/corp#19441 Signed-off-by: Alex Chan <[email protected]>
1 parent 8576a80 commit d47c697

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ipn/ipnlocal/network-lock.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ func (b *LocalBackend) tkaSyncIfNeeded(nm *netmap.NetworkMap, prefs ipn.PrefsVie
288288
return nil
289289
}
290290

291+
if err := b.CanSupportNetworkLock(); err != nil {
292+
return err
293+
}
294+
291295
isEnabled := b.tka != nil
292296
wantEnabled := nm.TKAEnabled
293297

0 commit comments

Comments
 (0)