Introduce sled-agent-scrimlet-reconcilers crate#10313
Introduce sled-agent-scrimlet-reconcilers crate#10313jgallagher wants to merge 10 commits intomainfrom
sled-agent-scrimlet-reconcilers crate#10313Conversation
|
Working on getting through this review today |
| } | ||
|
|
||
| async fn determine_switch_slot( | ||
| running_reconcilers: Arc<OnceLock<RunningReconcilers>>, |
There was a problem hiding this comment.
TIL about OnceLock
internet-diglett
left a comment
There was a problem hiding this comment.
LGTM. I understand this is just a skeleton, but I wanted to ask about one of the config bits just in case:
I noticed the initial implementation relies on hard coded port numbers. If we're running these reconcilers inside of integration tests we might need a way to inject the correct port numbers. This will also be necessary if the reconcilers are going to work in #9533 (we will be expecting that any config changes made via the operator APIs will eventually show up on mgd, dpd, etc.)
Is this something you are already accounting for with this design?
We chatted about this live. Tentative plan:
|
Bullet one is done in 7eeaf1d; instead of always taking a switch zone underlay IP, tests can now instead pass a set of Bullet two is future work once we start integrating this, but hopefully we now have the tools to handle it. Bullet three is (mostly) done in 885b6c5 - I kept httpmock for some of the failure path tests, but the happy path tests now spin up a real MGS. |
This is groundwork for #10167, and introduces the skeleton of network config reconcilers for use within sled-agent. None of this is wired up yet and all the service-specific reconcilers are placeholders, but it does have the real setup for how these tasks get started and how they report status.
The PR is pretty big but hopefully not too bad to review; more than half the code falls into either "tests", "status type definitions", or "placeholder/dummy reconcilers". A tentative suggestion for review order is:
lib.rs; these are written assuming Tracking issue: Moving system-level networking reconciliation from Nexus to sled-agent #10167 is complete, not based on the current state of the crate.handle.rs, particularlyScrimletReconcilers- this is the entry point for sled-agent. It will hold aScrimletReconcilersin its set of long-running tasks.reconciler_task.rs- this implements the common control flow for all of the service-specific reconcilers in the crate; handling periodic reactivation, activation when the config changes, transitioning to inert if we stop being a scrimlet because the sidecar goes away at runtime, and transitioning out of inert if it comes back.The only production-affecting change here is that theEdit: As of #10340,ThisSledSwitchZoneUnderlayIpAddrtype moved out of sled-agent and into this crate, so sled-agent depends on this crate just for that type.ThisSledSwitchZoneUnderlayIpAddrhas moved tosled-agent-types, so now this PR uses it from there and makes no changes to sled-agent proper.