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

[Feature] migrate node #2012

Open
2 tasks done
lovitus opened this issue Jul 15, 2024 · 2 comments
Open
2 tasks done

[Feature] migrate node #2012

lovitus opened this issue Jul 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lovitus
Copy link

lovitus commented Jul 15, 2024

Use case

Hello dear author
I have batch of nodes need to get deleted .(my server provider cuts the services.)
How could I reuse all the assigned ips to my new servers? (delete old nodes , then assign the ips to new servers)

Description

  • delete old nodes , reuse the ips for new nodes

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

No response

@lovitus lovitus added the enhancement New feature or request label Jul 15, 2024
@mitchellkellett
Copy link

I haven’t tried this personally. But backfillips may work for you. Alternatively you could perform an UPDATE statement on the DB.

@nblock
Copy link
Collaborator

nblock commented Sep 8, 2024

How could I reuse all the assigned ips to my new servers? (delete old nodes , then assign the ips to new servers)

I'm not sure if I understand your question in full, please consider carefully.

By default, Headscale assigns IP addresses sequentially. If you currently do not have any holes in your IP address assignment, the following should work (did something similar on 0.22.x):

  • Delete a node from headscale
  • There is now a hole somewhere in the middle in your range of assigned IP addresses
  • Register the "same" node with headscale
  • The previously removed IP addresses should be picked up by the new node

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

4 participants
@nblock @lovitus @mitchellkellett and others