[Feature] migrate node
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
I haven’t tried this personally. But backfillips may work for you. Alternatively you could perform an UPDATE statement on the DB.
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
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.