Skip to content

[Bug] Used IPs are kept in memory for ephemeral nodes #2907

@dparv

Description

@dparv

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Seems that used IP addresses for nodes are kept in memory for ephemeral machines.

Expected Behavior

Ephemeral node IPs shouldn't take used IP addresses as they are destroyed.

Steps To Reproduce

In a use-case of running a CI that connects every 5 minutes using ephemeral key/node and using a /24 network will cause the 256th call to fail to connect with failed to allocate IP. Restarting the headscale server resolves this problem.

Environment

- OS: Ubuntu@22.04
- Headscale version: 0.26.1
- Tailscale version: 1.88.3

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

Nov 20 11:51:57 b37fe952876839BootstrapVm headscale.headscaled[307571]: 2025-11-20T11:51:57Z ERR http internal server error error="allocating IPv4 address: failed to allocate IP" code=500

from tailscale client:

backend error: handling register with auth key: allocating IPs: allocating IPv4 address: failed to allocate IP

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions