Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4cc6222
a sketch of dynamic external ddm peers
rcgoodfellow Sep 11, 2026
bad4ba1
linux chores
rcgoodfellow Sep 11, 2026
6743700
plumb ddmadm
rcgoodfellow Sep 11, 2026
671c90b
dynamic peer shutdown logic
rcgoodfellow Sep 11, 2026
d91e8be
test environment for external peers, various fixes
rcgoodfellow Sep 12, 2026
7a25f46
add tests, fix things uncovered by tests
rcgoodfellow Sep 13, 2026
747d7ba
add combinatorial tests and fix what that surfaced
rcgoodfellow Sep 13, 2026
d1bf043
add GET endpoint for external peers
rcgoodfellow Sep 13, 2026
bf29b37
plumb stats so they work with dynamic external peers
rcgoodfellow Sep 13, 2026
43a8b77
add redistribution tests and fix issues they uncovered
rcgoodfellow Sep 14, 2026
9eea2ce
allow routes on qsfp through to dpd
rcgoodfellow Sep 14, 2026
b900076
limit ext peer removal to ext interfaces, plumb tunables
rcgoodfellow Sep 15, 2026
2ea011a
check for new peers in exchange/init
rcgoodfellow Sep 15, 2026
3d29fe5
remove dupe event channels vec at handler ctx level
rcgoodfellow Sep 15, 2026
e9478de
more tunable plumbing
rcgoodfellow Sep 15, 2026
ddb1989
linux bs
rcgoodfellow Sep 15, 2026
20cfcc3
plumb dendrite tunable
rcgoodfellow Sep 15, 2026
ea4f02d
reject external peers api calls for non-transit routers
rcgoodfellow Sep 15, 2026
067205a
exchange: don't hold lock across underlying tokio ops
rcgoodfellow Sep 15, 2026
257b0e9
extend reach tests to include transit routers
rcgoodfellow Sep 15, 2026
9be4cdb
test that all nexthops are peers
rcgoodfellow Sep 15, 2026
4ba4c1f
close possible shutdown race with pull threads
rcgoodfellow Sep 15, 2026
999fdd6
nicolas' feedback
rcgoodfellow Sep 17, 2026
886ee97
log loop breaking, PUSH->PUT, use sled id as router id
rcgoodfellow Sep 17, 2026
26fcf26
ddmadm: path element per line
rcgoodfellow Sep 17, 2026
182a8df
add an explicit router-id parameter to ddmd
rcgoodfellow Sep 19, 2026
23b7c04
:facepalm:
rcgoodfellow Sep 19, 2026
e34fe56
ajs feeback
rcgoodfellow Sep 28, 2026
d2bfae3
trey's feedback
rcgoodfellow Oct 2, 2026
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
18 changes: 18 additions & 0 deletions .github/buildomat/jobs/test-ddm-sextet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
#:
#: name = "test-ddm-sextet"
#: variety = "basic"
#: target = "helios-3.0"
#: rust_toolchain = "stable"
#: output_rules = [
#: "/work/*.log",
#: ]

source .github/buildomat/test-ddm-common.sh

#
# sextet tests
#

banner "sextet"
pfexec cargo test --release -p mg-tests test_external_peer_sextet -- --nocapture
5 changes: 4 additions & 1 deletion Cargo.lock

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

1 change: 1 addition & 0 deletions ddm-admin-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ progenitor::generate_api!(
PeerInfo = ddm_api_types_versions::latest::db::PeerInfo,
PeerStatus = ddm_api_types_versions::latest::db::PeerStatus,
Duration = std::time::Duration,
ExternalPeers = ddm_api_types_versions::latest::external_peers::ExternalPeers,
}
);
5 changes: 5 additions & 0 deletions ddm-api-types/src/external_peers.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// 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/.

pub use ddm_api_types_versions::latest::external_peers::*;
1 change: 1 addition & 0 deletions ddm-api-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
pub mod admin;
pub mod db;
pub mod exchange;
pub mod external_peers;
pub mod net;
12 changes: 12 additions & 0 deletions ddm-api-types/versions/src/external_peers/external_peers.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 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/.

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::collections::BTreeSet;

#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, PartialEq, Eq)]
pub struct ExternalPeers {
pub address_objects: BTreeSet<String>,
Comment thread
rcgoodfellow marked this conversation as resolved.
}
5 changes: 5 additions & 0 deletions ddm-api-types/versions/src/external_peers/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// 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/.

pub mod external_peers;
4 changes: 4 additions & 0 deletions ddm-api-types/versions/src/latest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ pub mod exchange {
pub mod net {
pub use crate::v1::net::TunnelOrigin;
}

pub mod external_peers {
pub use crate::v3::external_peers::ExternalPeers;
}
2 changes: 2 additions & 0 deletions ddm-api-types/versions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ pub mod latest;
pub mod v1;
#[path = "peer_durations/mod.rs"]
pub mod v2;
#[path = "external_peers/mod.rs"]
pub mod v3;
20 changes: 20 additions & 0 deletions ddm-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ api_versions!([
// | example for the next person.
// v
// (next_int, IDENT),
(3, EXTERNAL_PEERS),
(2, PEER_DURATIONS),
(1, INITIAL),
]);
Expand Down Expand Up @@ -170,4 +171,23 @@ pub trait DdmAdminApi {
async fn disable_stats(
ctx: RequestContext<Self::Context>,
) -> Result<HttpResponseUpdatedNoContent, HttpError>;

#[endpoint {
method = PUT,
path = "/external_peers",
versions = VERSION_EXTERNAL_PEERS..,
}]
async fn set_external_peers(
ctx: RequestContext<Self::Context>,
request: TypedBody<latest::external_peers::ExternalPeers>,
) -> Result<HttpResponseUpdatedNoContent, HttpError>;

#[endpoint {
method = GET,
path = "/external_peers",
versions = VERSION_EXTERNAL_PEERS..,
}]
async fn get_external_peers(
ctx: RequestContext<Self::Context>,
) -> Result<HttpResponseOk<latest::external_peers::ExternalPeers>, HttpError>;
}
11 changes: 11 additions & 0 deletions ddm-protocol/src/v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@ impl UnderlayUpdate {
.collect(),
}
}
pub fn break_loops(&self, hostname: &String) -> Self {
Self {
announce: self
.announce
.iter()
.filter(|x| !x.path.contains(hostname))
.cloned()
.collect(),
withdraw: self.withdraw.clone(),
}
}
}

impl From<UnderlayUpdate> for Update {
Expand Down
4 changes: 2 additions & 2 deletions ddm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ oximeter-producer.workspace = true
oxnet.workspace = true
uuid.workspace = true
ddm-api.workspace = true
dpd-client.workspace = true

# illumos-only deps used by the routing state machine and platform sys layer.
# Gated by the `backend` feature so stub builds (e.g. Linux test fixtures
# running `ddmd` with `--api-only`) link cleanly.
libnet = { workspace = true, optional = true }
dpd-client = { workspace = true, optional = true }
opte-ioctl = { workspace = true, optional = true }
oxide-vpc = { workspace = true, optional = true }

[features]
default = ["backend"]
backend = ["dep:libnet", "dep:dpd-client", "dep:opte-ioctl", "dep:oxide-vpc"]
backend = ["dep:libnet", "dep:opte-ioctl", "dep:oxide-vpc"]
Loading