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/tstest/integration
Alex Chan 41a2aaf1da cmd/tailscale/cli: fix race condition in `up --force-reauth`
This commit fixes a race condition where `tailscale up --force-reauth` would
exit prematurely on an already-logged in device.

Previously, the CLI would wait for IPN to report the "Running" state and then
exit. However, this could happen before the new auth URL was printed, leading
to two distinct issues:

*   **Without seamless key renewal:** The CLI could exit immediately after
    the `StartLoginInteractive` call, before IPN has time to switch into
    the "Starting" state or send a new auth URL back to the CLI.
*   **With seamless key renewal:** IPN stays in the "Running" state
    throughout the process, so the CLI exits immediately without performing
    any reauthentication.

The fix is to change the CLI's exit condition.

Instead of waiting for the "Running" state, if we're doing a `--force-reauth`
we now wait to see the node key change, which is a more reliable indicator
that a successful authentication has occurred.

Updates tailscale/corp#31476
Updates tailscale/tailscale#17108

Signed-off-by: Alex Chan <alexc@tailscale.com>
4 months ago
..
nat wgengine/magicsock: use learned DERP route as send path of last resort 11 months ago
testcontrol tstest/integration: expand the tests for `tailscale up` 4 months ago
vms tstest/integration: don't require TestMake, stop leaking binaries in /tmp 9 months ago
capmap_test.go tstest/integration/testcontrol: include peer CapMaps in MapResponses 6 months ago
gen_deps.go all: update tools that manage copyright headers 3 years ago
integration.go derp/derpserver: clean up extraction of derp.Server (#17264) 4 months ago
integration_test.go cmd/tailscale/cli: fix race condition in `up --force-reauth` 4 months ago
tailscaled_deps_test_darwin.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago
tailscaled_deps_test_freebsd.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago
tailscaled_deps_test_linux.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago
tailscaled_deps_test_openbsd.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago
tailscaled_deps_test_windows.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago