fix(bootstrap): converge the tailnet hostname on an already-joined box #7
No reviewers
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:bootstrap
scope:coolify
scope:db
scope:docs
scope:drill
scope:installer
scope:labels
scope:platform
scope:runner
scope:users
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/rig#7
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/tailnet-hostname-converges"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #6, found in the same session.
The gap
bootstrapskipstailscale upwhen the box has already joined — that is what lets are-run work without spending a pre-auth key (#6). But skipping it also skipped
--hostname, so the tailnet name never converged.A box that joined under the wrong name stayed misnamed permanently, and re-running
rig — the documented repair path — could not fix it. rig is convergent by contract
("safe to re-run; a second run changes nothing"); this was the one field that wasn't.
Concretely: an operator ran
rig bootstrap control-planeon the prod box without--hostname. Roles are near-identical (control-planeandworkloaddiffer only in alog line), so the run was harmless — except the box took the role as its name, and no
amount of re-running could rename it.
The fix
The already-joined path now compares the live tailnet hostname against
--hostnameandreconciles it with
tailscale set --hostname— no re-auth, no key. A failurewarnsrather than
dies: a cosmetic name is not worth failing a bootstrap over.Why renaming is safe here
dstto ahostname — it must be a tag, an IP, or a
hostsalias. (That constraint is exactly whyour
acl.hujsonpinscoolify-boxto an IP.)keeps that name and is no longer overridden by the device hostname.
bash -n+shellcheckclean. Thetailscale status --peers=falseself-line parse waschecked against real output from a live node.
🤖 Generated with Claude Code