nebula_ipam¶
Nebula IP address management (IPAM) external pillar.
Dynamically allocates a stable Nebula overlay IP to each minion and injects it
at <pillar_key>:hosts:<minion_id>:ip. Because the runner, state and
execution module already read the address from exactly that location, nothing
downstream needs to change: certificate signing and config assembly cannot tell
whether the IP was hand-written or allocated here.
Allocations are persisted in a SQLite database on the master, so a minion keeps the same address across every pillar recompile.
- saltext.nebula.pillar.nebula_ipam.allocate(store, minion_id, network, pool=None, reserved=None)[source]¶
Return minion_id’s overlay address, allocating the lowest free one if the minion has none yet. The result is formatted with network’s prefix length (e.g.
10.10.10.42/24).Existing allocations are returned unchanged. Raises
RuntimeErrorif the pool is exhausted.
- saltext.nebula.pillar.nebula_ipam.lookup(store, minion_id)[source]¶
Return the allocation record for minion_id, or
None.
- saltext.nebula.pillar.nebula_ipam.list_all(store)[source]¶
Return every allocation, ordered numerically by address.
- saltext.nebula.pillar.nebula_ipam.release(store, minion_id)[source]¶
Remove minion_id’s allocation, freeing its address for reuse. Returns True if a record was removed. Intended for explicit decommissioning only.
- saltext.nebula.pillar.nebula_ipam.ext_pillar(minion_id, pillar, network=None, pool=None, store=None, reserve=None, reserve_lighthouses=True, pillar_key='nebula')[source]¶
Allocate and inject a Nebula overlay IP for minion_id.
Returns
{pillar_key: {"hosts": {minion_id: {"ip": <addr/prefix>}}}}to be merged into the minion’s pillar, or{}when there is nothing to do (the minion is not a Nebula node, already has a static IP, or allocation failed).Failures are logged and swallowed rather than raised, so a misconfiguration or a full pool never breaks the minion’s entire pillar render. The absent IP surfaces later as a clear error from
nebula.get_certificate.