You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn
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>
2 years ago
..
conffile ipn/{conffile,ipnlocal}: start booting tailscaled from a config file w/ auth key 2 years ago
ipnauth go.mod, all: move away from inet.af domain seized by Taliban 2 years ago
ipnlocal cmd/tailscale,controlclient,ipnlocal: fix 'up', deflake tests more 2 years ago
ipnserver ipn/ipnserver: close a small race in ipnserver, ~simplify code 2 years ago
ipnstate cmd/tailscale,controlclient,ipnlocal: fix 'up', deflake tests more 2 years ago
localapi ipn/ipnlocal, all: plumb health trackers in tests 2 years ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 2 years ago
store cmd/containerboot,kube,ipn/store/kubestore: allow interactive login on kube, check Secret create perms, allow empty state Secret (#11326) 2 years ago
backend.go ipn: remove unused Options.LegacyMigrationPrefs 2 years ago
conf.go cmd/k8s-operator,ipn/conf.go: fix --accept-routes for proxies (#11453) 2 years ago
doc.go all: update copyright and license headers 3 years ago
ipn_clone.go various: implement stateful firewalling on Linux (#12025) 2 years ago
ipn_test.go net/packet: split off checksum munging into different pkg 2 years ago
ipn_view.go various: implement stateful firewalling on Linux (#12025) 2 years ago
prefs.go ipn/ipnlocal: set default NoStatefulFiltering in ipn.NewPrefs (#12031) 2 years ago
prefs_test.go ipn/ipnlocal: set default NoStatefulFiltering in ipn.NewPrefs (#12031) 2 years ago
serve.go all: deprecate Node.Capabilities (more), remove PeerChange.Capabilities [capver 89] 2 years ago
serve_test.go {ipn/serve,cmd/tailscale/cli}: move some shared funcs to ipn 2 years ago
store.go ipn: add comment about thread-safety to StateStore 2 years ago
store_test.go ipn: avoid useless no-op WriteState calls 2 years ago