Skip to content

Conversation

@bnaecker
Copy link
Collaborator

@bnaecker bnaecker force-pushed the add-system-ip-pool-apis branch from 4a65598 to eed8606 Compare October 15, 2025 21:41
- Add Nexus endpoints for reserving IP Pools for Oxide use or for
  external customer Silos
- Remove check used to hide internal IP Pools, since they're all visible
  to an operator now
- Rename operator IP Pool endpoints by prefixing `system_*`, to avoid
  conflicts with previous "silo-scoped" endpoints.
- Handle possibility of any number of Oxide-internal IP Pools in
  various places where we previously assumed exactly 2 of them.
- Fixes #8947
- Fixes #8226
@bnaecker
Copy link
Collaborator Author

We should probably hold this PR until after we cut the R17 release. I'm also adding a PR to the CLI repo handling these breaking changes.

@bnaecker bnaecker added console Web console networking Related to the networking. labels Oct 17, 2025
Copy link
Contributor

@rcgoodfellow rcgoodfellow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bnaecker! Comments follow.

@bnaecker
Copy link
Collaborator Author

Thanks for y'all's patience. Now that R17 is out, this is ready for a proper review.

) -> Result<HttpResponseOk<views::IpPoolSiloLink>, HttpError>;

/// Fetch Oxide service IP pool
/// Reserve an IP Pool for use by specific resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment, but I also don't understand networking beyond what you told me about it being like a series of tubes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought I think I understand this better. "Reserve" is a funny verb. I think we're saying "should we use this IP pool for like normal silo shit or should we use it for system services"

I imagine we considered using "link" to a "thing that takes the place of a silo" but it was too confusing because e.g. in general an ip pool can be "linked" to multiple silos, but can only be "reserved" as a (the?) system silo exclusive to use with silos.

// is_default }
) -> Result<HttpResponseOk<ResultsPage<views::IpPoolSiloLink>>, HttpError>;

/// Link IP pool to silo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this to be confusing. I think the idea is that there are IP Pools and Silos; a "link" is an association between them. I could ask "for this silo, show me the linked ip pools" or "for this ip pool, show me the linked silos"

I'm suggesting this as alternative text to the text below that I can't comment on due to github

Linking an IP pool and a silo allows users within that silo to allocate IP addresses from that IP pool and assign them to instances. When linking an IP pool, one can designated that pool as the "default" for the silo. When a user of that silo allocates an IP address without specifying a pool, IP addresses are allocated from that default pool. A silo can have a most one default poo.

And I think we should say the following, but I'm not sure it's correct:

If there is no default pool, requests that allocate IP addresses must specify a particular pool (linked to that silo). Specifying that a linked IP pool should be the default replaces the existing default (if there is one). To modify a silo's default IP pool, use the update operation. [a bit oblique, but trying to make it agnostic between the CLI and API]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to explain how this can only be used for IP pools that are "reserved" for instances?

tags = ["system/ip-pools"],
}]
async fn ip_pool_silo_update(
async fn system_ip_pool_silo_update(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the docs above could be improved

Modify whether a linked IP pool is the default for a silo.

) -> Result<HttpResponseOk<views::IpPool>, HttpError>;
) -> Result<HttpResponseOk<views::SystemIpPool>, HttpError>;

/// Fetch IP pool utilization
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Fetch IP pool utilization
/// View IP pool utilization

Enh.. we're about 60/40 fetch vs. view so whatever...

#[derive(Clone, Copy, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum IpPoolReservationType {
/// The pool is reserved for use by external customer Silos.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

External to what? Customer? This comment appears in the OpenAPI document; I think we should write it as external docs

}
}

/// Indicates what resources an IP Pool is reserved for.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Indicates what resources an IP Pool is reserved for.
/// IP Pool designation as either for Instances or System Services

pub ip_version: IpVersion,
/// Type of IP pool (unicast or multicast)
pub pool_type: shared::IpPoolType,
/// Resources the IP Pool is reserved for.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like an odd use of the term "reserve"

Comment on lines +1039 to +1043
/// Which resources the IP Pool is reserved for.
///
/// The default is reserved for external silos.
#[serde(default = "IpPoolReservationType::external_silos")]
pub reservation_type: IpPoolReservationType,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we expect people to change ip pools from one type to another?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

console Web console networking Related to the networking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add external APIs to reserve IP Pools for Oxide services Rename project_ip_pool_list and project_ip_pool_view

5 participants