Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 45 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ members = [
"sled-agent/bootstrap-agent-lockstep-api",
"sled-agent/bootstrap-agent-lockstep-types",
"sled-agent/config-reconciler",
"sled-agent/scrimlet-reconcilers",
"sled-agent/health-monitor",
"sled-agent/measurements",
"sled-agent/rack-setup",
Expand Down Expand Up @@ -333,6 +334,7 @@ default-members = [
"sled-agent/bootstrap-agent-lockstep-api",
"sled-agent/bootstrap-agent-lockstep-types",
"sled-agent/config-reconciler",
"sled-agent/scrimlet-reconcilers",
"sled-agent/health-monitor",
"sled-agent/measurements",
"sled-agent/rack-setup",
Expand Down Expand Up @@ -727,7 +729,7 @@ propolis_api_types = { git = "https://github.com/oxidecomputer/propolis", rev =
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "bc489ddf0f38f75e0c194b86cf6f0de377f68845" }
propolis-mock-server = { git = "https://github.com/oxidecomputer/propolis", rev = "bc489ddf0f38f75e0c194b86cf6f0de377f68845" }
# NOTE: see above!
proptest = "1.7.0"
proptest = "1.11.0"
qorb = "0.4.1"
quote = "1.0"
# Some dependencies still require rand 0.8.x.
Expand Down Expand Up @@ -792,6 +794,7 @@ sled-agent-config-reconciler = { path = "sled-agent/config-reconciler" }
sled-agent-health-monitor = { path = "sled-agent/health-monitor" }
sled-agent-measurements = { path = "sled-agent/measurements" }
sled-agent-rack-setup = { path = "sled-agent/rack-setup" }
sled-agent-scrimlet-reconcilers = { path = "sled-agent/scrimlet-reconcilers" }
sled-agent-types = { path = "sled-agent/types" }
sled-agent-types-versions = { path = "sled-agent/types/versions" }
sled-agent-resolvable-files = { path = "sled-agent/resolvable-files" }
Expand Down
36 changes: 36 additions & 0 deletions sled-agent/scrimlet-reconcilers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[package]
name = "sled-agent-scrimlet-reconcilers"
version = "0.1.0"
edition.workspace = true
license = "MPL-2.0"

[lints]
workspace = true

[dependencies]
chrono.workspace = true
dpd-client.workspace = true
gateway-client.workspace = true
gateway-types.workspace = true
mg-admin-client.workspace = true
omicron-common.workspace = true
reqwest.workspace = true
sled-agent-types.workspace = true
slog.workspace = true
slog-error-chain.workspace = true
thiserror.workspace = true
tokio.workspace = true

omicron-workspace-hack.workspace = true

[dev-dependencies]
assert_matches.workspace = true
dropshot.workspace = true
gateway-messages.workspace = true
gateway-test-utils.workspace = true
httpmock.workspace = true
omicron-test-utils.workspace = true
serde_json.workspace = true

[features]
testing = []
48 changes: 48 additions & 0 deletions sled-agent/scrimlet-reconcilers/src/dpd_reconciler.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Reconciler responsible for configuration of `dpd` within a scrimlet's switch
//! zone.

use crate::handle::ScrimletReconcilersMode;
use crate::reconciler_task::Reconciler;
use crate::switch_zone_slot::ThisSledSwitchSlot;
use dpd_client::Client;
use sled_agent_types::system_networking::SystemNetworkingConfig;
use slog::Logger;
use std::time::Duration;

#[derive(Debug, Clone)]
pub struct DpdReconcilerStatus {
pub todo_status: (),
}

#[derive(Debug)]
pub(crate) struct DpdReconciler {
_client: Client,
_switch_slot: ThisSledSwitchSlot,
}

impl Reconciler for DpdReconciler {
type Status = DpdReconcilerStatus;

const LOGGER_COMPONENT_NAME: &'static str = "DpdReconciler";
const RE_RECONCILE_INTERVAL: Duration = Duration::from_secs(30);

fn new(
mode: ScrimletReconcilersMode,
switch_slot: ThisSledSwitchSlot,
parent_log: &Logger,
) -> Self {
Self { _client: mode.dpd_client(parent_log), _switch_slot: switch_slot }
}

async fn do_reconciliation(
&mut self,
_system_networking_config: &SystemNetworkingConfig,
_log: &Logger,
) -> Self::Status {
DpdReconcilerStatus { todo_status: () }
}
}
Loading
Loading