Repository navigation
Conversation
OMARCHY_TAILSCALE_LOGIN_SERVER is passed to tailscale up, and the hosted admin web app is skipped unless OMARCHY_TAILSCALE_ADMIN_URL is set. An optional auth key joins without a browser login. Unset variables keep the hosted install.
Automated AI review
Outcome: A retry with the new variables after an earlier install fails at A retry is refused, echoes the key and reports successAfter a run reaches Suggested change: add Reproducer (fails at 5589555)Reproducer: retrying with the new variables after an earlier runTwo parts. Part A uses the real Part A: the Needs no root, uses temporary state and a private socket, turns log upload off, and points at #!/bin/bash
work=$(mktemp -d)
sock="$work/tailscaled.sock"
tailscaled --tun=userspace-networking --no-logs-no-support --port=0 \
--statedir="$work/state" --socket="$sock" >"$work/tailscaled.log" 2>&1 &
daemon=$!
until tailscale --socket="$sock" status --json >/dev/null 2>&1; do sleep 0.1; done
as_sudo() { env USER=root tailscale --socket="$sock" "$@"; }
# 1. The first run: `tailscale up` never completes (here it times out; on the
# menu install it is interrupted at the login URL), then the installer
# carries on to its operator step.
as_sudo up --accept-routes --login-server=https://first.invalid --timeout=3s
as_sudo set --operator="$USER"
# 2. The retry, with OMARCHY_TAILSCALE_LOGIN_SERVER=https://headscale.invalid and
# OMARCHY_TAILSCALE_AUTH_KEY=tskey-auth-EXAMPLEKEY: the command the PR builds.
as_sudo up --accept-routes --login-server=https://headscale.invalid --auth-key=tskey-auth-EXAMPLEKEY
echo "tailscale up exit status: $?"
kill "$daemon"
wait "$daemon" 2>/dev/null
rm -rf "$work"Actual output: A second script ran the same steps with step 1 replaced by the unchanged hosted menu command ( With Part B: the installer ignores a failed Change the cat >"$stub_bin/sudo" <<'SH'
#!/bin/bash
printf 'sudo %s\n' "$*" >>"$OMARCHY_TEST_CALL_LOG"
if [[ ${1-} == tailscale && ${2-} == up && -n ${OMARCHY_TEST_FAIL_UP-} ]]; then
echo "tailscale up failed" >&2
exit 1
fi
SHand append: status=$(OMARCHY_TEST_FAIL_UP=1 run_install "https://headscale.example.com" "tskey-auth-secret")
[[ $status != 0 ]] || fail "a failed tailscale up fails the install" "$(cat "$call_log")"
pass "a failed tailscale up fails the install"Actual output at 5589555 (the sandbox had no With More findingsThe auth key is a
|
|
@llstrk Thanks for the detailed retry reproducer and the checks on key handling. Both the missing operator and the ignored join failure were real. Addressed in 6028036:
The 11 installer scenarios and the focused Tailscale, installed-service, style, syntax, diff, and metadata checks pass. A real 1.102.3 CLI with temporary userspace-daemon state reproduced the previous refusal/key echo. With explicit operator and stdin key, it passed the settings guard and changed The broader CLI suite stops at a pre-existing VS Code test that expects a symlink while the committed sync command writes a regular file. |
|
The Tailscale installer can join a self-hosted coordination server through
OMARCHY_TAILSCALE_LOGIN_SERVER, use a pre-auth key throughOMARCHY_TAILSCALE_AUTH_KEY, and install an optional admin web app throughOMARCHY_TAILSCALE_ADMIN_URL. Hosted Tailscale remains the default.Each join includes the invoking user's operator setting, obtained with
id -un, so a retry after an earlier installer run does not fail because sudo's user differs. Package installation, daemon startup, and join failures stop setup before the remaining services, plugin, and web app are configured.Auth keys use Tailscale's
--auth-key=file:/dev/stdinsupport and a pipe. The key is removed from the child-process environment and kept out of sudo/Tailscale command arguments. URLs without a hostname or with an invalid port, and keys containing whitespace are rejected before installation. After a successful self-hosted join without an admin URL, the installer removes the exact hosted-console launcher it verified, while preserving custom launchers and shared icons. The networking manual documents all three variables, menu environment requirements, and an explicit logout before switching an already connected node to another coordination server.Validation: 17 installer scenarios pass, including hosted/self-hosted joins, custom admin URLs, validation before side effects, key handling, failure propagation, URL parsing, and launcher transitions. The Tailscale model, installed-service, bin-style, syntax, diff, and CLI metadata checks pass. A real Tailscale 1.102.3 CLI against a separate userspace daemon reproduces the old retry refusal/key echo and confirms that explicit operator plus stdin key passes that guard and changes the control URL. The test servers are unreachable; no live join was performed. The full CLI suite stops at a pre-existing VS Code symlink assertion.
Upstream copy of the feature requested in omacom/omarchy-mac#484.