oxidecomputer / oxidecomputer/omicron

IP pool utilization: break down by floating, ephemeral, SNAT

Open
#5,332 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Followup to #5258. Allocated query would have to return a breakdown by type for both IPv4 and IPv6. Should be quite easy: do 6 counts instead of 2 and add AND ip_kind = 'ephemeral' etc. to the WHERE clauses.

https://github.com/oxidecomputer/omicron/blob/f8c394f08191a95e1d83db33a8bf23a68b2c4a6b/nexus/db-queries/src/db/datastore/ip_pool.rs#L353-L360

I think the API should still continue to return the total allocated count in addition to the breakdown by type. One of the following:

allocated_ephemeral
allocated_floating
allocated_snat
allocated
capacity
allocated: {
  total
  ephemeral
  floating
  snat
}
capacity

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the allocated query in nexus/db-queries/src/db/datastore/ip_pool.rs around lines 353-360 and review follow-up issue #5258. Confirm how IPv4 and IPv6 counts are exposed before choosing the response shape. Done means allocated utilization includes total, ephemeral, floating, and SNAT counts for both address families while retaining capacity.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.