oxidecomputer / oxidecomputer/omicron

Endpoint to list allocated IPs for a given IP pool (or maybe a range)

Open
#5,031 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

People will probably need to know what IPs are in use. One obvious scenario is when you try to remove an IP range from a pool, it will error out if there are IPs in use. If you really want to remove that range, you need to go track down those IPs and get rid of them. So you need to know the IPs. You may also need some information about the way those IPs are being used — e.g., are they floating or ephemeral, and if they're ephemeral, which instance are they on. And what project is all that in. However, if this is an operator endpoint, we generally avoid leaking stuff from inside silo out to the operator. So this will take some thinking to get right.

The queries we use to check whether there are outstanding IPs from a pool in a given silo before unlinking are a good starting point. Whether we'd do it by silo for this new endpoint depends on the answer to the above questions.

https://github.com/oxidecomputer/omicron/blob/a5430a6465f457175ca1cf0c0053ffc47f25bf62/nexus/db-queries/src/db/datastore/ip_pool.rs#L522-L614

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 outstanding-IP queries in nexus/db-queries/src/db/datastore/ip_pool.rs, lines 522-614, which the issue identifies as a starting point. Work out whether the endpoint lists a pool or range and how it represents allocation details while respecting silo boundaries. Done means the endpoint contract and operator visibility rules are decided and the allocated-IP information can be retrieved accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.