Repository navigation
OPTE ports for external services connectivity. - #2857
Conversation
|
FWIW I'm deploying this to the Canada region to test this. Note that I'm still running with an opte that includes oxidecomputer/opte#347 , so that I potentially don't hit the same scenario. |
leftwo
left a comment
There was a problem hiding this comment.
I got as far as sled-agent/src/rack_setup/plan/service.rs but thought I would send you some questions now and then go back and read the rest.
f3c673b to
7d7a6de
Compare
f755b85 to
8e1433d
Compare
7d7a6de to
cb52630
Compare
6dcf941 to
e143db4
Compare
If but not the instance. They're also not responded to by OPTE. Note: in the above case, the internal services IP pool range is |
Thanks for testing that out! Glad to see IPv4 is working as expected for not just me 😄️ For the IPv6 stuff, I was hoping it would just work (TM) but alas too much to hope. Given we said IPv6 here wasn't necessary in a network sync like 2 weeks back, I'm inclined to say it's not a blocker for this. |
|
Glad to test :) I also observed the following (in the opposite direction, the original IPv6 post was about NS from outside in). The zone does neighbour advertisement over its This leaves the sled (fd00:1122:3344:103::1) GENEVE encapsulated, destined for boundary services (fd03:1122:3344:101::15): and (admittedly my Canada region fake) boundary service decaps it: but note the target is If I add but the zone doesn't respond. This may be due to its Nope, still doesn't respond to the ping. I'm very much at the limit of my (not a lot of) IPv6 knowledge so I'm probably missing something to do with neighbour advertisements and solicitations, but the original zone advertisement being for the zone's internal ipv6 and not the external ipv6 looked off to me. |
|
I think we probably need to drop most NDP traffic to/from the port. Conceptually, OPTE is supposed to act like the only other link on the local network with the port. There shouldn't be any other neighbors, and nothing should see this port as a neighbor either. That means the "guest" should not see any NAs besides OPTEs, nor should OPTE transit any NSs from the guest (or RSs, though downstream routers are supposed to ignore that if the hop-limit isn't 255). Right now we're:
This may have been missed in the changes that made most layers drop packets with no match by default? I'm not sure. @luqmana thoughts on this? |
e143db4 to
8b7d005
Compare
|
That lines up with my understanding. In a guest or zone with OPTE, other than the "gateway", everything else should be considered off-link. OPTE will handle the NAT-ing between private VPC and external IPs. We also configure the switch with (separate) NAT entries for mapping a given external IP and port range to a specific Sled & VPC [1]. I believe Boundary Services is the one responsible for advertising the external IPs to the broader customer network (unsure of details here). In a local dev context with SoftNPU where we just carve out a portion of the LAN we perform Proxy ARP today (but not for NDP!). [1] SoftNPU currently silently fails on adding these. |
8b7d005 to
fb21daa
Compare
|
With the |
fb21daa to
97e964e
Compare
|
|
||
| lazy_static::lazy_static! { | ||
| /// The IPv6 prefix assigned to the built-in services VPC. | ||
| pub static ref SERVICE_VPC_IPV6_PREFIX: Ipv6Net = Ipv6Net( |
There was a problem hiding this comment.
This doesn't seem to be used (at least git grep didn't find it).
There was a problem hiding this comment.
I have a follow up where the VPC is actually created in DB where it gets used.
| ); | ||
|
|
||
| /// The IPv4 subnet for External DNS OPTE portsv | ||
| pub static ref DNS_OPTE_IPV4_SUBNET: Ipv4Net = |
There was a problem hiding this comment.
All of these values appear only to be used by the RSS inside sled agent. Could these live there (in sled-agent/src/rack_setup/plan/service.rs), just to scope down the visibility?
There was a problem hiding this comment.
I had these in common because I also wanted to use them while actually creating the VPC & subnet DB records in a follow up change.
There was a problem hiding this comment.
I wonder if it would make sense to have a crate that both RSS and Nexus use, since it seems like those two will share some infrastructure that we don't need everywhere else. I wouldn't consider this a blocker here, more like something to consider as we keep working on these things.
| //! Internally facing APIs. | ||
|
|
||
| pub mod nexus; | ||
| pub mod shared; |
There was a problem hiding this comment.
I think we've been trying to move away from sharing types between client and server in a big "common" package and instead using progenitor-generated types (where that makes sense).
I see these types used to be in illumos-utils, and that makes sense to me. Why move them?
There was a problem hiding this comment.
my local branch uses these types in nexus as well in the nexus handoff to add the corresponding service vnic DB records. So both nexus and sled-agent would then have APIs using these types which I want to stay in-sync.
| })?; | ||
| Ok(String::from_utf8_lossy(&output.stdout) | ||
| .lines() | ||
| .filter_map(|s| s.parse().ok()) |
There was a problem hiding this comment.
Do we expect all of these to parse successfully? Or: is there any reason not to record or report some kind of error if one fails?
There was a problem hiding this comment.
This was mostly cribbed from get_address above but yea, as the output of ipadm show-addr -p -o ADDR all of em should parse.
| ) -> Result<(), SetupServiceError> { | ||
| let log = &self.log; | ||
| // Start up the internal DNS services | ||
| futures::future::join_all(service_plan.services.iter().map( |
There was a problem hiding this comment.
I thought this code must have moved but I don't see from where. How was this working before?
There was a problem hiding this comment.
This method (initialize_dns) was previously called after both the Internal DNS and NTP services were initialized. But I needed DNS while initializing NTP (to lookup dendrite via internal DNS when creating NAT entry) so this method got moved up and also takes care to initialize any internal DNS zones.
|
I took a pass through most of the non-OPTE parts here. It'll take some more time to go through the OPTE parts (if that's useful). I'm much less familiar with that. (As it is, a bunch of this is new to me, so sorry for any ignorant questions!) |
2df972f to
39e488c
Compare
smklein
left a comment
There was a problem hiding this comment.
Looks good to me, especially as this unblocks dogfood. I think there are some follow-ups we can take, and I marked spots where I think it would be nice to have tracking issues, but I don't think they need to block this PR.
Nice work getting this together, integrating this many pieces is a really impressive feat.
| dpd_client | ||
| .nat_ipv4_create( | ||
| ip, | ||
| first_port, | ||
| last_port, | ||
| &nat_target, | ||
| ) | ||
| .await | ||
| } | ||
| IpAddr::V6(ip) => { | ||
| dpd_client | ||
| .nat_ipv6_create( | ||
| ip, | ||
| first_port, | ||
| last_port, | ||
| &nat_target, | ||
| ) | ||
| .await |
There was a problem hiding this comment.
We discussed this a little bit offline, but since calls to dendrite are stateful, we may want to consider placing these in a saga.
There is definitely a chicken-and-egg problem here -- on reboot:
- sled agent needs to be able to program dendrite to give NTP access to external servers...
- ... which is needed to start CRDB
- ... which is needed to start Nexus, which can run other sagas
That specific scenario aside, there may be value in making these calls from a saga, where they can be rolled back on failure. As implemented, if we fail part-way through the for svc in &req.services loop, we'll simply leak these resources.
There was a problem hiding this comment.
(In the interest of time, we can totally punt this to a follow-up PR, but we should track this improvement somehow)
39e488c to
9e4179d
Compare
Update RSS & Sled Agent to configure and create OPTE ports for Nexus, External DNS and Boundary NTP services. Nexus side DB updates in subsequent PR.
Based on #2856.