Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old routes #260

Closed
12nick12 opened this issue Dec 28, 2021 · 12 comments
Closed

Remove old routes #260

12nick12 opened this issue Dec 28, 2021 · 12 comments
Labels
enhancement New feature or request

Comments

@12nick12
Copy link

Is there any way to remove old routes from tailscale/headscale?

I deleted an old device and created a new one in it's place, when trying to enable a subnet router the device goes offline. This appears to be because of a loop I'm thinking.

@12nick12 12nick12 added the enhancement New feature or request label Dec 28, 2021
@kradalby
Copy link
Collaborator

kradalby commented Jun 12, 2022

Is this still a problem? Could you help us with some steps to reproduce a minimal case?

@epichub
Copy link

epichub commented Jul 1, 2022

I have a route that I cannot disable, if i "--reset" join the router node without advertising the route, the other nodes still gets the route added (after restarting headscale and tailscale on all nodes) - the route is no longer listed by headscale cli for the subnet router, but added to the other nodes anyway.

@kradalby kradalby added this to the v0.17.0 milestone Sep 8, 2022
@casdr
Copy link
Contributor

casdr commented Sep 16, 2022

I have the same issue, the problem can be reproduced as following:

  • Add a route from one of the nodes
  • Enable the route using headscale cli
  • Remove the route advertisement by removing the route from the --advertise-routes list

Now, when you check headscale route ls -i (node) the route doesn't show up, however the route is still listed in the sqlite database and also being configured on the other nodes.

@casdr
Copy link
Contributor

casdr commented Sep 16, 2022

I found a workaround for this, when you enable all routes for the node (headscale r enable -i 2 -a), the old route will be removed.

@PsyMan2000
Copy link

PsyMan2000 commented Jan 31, 2023

I am running 0.19.0 in a container and am also seeing a few routes sticking around after deleting a node and re-adding it (I did it to remove the IPv6 addresses and just use IPv4 after disabling it in the server 3 firewalls in) - now when I "headscale route ls" is gives me 3 Advertised routes with an empty Machine entry with the new 3 Machines and same routes tagged on the end of the list. Am I experiencing a bug or did I do something wrong. Also the commands seem to have changed a bit in 0.19.0. is there a "headscale route delete -r x" option or is there a simpler way to remove the ghosts from the machine? :-)

Maybe I should have re-upped it removing the advertised routes prior to deleting the node with the --reset flag? I will try that with another node and see what happens. I am only testing so no huge problem to wipe and start over. Looking forward to adding the UI on top once I get HS mastered...

I tried but ended up with 12 blank Machine entries and a mix of ghost routes. Deleted the db.sqlite file and made an empty one to start over. Just thought I would post back to see if it helps troubleshoot things. Enjoying just how easy it is to get running and use. fantastic work.

@robertorubioguardia
Copy link

Hi there.

Having the same issue here. Routes are still listed and shown as advertised in the headscale server, without a node label, even when the tailscale node has been removed from the network.

The headscale CLI seems not to have a command to delete routes :( but one just to disable routes.

Any ideas/insight?

@evenh
Copy link
Contributor

evenh commented Feb 14, 2023

I've seen the same behaviour

@jsbrain
Copy link

jsbrain commented Feb 28, 2023

Same ... cannot remove old routes from deleted device.

@EricTheMagician
Copy link

I was having the same issue and discovered that this might work:
If you still have the device identifier, this is what I did:

headscale  routes enable -i 2 -r ""

it seems to disable it

@PsyMan2000
Copy link

There seems to be a fantastic update now on the docker version I am using that llows you to delete routes. :-)

@PsyMan2000
Copy link

but that is a great workaround, Thanks Jinx - That would have saved me deleteing a dozen databases LOL

@juanfont
Copy link
Owner

juanfont commented May 7, 2023

Fixed :)

@juanfont juanfont closed this as completed May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants