headscale icon indicating copy to clipboard operation
headscale copied to clipboard

[Feature] migrate node

Open lovitus opened this issue 1 year ago • 2 comments

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

  • [X] I can write the design doc for this feature
  • [X] I can contribute this feature

How can it be implemented?

No response

lovitus avatar Jul 15 '24 07:07 lovitus

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

mitchellkellett avatar Jul 20 '24 11:07 mitchellkellett

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

nblock avatar Sep 08 '24 19:09 nblock

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Dec 26 '24 01:12 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jan 02 '25 01:01 github-actions[bot]