Skip to content

Commit 4a456c9

Browse files
rcgoodfellowinternet-diglettjgallagher
authored
ipv6 e2e integration (#9570)
This PR pulls in various IPv6 work. The biggest code changes revolve around integrating new Maghemite APIs around IPv6 peers and unnumbered peers. This has meant changing data structures in the rack initialize API. Before this PR, the rack initialize API was in the client-side versioned bootstrap API. This makes it impossible to change. However, it was observed that the only client of the rack initialize API is wicketd, essentially making the three API endpoints under `rack-initailize` lockstep. With that in mind, the rack initialize endpoints have been factored out as a lockstep API, and a new version of the bootstrap client side API has been created that deprecates use of rack-initialize. Another tricky aspect of changing these data structures is that they are in the boot store. In particular we are changing the BGP peer member from an `Ipv4Addr` to an `IpAddr`. This `should` be a bootstore backwards compatible change, but testing is required to ensure it is. Remaining work items: - [x] External API updates for IPv6 BGP peers - [x] External API updates for unnumbered BPG peers - [x] Wicket updates for IPv6 BGP peers - [x] Wicket updates for unnumbered BGP peers Functional milestones: - [x] Passing CI - [x] Bring up a4x2 with BGP unnumbered peering confirming - [x] session establishment - [x] ipv4 prefix exchange - [x] ipv6 prefix exchange - [x] working ipv4 probes - [x] working ipv6 probes - [x] Bring in asilomar racklette environment - [x] session establishment - [x] ipv4 prefix exchange - [x] ipv6 prefix exchange - [x] working ipv4 instance comms - [x] working ipv6 instance comms Depends on - oxidecomputer/opte#902 - oxidecomputer/opte#905 - oxidecomputer/dendrite#175 - oxidecomputer/maghemite#585 - #9508 - oxidecomputer/maghemite#584 - oxidecomputer/maghemite#598 - oxidecomputer/dendrite#216 --------- Co-authored-by: Levon Tarver <levon@oxide.computer> Co-authored-by: John Gallagher <john@oxidecomputer.com>
1 parent aa12b67 commit 4a456c9

File tree

120 files changed

+49381
-2392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+49381
-2392
lines changed

Cargo.lock

Lines changed: 49 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ members = [
88
"clickhouse-admin/test-utils",
99
"clickhouse-admin/types/versions",
1010
"clients/bootstrap-agent-client",
11+
"clients/bootstrap-agent-lockstep-client",
1112
"clients/clickhouse-admin-keeper-client",
1213
"clients/clickhouse-admin-server-client",
1314
"clients/clickhouse-admin-single-client",
@@ -134,6 +135,7 @@ members = [
134135
"sled-agent",
135136
"sled-agent/api",
136137
"sled-agent/bootstrap-agent-api",
138+
"sled-agent/bootstrap-agent-lockstep-api",
137139
"sled-agent/config-reconciler",
138140
"sled-agent/health-monitor",
139141
"sled-agent/measurements",
@@ -179,6 +181,7 @@ default-members = [
179181
"clickhouse-admin/types/versions",
180182
"clickhouse-admin/test-utils",
181183
"clients/bootstrap-agent-client",
184+
"clients/bootstrap-agent-lockstep-client",
182185
"clients/clickhouse-admin-keeper-client",
183186
"clients/clickhouse-admin-server-client",
184187
"clients/clickhouse-admin-single-client",
@@ -307,6 +310,7 @@ default-members = [
307310
"sled-agent",
308311
"sled-agent/api",
309312
"sled-agent/bootstrap-agent-api",
313+
"sled-agent/bootstrap-agent-lockstep-api",
310314
"sled-agent/config-reconciler",
311315
"sled-agent/health-monitor",
312316
"sled-agent/measurements",
@@ -405,7 +409,9 @@ bcs = "0.1.6"
405409
bincode = "1.3.3"
406410
bootstore = { path = "bootstore" }
407411
bootstrap-agent-api = { path = "sled-agent/bootstrap-agent-api" }
412+
bootstrap-agent-lockstep-api = { path = "sled-agent/bootstrap-agent-lockstep-api" }
408413
bootstrap-agent-client = { path = "clients/bootstrap-agent-client" }
414+
bootstrap-agent-lockstep-client = { path = "clients/bootstrap-agent-lockstep-client" }
409415
buf-list = { version = "1.0.3", features = ["tokio1"] }
410416
byteorder = "1.5.0"
411417
bytes = "1.10.1"
@@ -466,7 +472,7 @@ digest = "0.10.7"
466472
dns-server = { path = "dns-server" }
467473
dns-server-api = { path = "dns-server-api" }
468474
dns-service-client = { path = "clients/dns-service-client" }
469-
dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "7a66c1b2415122b821611fd51012032a03e14ada" }
475+
dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "37992295b5dc708d8f120cee805d67418741b556" }
470476
dropshot = { version = "0.16.6", features = [ "usdt-probes" ] }
471477
dropshot-api-manager = "0.2.4"
472478
dropshot-api-manager-types = "0.2.4"
@@ -570,8 +576,8 @@ ntp-admin-api = { path = "ntp-admin/api" }
570576
ntp-admin-client = { path = "clients/ntp-admin-client" }
571577
ntp-admin-types = { path = "ntp-admin/types" }
572578
ntp-admin-types-versions = { path = "ntp-admin/types/versions" }
573-
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "3abfb8eb7f6d4ca4658981b4a7a76759a0a3f8ec" }
574-
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "3abfb8eb7f6d4ca4658981b4a7a76759a0a3f8ec" }
579+
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "8f5527da3c53398c95c50b1af088637e7b6c5718" }
580+
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "8f5527da3c53398c95c50b1af088637e7b6c5718" }
575581
multimap = "0.10.1"
576582
nexus-auth = { path = "nexus/auth" }
577583
nexus-background-task-interface = { path = "nexus/background-task-interface" }
@@ -701,7 +707,7 @@ rats-corim = { git = "https://github.com/oxidecomputer/rats-corim.git", rev = "f
701707
raw-cpuid = { git = "https://github.com/oxidecomputer/rust-cpuid.git", rev = "a4cf01df76f35430ff5d39dc2fe470bcb953503b" }
702708
rayon = "1.10"
703709
rcgen = "0.12.1"
704-
rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "3abfb8eb7f6d4ca4658981b4a7a76759a0a3f8ec" }
710+
rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "8f5527da3c53398c95c50b1af088637e7b6c5718" }
705711
reconfigurator-cli = { path = "dev-tools/reconfigurator-cli" }
706712
reedline = "0.40.0"
707713
ref-cast = "1.0"

