tailscale/control/controlclient
Brad Fitzpatrick e968b0ecd7 cmd/tailscale,controlclient,ipnlocal: fix 'up', deflake tests more
The CLI's "up" is kinda chaotic and LocalBackend.Start is kinda
chaotic and they both need to be redone/deleted (respectively), but
this fixes some buggy behavior meanwhile. We were previously calling
StartLoginInteractive (to start the controlclient's RegisterRequest)
redundantly in some cases, causing test flakes depending on timing and
up's weird state machine.

We only need to call StartLoginInteractive in the client if Start itself
doesn't. But Start doesn't tell us that. So cheat a bit and a put the
information about whether there's a current NodeKey in the ipn.Status.
It used to be accessible over LocalAPI via GetPrefs as a private key but
we removed that for security. But a bool is fine.

So then only call StartLoginInteractive if that bool is false and don't
do it in the WatchIPNBus loop.

Fixes #12028
Updates #12042

Change-Id: I0923c3f704a9d6afd825a858eb9a63ca7c1df294
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-05-07 22:34:45 -07:00
..
auto.go cmd/tailscale,controlclient,ipnlocal: fix 'up', deflake tests more 2024-05-07 22:34:45 -07:00
client.go ipn/ipnlocal: acquire b.mu once in Start 2024-05-07 20:29:59 -07:00
controlclient_test.go all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
direct_test.go net/netns, net/dns/resolver, etc: make netmon required in most places 2024-04-27 12:17:45 -07:00
direct.go cmd/tailscale,controlclient,ipnlocal: fix 'up', deflake tests more 2024-05-07 22:34:45 -07:00
map_test.go all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
map.go tailcfg,all: add/plumb Node.IsJailed 2024-05-06 15:32:22 -07:00
noise_test.go net/netns, net/dns/resolver, etc: make netmon required in most places 2024-04-27 12:17:45 -07:00
noise.go health, all: remove health.Global, finish plumbing health.Tracker 2024-04-26 12:03:11 -07:00
sign_supported_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
sign_supported.go control/controlclient: support certstore without cgo 2023-10-20 15:17:32 -04:00
sign_unsupported.go control/controlclient: support certstore without cgo 2023-10-20 15:17:32 -04:00
sign.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
status.go all: implement AppendText alongside MarshalText (#9207) 2023-09-01 18:15:19 -07:00