Support multiple external IPs in blueprint zone type - #11236
Conversation
bnaecker
commented
Sep 3, 2026
- Add support for multiple EIPs to the blueprint zone types for Nexus, External DNS, and Boundary NTP zones.
- Add some newtypes and wrappers to support lists of these or up to 2 of them for the SNAT case of Boundary NTP.
- Add a test that the full blueprint with multiple addresses round-trips through the database.
- Planner still emits exactly one address in all these cases, this is only the structural change to support multiple addresses.
- Update lockstep OpenAPI docs
36eb2df to
3a6bc8d
Compare
- Add support for multiple EIPs to the blueprint zone types for Nexus, External DNS, and Boundary NTP zones. - Add some newtypes and wrappers to support lists of these or up to 2 of them for the SNAT case of Boundary NTP. - Add a test that the full blueprint with multiple addresses round-trips through the database. - Planner still emits exactly one address in all these cases, this is only the structural change to support multiple addresses. - Update lockstep OpenAPI docs - Closes #9288
3a6bc8d to
9c66fa5
Compare
- Check uniqueness of external IP UUIDs too in container types - Ensure entire set of IPs roundtrips to DB, not just the new one added later. - Check any number of already-allocated EIPs for a zone when checking if it's already been allocated, rather than bailing if there is more than one. - Clean up conversion between blueprint -> inventory types, and simplify proptests - Misc comment cleanup, clarity, typos, etc, regenerate OpenAPI doc
- Fixup test catching bad reallocations of the same EIP by ID - Support multiple IPs per zone in the `OmicronZoneNetworkResources` type. Loosen one of the internal maps from a three-key to two-key, enforcing only uniqueness of the IP and its ID, so that we can have multiple entries per zone. Add an explicit unit test for that.
Have the sled-agent populate all the private IP addresses an External DNS zone needs in the sled-agent, to back all of its external IPs.
jgallagher
left a comment
There was a problem hiding this comment.
This all LGTM. I'm okay approving, but would like to give Dave a chance to look at this if time allows. I'm a little nervous I'm missing something that may bite us when we go to use this, but (a) I don't have anything specific to point to and (b) if we did miss anything I think we can probably fix it when we discover it.
With the changes on just this branch, could we add or extend any of the existing reconfigurator tests to exercise multiple IPs? Or do we need more changes to the planner get to that point?
I think we need to change the planner. I have the next branch in my chain lined up, in which |
I like this idea. It's not much more work than this, and will be a good bit safer. I'll take it for a spin. |
| "dns_address", | ||
| "astring", | ||
| private_dns_address, | ||
| private_dns_addresses, |
There was a problem hiding this comment.
Reasoning out loud:
- This is fine if there's only one IP address, regardless of whether the DNS image predates or postdates Listen on multiple addresses in the DNS server(s) #11207.
- This is fine if there's multiple addresses as long as the DNS image postdates Listen on multiple addresses in the DNS server(s) #11207.
- I'm not sure what this would do if there's multiple IPs and the image predates Listen on multiple addresses in the DNS server(s) #11207. I imagine we think that's impossible because in order to have multiple IPs set, you need to have updated to a target release that supports that, and that's necessarily post-11207?
I can't think of a way for this to go wrong (that's not pretty out-of-bounds, like a backwards MUPdate), but it does make me nervous. I don't have any suggestions though!
There was a problem hiding this comment.
This was my conclusion. You could only have multiple addresses here if Nexus has been updated to include this PR, which is after 11207. So all the zones have to be updated first, and in that case, even if they're the old zone image that supports 1 IP and the sled-agent supports multiple, the actual zone configuration can only have one IP in the plan.
I agree that we should figure out how to minimize these inter-zone dependencies. I think Nexus does a pretty good job in this regard, since it has a configuration file we deserialize into a defined Rust type. Using these CLI arguments, especially through SMF properties, feels pretty fraught to me.
| } | ||
| } | ||
|
|
||
| impl std::cmp::Ord for OmicronZoneExternalFloatingIps { |
There was a problem hiding this comment.
It does seem kind of weird to define an ordering between two sets of things. I'd be inclined to remove it but I guess it depends on what consumer needs it.
The parent container I agree it's a bit odd. I also think we need it if we want to (1) internally use an |
- Use richer type for returning a zone's external networking data, update callers - Drop unnecessary Cow - Comment cleanup
|
Thanks @davepacheco and @jgallagher. I think I've addressed everything except for the implementation of |
…blueprint-zone-types
For |
|
Thanks @davepacheco, that makes sense. I can make a follow-up issue, if that's helpful? And LMK if you have other thoughts on the PR at this point. |