clients/bootstrap-agent-client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! Interface for making API requests to a Bootstrap Agent
66
77
progenitor::generate_api!(
8-
spec = "../../openapi/bootstrap-agent/bootstrap-agent-1.0.0-127591.json",
8+
spec = "../../openapi/bootstrap-agent/bootstrap-agent-2.0.0-632b71.json",
99
interface = Positional,
1010
inner_type = slog::Logger,
1111
pre_hook = (|log: &slog::Logger, request: &reqwest::Request| {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[package]
2+
name = "bootstrap-agent-lockstep-client"
3+
version = "0.1.0"
4+
edition.workspace = true
5+
license = "MPL-2.0"
6+
7+
[lints]
8+
workspace = true
9+
10+
[dependencies]
11+
omicron-common.workspace = true
12+
omicron-uuid-kinds.workspace = true
13+
omicron-workspace-hack.workspace = true
14+
oxnet.workspace = true
15+
progenitor.workspace = true
16+
regress.workspace = true
17+
reqwest.workspace = true
18+
schemars.workspace = true
19+
serde.workspace = true
20+
serde_json.workspace = true
21+
sled-hardware-types.workspace = true
22+
slog.workspace = true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4+
5+
//! Interface for making API requests to the Bootstrap Agent Lockstep API
6+
7+
progenitor::generate_api!(
8+
spec = "../../openapi/bootstrap-agent-lockstep.json",
9+
interface = Positional,
10+
inner_type = slog::Logger,
11+
pre_hook = (|log: &slog::Logger, request: &reqwest::Request| {
12+
slog::debug!(log, "client request";
13+
"method" => %request.method(),
14+
"uri" => %request.url(),
15+
"body" => ?&request.body(),
16+
);
17+
}),
18+
post_hook = (|log: &slog::Logger, result: &Result<_, _>| {
19+
slog::debug!(log, "client response"; "result" => ?result);
20+
}),
21+
derives = [schemars::JsonSchema],
22+
crates = {
23+
"omicron-uuid-kinds" = "*",
24+
"oxnet" = "0.1.0",
25+
},
26+
replace = {
27+
AllowedSourceIps = omicron_common::api::external::AllowedSourceIps,
28+
Baseboard = sled_hardware_types::Baseboard,
29+
ImportExportPolicy = omicron_common::api::external::ImportExportPolicy,
30+
},
31+
);
32+
33+
impl omicron_common::api::external::ClientError for types::Error {
34+
fn message(&self) -> String {
35+
self.message.clone()
36+
}
37+
}

clients/sled-agent-client/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ progenitor::generate_api!(
3232
BfdPeerConfig = { derives = [Eq, Hash] },
3333
BgpConfig = { derives = [Eq, Hash] },
3434
BgpPeerConfig = { derives = [Eq, Hash] },
35+
MaxPathConfig = { derives = [Eq, Hash] },
3536
LldpPortConfig = { derives = [Eq, Hash, PartialOrd, Ord] },
3637
TxEqConfig = { derives = [Eq, Hash] },
3738
OmicronPhysicalDiskConfig = { derives = [Eq, Hash, PartialOrd, Ord] },
38-
PortConfigV2 = { derives = [Eq, Hash] },
39+
PortConfig = { derives = [Eq, Hash] },
3940
RouteConfig = { derives = [Eq, Hash] },
41+
RouterLifetimeConfig = { derives = [Eq, Hash] },
4042
UplinkAddressConfig = { derives = [Eq, Hash] },
4143
VirtualNetworkInterfaceHost = { derives = [Eq, Hash] },
4244
},

0 commit comments

Comments
 (0)