-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Orphaned routes accumulating in the routes table #1482
Comments
vsychov
added a commit
to vsychov/headscale
that referenced
this issue
Sep 26, 2023
3 tasks
vsychov
added a commit
to vsychov/headscale
that referenced
this issue
Sep 26, 2023
This issue is stale because it has been open for 90 days with no activity. |
This issue is stale because it has been open for 90 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
Hello,
I'm using headscale with
autoApprovers
ACL and dynamic Tailscale subnet routers which frequently change their advertised routes. To handle traffic redirection to certain domain names with dynamic DNS, I've set up a script that monitors DNS changes and restarts Tailscale, adjusting theadvertise-routes
flag according to the resolved DNS. Additionally, the nodes running this setup areephemeral
and periodically replaced. This setup mostly works fine, except for a single issue I've discovered.The routes table in the database seems to be filling up with entries for routes that are no longer relevant and have no association with any machines:
This returns approximately 20k entries that are no longer needed.
I believe this to be a bug, as I would expect the routes table to be cleaned up at some point (perhaps when a node is deleted), or when the
updated_at
field for a route is more than 24 hours old, and bothadvertised
andenabled
fields are set tofalse
.At present, I'm handling the table overflow issue with the following SQL:
Might it be beneficial to add a goroutine to handle this?
If this change is approved, I would be happy to create a pull request implementing the necessary adjustments.
Thank you for your attention to this matter.
Best regards.
The text was updated successfully, but these errors were encountered: