personal-app-template icon indicating copy to clipboard operation
personal-app-template copied to clipboard

Fix Tailscale node name duplication thingie

Open jacobian opened this issue 1 year ago • 1 comments

Fly doesn't clean up old apps before deploying new ones (and doesn't offer a deployment strategy that does), so when the new app bootstraps Tailscale sees it as a duplicate and gives it a unique name (app-1, app-2, etc.). This makes the node name not predictable and is annoying.

Some options:

  • Maybe there's a clever Tailscale fix?
  • Maybe a blue/green deployment would help a bit? Only two names instead of one?
  • Perhaps there are DNS tricks?
  • Perhaps a trick with golinks - then the name won't matter?

jacobian avatar Jan 17 '24 20:01 jacobian

Huh, the docs have this to say:

When an ephemeral node goes offline, it is automatically removed from your tailnet. You can also control ephemeral node removal using the tailscale logout command to either manually force the removal or incorporate the command into the tailscaled daemon

I think perhaps if I can figure out a way to run tailscale logout on the old node before the new one is deployed it should fix this (???). Fly doesn't seem to have any sort of on-destroy hook, but maybe I can do something clever with Docker?

jacobian avatar Jan 18 '24 20:01 jacobian