From a0eecb4bca2bbd68f53483394b42a14fb7a496b7 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Wed, 11 Mar 2026 08:27:42 +0000 Subject: [PATCH 1/5] multicast e2e: merge main, update dendrite to multicast-e2e branch --- Cargo.lock | 30 +++++++++++----------- Cargo.toml | 2 +- nexus/Cargo.toml | 1 + nexus/tests/integration_tests/instances.rs | 2 -- package-manifest.toml | 12 ++++----- tools/dendrite_stub_checksums | 6 ++--- tools/dendrite_version | 2 +- 7 files changed, 27 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 52e933fb6b9..192a671c70a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1718,10 +1718,11 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?rev=c0bf0a3b536baab0393c96fec3204b32e4f9368b#c0bf0a3b536baab0393c96fec3204b32e4f9368b" +source = "git+https://github.com/oxidecomputer/dendrite?rev=cc8e02a0800034c431c8cf96b889ea638da3d194#cc8e02a0800034c431c8cf96b889ea638da3d194" dependencies = [ "anyhow", "chrono", + "oximeter 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "oxnet", "rand 0.9.2", "schemars 0.8.22", @@ -1739,11 +1740,10 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?rev=cc8e02a0800034c431c8cf96b889ea638da3d194#cc8e02a0800034c431c8cf96b889ea638da3d194" +source = "git+https://github.com/oxidecomputer/dendrite?rev=e8a68118b5c2333f586d9bdcc4a1f63f2db98631#e8a68118b5c2333f586d9bdcc4a1f63f2db98631" dependencies = [ "anyhow", "chrono", - "oximeter 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "oxnet", "rand 0.9.2", "schemars 0.8.22", @@ -3047,18 +3047,18 @@ dependencies = [ [[package]] name = "dpd-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?rev=c0bf0a3b536baab0393c96fec3204b32e4f9368b#c0bf0a3b536baab0393c96fec3204b32e4f9368b" +source = "git+https://github.com/oxidecomputer/dendrite?rev=cc8e02a0800034c431c8cf96b889ea638da3d194#cc8e02a0800034c431c8cf96b889ea638da3d194" dependencies = [ "async-trait", "chrono", - "common 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=c0bf0a3b536baab0393c96fec3204b32e4f9368b)", + "common 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=cc8e02a0800034c431c8cf96b889ea638da3d194)", "crc8", "futures", "http", "oxnet", - "progenitor 0.13.0", + "progenitor 0.11.2", "regress", - "reqwest 0.13.2", + "reqwest 0.12.28", "schemars 0.8.22", "serde", "serde_json", @@ -3071,18 +3071,18 @@ dependencies = [ [[package]] name = "dpd-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?rev=cc8e02a0800034c431c8cf96b889ea638da3d194#cc8e02a0800034c431c8cf96b889ea638da3d194" +source = "git+https://github.com/oxidecomputer/dendrite?rev=e8a68118b5c2333f586d9bdcc4a1f63f2db98631#e8a68118b5c2333f586d9bdcc4a1f63f2db98631" dependencies = [ "async-trait", "chrono", - "common 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=cc8e02a0800034c431c8cf96b889ea638da3d194)", + "common 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=e8a68118b5c2333f586d9bdcc4a1f63f2db98631)", "crc8", "futures", "http", "oxnet", - "progenitor 0.11.2", + "progenitor 0.13.0", "regress", - "reqwest 0.12.28", + "reqwest 0.13.2", "schemars 0.8.22", "serde", "serde_json", @@ -7537,7 +7537,7 @@ dependencies = [ "crucible-agent-client", "dns-server", "dns-service-client", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=c0bf0a3b536baab0393c96fec3204b32e4f9368b)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=e8a68118b5c2333f586d9bdcc4a1f63f2db98631)", "dropshot", "futures", "gateway-messages", @@ -8488,7 +8488,7 @@ dependencies = [ "display-error-chain", "dns-server", "dns-service-client", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=c0bf0a3b536baab0393c96fec3204b32e4f9368b)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=e8a68118b5c2333f586d9bdcc4a1f63f2db98631)", "dropshot", "ereport-types", "expectorate", @@ -16569,7 +16569,7 @@ name = "wicket-common" version = "0.1.0" dependencies = [ "anyhow", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=c0bf0a3b536baab0393c96fec3204b32e4f9368b)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=e8a68118b5c2333f586d9bdcc4a1f63f2db98631)", "dropshot", "gateway-client", "gateway-types", @@ -16631,7 +16631,7 @@ dependencies = [ "clap", "debug-ignore", "display-error-chain", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=c0bf0a3b536baab0393c96fec3204b32e4f9368b)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=e8a68118b5c2333f586d9bdcc4a1f63f2db98631)", "dropshot", "either", "expectorate", diff --git a/Cargo.toml b/Cargo.toml index 9656dfac4fe..36be80c3388 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -477,7 +477,7 @@ digest = "0.10.7" dns-server = { path = "dns-server" } dns-server-api = { path = "dns-server-api" } dns-service-client = { path = "clients/dns-service-client" } -dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "c0bf0a3b536baab0393c96fec3204b32e4f9368b" } +dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "e8a68118b5c2333f586d9bdcc4a1f63f2db98631", features = ["multicast"] } dropshot = { version = "0.16.6", features = [ "usdt-probes" ] } dropshot-api-manager = "0.6.0" dropshot-api-manager-types = "0.6.0" diff --git a/nexus/Cargo.toml b/nexus/Cargo.toml index 757229a1b4f..78ed03ef025 100644 --- a/nexus/Cargo.toml +++ b/nexus/Cargo.toml @@ -8,6 +8,7 @@ license = "MPL-2.0" workspace = true [features] +default = ["multicast"] multicast = [] [build-dependencies] diff --git a/nexus/tests/integration_tests/instances.rs b/nexus/tests/integration_tests/instances.rs index d7aff8ca5a5..38d8e80b948 100644 --- a/nexus/tests/integration_tests/instances.rs +++ b/nexus/tests/integration_tests/instances.rs @@ -9015,8 +9015,6 @@ pub async fn instance_simulate(nexus: &Arc, id: &InstanceUuid) { /// /// Returns an error instead of panicking if the sled agent communication fails. /// This is useful during test cleanup where the sled agent may be unavailable. -// This is currently only consumed by tests behind the multicast feature gate. -// If/when it has another consumer, this cfg can be removed. #[cfg(feature = "multicast")] pub async fn try_instance_simulate( nexus: &Arc, diff --git a/package-manifest.toml b/package-manifest.toml index 7a911a23824..e3d62ce3770 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -748,8 +748,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "c0bf0a3b536baab0393c96fec3204b32e4f9368b" -source.sha256 = "28a7670be35a68ff3e52b3e5e57f4fa6b8465e3ec8a21314b09381fb213d3a3e" +source.commit = "e8a68118b5c2333f586d9bdcc4a1f63f2db98631" +source.sha256 = "cb5da43fe43e34adc627a8659cf8fc4474d87a8bac02d423530553a337d1e76e" output.type = "zone" output.intermediate_only = true @@ -775,8 +775,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "c0bf0a3b536baab0393c96fec3204b32e4f9368b" -source.sha256 = "8070af15f48316ace21e6bb339ba4a1fb2219256a9a017cdbe85505f66aa08ad" +source.commit = "e8a68118b5c2333f586d9bdcc4a1f63f2db98631" +source.sha256 = "2095a9ce8a4a390a5fc8dda557483e50de8ec20c41cfe9d16ac3ab02765432b5" output.type = "zone" output.intermediate_only = true @@ -795,8 +795,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "c0bf0a3b536baab0393c96fec3204b32e4f9368b" -source.sha256 = "69018db9c5f2d8878a8bc8dec26049679e8ece0e7d66e742c2e573c3484f8c29" +source.commit = "e8a68118b5c2333f586d9bdcc4a1f63f2db98631" +source.sha256 = "8343db98c696bcab03617010d0c4b57893cc511480b9201a9f9a62fa304e9fb8" output.type = "zone" output.intermediate_only = true diff --git a/tools/dendrite_stub_checksums b/tools/dendrite_stub_checksums index a02ab52969c..812634b5d1f 100644 --- a/tools/dendrite_stub_checksums +++ b/tools/dendrite_stub_checksums @@ -1,3 +1,3 @@ -CIDL_SHA256_ILLUMOS="28a7670be35a68ff3e52b3e5e57f4fa6b8465e3ec8a21314b09381fb213d3a3e" -CIDL_SHA256_LINUX_DPD="c68ea190f27e9526aa1fba1cc9d1416778d536c805c53c469ee62f603cc433fb" -CIDL_SHA256_LINUX_SWADM="a2826dbdb9b3001cf35756e6ae77dbc9f43a5732932528a0b7cf482d0e0cb237" +CIDL_SHA256_ILLUMOS="cb5da43fe43e34adc627a8659cf8fc4474d87a8bac02d423530553a337d1e76e" +CIDL_SHA256_LINUX_DPD="d77fbe37f4ac0ccd302798030f5963b8299fa6b140e7be143e76eb9bb837eace" +CIDL_SHA256_LINUX_SWADM="951b581f8b4915a8fe41867d26685a7c527099231690195157599516e685ce67" diff --git a/tools/dendrite_version b/tools/dendrite_version index 55fbd266038..dd79bb431eb 100644 --- a/tools/dendrite_version +++ b/tools/dendrite_version @@ -1 +1 @@ -COMMIT="c0bf0a3b536baab0393c96fec3204b32e4f9368b" +COMMIT="e8a68118b5c2333f586d9bdcc4a1f63f2db98631" From a74169767c078788acf93bf9b2de2f3cf064c1cb Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 16 Mar 2026 23:04:36 -0400 Subject: [PATCH 2/5] [multicast] add omdb mcast commands for groups, members, pools (#9464) This PR adds omdb commands to inspect multicast state: - `omdb db multicast groups` - list multicast groups with optional state and pool name filters - `omdb db multicast members` - list group members with filters for group-id, group-name, group-ip, state, and sled-id - `omdb db multicast info` - show detailed info for a specific group - `omdb db multicast pools` - list multicast IP pools We also include: - Background task status display for multicast_reconciler - Integration tests for all multicast omdb commands --- dev-tools/omdb/Cargo.toml | 3 + dev-tools/omdb/src/bin/omdb/db.rs | 30 + dev-tools/omdb/src/bin/omdb/db/multicast.rs | 940 ++++++++++++++++++++ dev-tools/omdb/src/bin/omdb/nexus.rs | 74 ++ dev-tools/omdb/tests/successes.out | 44 +- dev-tools/omdb/tests/test_all_output.rs | 4 + dev-tools/omdb/tests/test_multicast.rs | 728 +++++++++++++++ dev-tools/omdb/tests/usage_errors.out | 37 + nexus/db-schema/src/schema.rs | 6 +- nexus/test-utils/src/resource_helpers.rs | 23 + 10 files changed, 1886 insertions(+), 3 deletions(-) create mode 100644 dev-tools/omdb/src/bin/omdb/db/multicast.rs create mode 100644 dev-tools/omdb/tests/test_multicast.rs diff --git a/dev-tools/omdb/Cargo.toml b/dev-tools/omdb/Cargo.toml index 529daf68238..1848d20b818 100644 --- a/dev-tools/omdb/Cargo.toml +++ b/dev-tools/omdb/Cargo.toml @@ -4,6 +4,9 @@ version = "0.1.0" edition.workspace = true license = "MPL-2.0" +[features] +multicast = [] + [lints] workspace = true diff --git a/dev-tools/omdb/src/bin/omdb/db.rs b/dev-tools/omdb/src/bin/omdb/db.rs index 913efe5acd5..9ae254e297a 100644 --- a/dev-tools/omdb/src/bin/omdb/db.rs +++ b/dev-tools/omdb/src/bin/omdb/db.rs @@ -187,6 +187,7 @@ mod alert; mod blueprints; mod db_metadata; mod ereport; +mod multicast; mod saga; mod sitrep; mod user_data_export; @@ -411,6 +412,8 @@ enum DbCommands { /// Print information about migrations #[clap(alias = "migration")] Migrations(MigrationsArgs), + /// Print information about multicast groups + Multicast(multicast::MulticastArgs), /// Print information about snapshots Snapshots(SnapshotArgs), /// Validate the contents of the database @@ -1420,6 +1423,33 @@ impl DbArgs { }) => { cmd_db_migrations_list(&datastore, &fetch_opts, args).await } + DbCommands::Multicast(multicast::MulticastArgs { + command: multicast::MulticastCommands::Groups(args), + }) => { + multicast::cmd_db_multicast_groups( + &datastore, &fetch_opts, &args, + ) + .await + } + DbCommands::Multicast(multicast::MulticastArgs { + command: multicast::MulticastCommands::Members(args), + }) => { + multicast::cmd_db_multicast_members(&datastore, &fetch_opts, &args) + .await + } + DbCommands::Multicast(multicast::MulticastArgs { + command: multicast::MulticastCommands::Pools, + }) => { + multicast::cmd_db_multicast_pools(&datastore, &fetch_opts).await + } + DbCommands::Multicast(multicast::MulticastArgs { + command: multicast::MulticastCommands::Info(args), + }) => { + multicast::cmd_db_multicast_info( + &datastore, &fetch_opts, &args, + ) + .await + } DbCommands::Snapshots(SnapshotArgs { command: SnapshotCommands::Info(uuid), }) => cmd_db_snapshot_info(&opctx, &datastore, uuid).await, diff --git a/dev-tools/omdb/src/bin/omdb/db/multicast.rs b/dev-tools/omdb/src/bin/omdb/db/multicast.rs new file mode 100644 index 00000000000..68118b2ca80 --- /dev/null +++ b/dev-tools/omdb/src/bin/omdb/db/multicast.rs @@ -0,0 +1,940 @@ +// 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/. + +//! `omdb db multicast` subcommands +//! +//! # Command Outputs +//! +//! ## `omdb db multicast pools` +//! +//! | Column | Description | +//! |---------------|----------------------------| +//! | POOL_ID | Pool UUID | +//! | POOL_NAME | Pool name | +//! | FIRST_ADDRESS | Range start IP | +//! | LAST_ADDRESS | Range end IP | +//! | CREATED | Creation timestamp | +//! +//! ## `omdb db multicast groups` +//! +//! | Column | Description | +//! |--------------|--------------------------------------| +//! | ID | Group UUID | +//! | NAME | Group name | +//! | STATE | Group state ("Active"/"Creating") | +//! | MULTICAST_IP | Allocated multicast IP | +//! | RANGE | ASM or SSM based on IP range | +//! | UNDERLAY_IP | Underlay group IP (blank if none) | +//! | SOURCES | Source allowlist, or "-" (any) | +//! | MEMBERS | Comma-separated "instance@sled" list | +//! | VNI | Virtual network ID | +//! | CREATED | Creation timestamp | +//! +//! Note: SOURCES "-" also appears when a group has no members; use MEMBERS +//! column or `info` command to distinguish from any-source members. +//! +//! Filters: `--state`, `--pool` +//! +//! ## `omdb db multicast members` +//! +//! | Column | Description | +//! |--------------|------------------------------------------| +//! | ID | Member UUID | +//! | GROUP_NAME | Parent group name | +//! | PARENT_ID | Instance UUID | +//! | STATE | Member state ("Joining"/"Joined"/"Left") | +//! | MULTICAST_IP | Group multicast IP | +//! | SOURCES | Source allowlist, or "-" (any) | +//! | SLED_ID | Assigned sled UUID (blank if none) | +//! | CREATED | Creation timestamp | +//! +//! Filters: `--group-id`, `--group-ip`, `--group-name`, `--state`, +//! `--sled-id`, `--source-ip` +//! +//! ## `omdb db multicast info` +//! +//! Detailed view of a single group with sections: +//! +//! **MULTICAST GROUP** +//! - id, name, state, multicast_ip, vni, source_ips (allowlist or "-") +//! - ip_pool (name + ID), underlay_group, tag, created +//! +//! **UNDERLAY GROUP** (if present) +//! - id, multicast_ip, tag, created +//! +//! **MEMBERS** (table) +//! +//! | Column | Description | +//! |--------------|--------------------------------| +//! | ID | Member UUID | +//! | INSTANCE | Instance name | +//! | STATE | Member state | +//! | MULTICAST_IP | Group multicast IP | +//! | SOURCES | Allowlist, or "-" (any) | +//! | SLED | Sled serial number, or "-" | +//! | CREATED | Creation timestamp | +//! +//! Lookup: `--group-id`, `--ip`, `--name` (exactly one required) + +use std::collections::{BTreeSet, HashMap}; + +use anyhow::Context; +use async_bb8_diesel::AsyncRunQueryDsl; +use chrono::{DateTime, Utc}; +use clap::{Args, Subcommand, ValueEnum}; +use diesel::prelude::*; +use tabled::Tabled; +use uuid::Uuid; + +use nexus_db_model::{ + ExternalMulticastGroup, IpPool, IpPoolRange, IpPoolType, + MulticastGroupMember, MulticastGroupMemberState, MulticastGroupState, + UnderlayMulticastGroup, +}; +use nexus_db_queries::db::DataStore; +use nexus_types::identity::Resource; +use omicron_common::address::is_ssm_address; +use omicron_uuid_kinds::{GenericUuid, SledUuid}; + +/// CLI wrapper for MulticastGroupState to support clap ValueEnum +#[derive(Debug, Clone, Copy, ValueEnum)] +pub enum CliGroupState { + Creating, + Active, + Deleting, + Deleted, +} + +impl From for MulticastGroupState { + fn from(cli: CliGroupState) -> Self { + match cli { + CliGroupState::Creating => MulticastGroupState::Creating, + CliGroupState::Active => MulticastGroupState::Active, + CliGroupState::Deleting => MulticastGroupState::Deleting, + CliGroupState::Deleted => MulticastGroupState::Deleted, + } + } +} + +/// CLI wrapper for MulticastGroupMemberState to support clap ValueEnum +#[derive(Debug, Clone, Copy, ValueEnum)] +pub enum CliMemberState { + Joining, + Joined, + Left, +} + +impl From for MulticastGroupMemberState { + fn from(cli: CliMemberState) -> Self { + match cli { + CliMemberState::Joining => MulticastGroupMemberState::Joining, + CliMemberState::Joined => MulticastGroupMemberState::Joined, + CliMemberState::Left => MulticastGroupMemberState::Left, + } + } +} + +use crate::db::{DbFetchOptions, check_limit}; +use crate::helpers::{datetime_rfc3339_concise, display_option_blank}; + +// Display labels for multicast address range classification +const RANGE_SSM: &str = "SSM"; +const RANGE_ASM: &str = "ASM"; + +/// `omdb db multicast` subcommand +#[derive(Debug, Args, Clone)] +pub(super) struct MulticastArgs { + #[command(subcommand)] + pub command: MulticastCommands, +} + +#[derive(Debug, Subcommand, Clone)] +pub(super) enum MulticastCommands { + /// List all multicast groups. + /// + /// Shows ID, name, state, multicast IP, address range type (ASM/SSM), + /// underlay IP, source IPs union, VNI, and creation time. + #[clap(alias = "ls")] + Groups(MulticastGroupsArgs), + + /// List all multicast group members. + /// + /// Shows member ID, group name, parent instance ID, state, multicast IP, + /// source IPs, sled ID, and creation time. + Members(MulticastMembersArgs), + + /// List multicast IP pools and their ranges. + /// + /// Shows pool ID, name, first/last addresses, and creation time. + Pools, + + /// Get detailed info for a multicast group. + /// + /// Shows group details, associated underlay group, and all members. + #[clap(alias = "show")] + Info(MulticastInfoArgs), +} + +#[derive(Debug, Args, Clone)] +pub(super) struct MulticastGroupsArgs { + /// Filter by state + #[arg(long, ignore_case = true, value_enum)] + state: Option, + /// Filter by pool name + #[arg(long)] + pool: Option, +} + +#[derive(Debug, Args, Clone)] +pub(super) struct MulticastMembersArgs { + /// Filter by group ID + #[arg(long)] + group_id: Option, + /// Filter by group IP address (e.g., 239.1.2.3) + #[arg(long)] + group_ip: Option, + /// Filter by group name + #[arg(long)] + group_name: Option, + /// Filter by state + #[arg(long, ignore_case = true, value_enum)] + state: Option, + /// Filter by sled ID + #[arg(long)] + sled_id: Option, + /// Filter by source IP (members subscribed to this source) + #[arg(long)] + source_ip: Option, +} + +#[derive(Debug, Args, Clone)] +#[group(required = true, multiple = false)] +pub(super) struct MulticastInfoArgs { + /// Multicast group ID + #[arg(long)] + group_id: Option, + /// Multicast IP address (e.g., 239.1.2.3) + #[arg(long)] + ip: Option, + /// Multicast group name + #[arg(long)] + name: Option, +} + +#[derive(Tabled)] +#[tabled(rename_all = "SCREAMING_SNAKE_CASE")] +struct MulticastGroupRow { + id: Uuid, + name: String, + state: MulticastGroupState, + multicast_ip: std::net::IpAddr, + /// ASM (any-source) or SSM (source-specific) based on IP range + range: &'static str, + #[tabled(display_with = "display_option_blank")] + underlay_ip: Option, + /// Source IPs union from members ("-" = any source) + sources: String, + /// Members formatted as "inst_1@sled, ..., inst_n@sled" + members: String, + vni: u32, + #[tabled(display_with = "datetime_rfc3339_concise")] + created: DateTime, +} + +#[derive(Tabled)] +#[tabled(rename_all = "SCREAMING_SNAKE_CASE")] +struct MulticastMemberRow { + id: Uuid, + group_name: String, + parent_id: Uuid, + state: MulticastGroupMemberState, + multicast_ip: std::net::IpAddr, + /// Source IPs for source filtering ("-" = any source) + sources: String, + #[tabled(display_with = "display_option_blank")] + sled_id: Option, + #[tabled(display_with = "datetime_rfc3339_concise")] + created: DateTime, +} + +#[derive(Tabled)] +#[tabled(rename_all = "SCREAMING_SNAKE_CASE")] +struct MulticastInfoMemberRow { + id: Uuid, + instance: String, + state: MulticastGroupMemberState, + multicast_ip: std::net::IpAddr, + /// Source IPs for source filtering ("-" = any source) + sources: String, + sled: String, + #[tabled(display_with = "datetime_rfc3339_concise")] + created: DateTime, +} + +// Build output combining pools and ranges +#[derive(Tabled)] +#[tabled(rename_all = "SCREAMING_SNAKE_CASE")] +struct MulticastPoolRow { + pool_id: Uuid, + pool_name: String, + first_address: std::net::IpAddr, + last_address: std::net::IpAddr, + #[tabled(display_with = "datetime_rfc3339_concise")] + created: chrono::DateTime, +} + +pub(super) async fn cmd_db_multicast_groups( + datastore: &DataStore, + fetch_opts: &DbFetchOptions, + args: &MulticastGroupsArgs, +) -> Result<(), anyhow::Error> { + use nexus_db_schema::schema::instance::dsl as instance_dsl; + use nexus_db_schema::schema::ip_pool::dsl as pool_dsl; + use nexus_db_schema::schema::multicast_group::dsl; + use nexus_db_schema::schema::multicast_group_member::dsl as member_dsl; + use nexus_db_schema::schema::sled::dsl as sled_dsl; + use nexus_db_schema::schema::underlay_multicast_group::dsl as underlay_dsl; + + let conn = datastore.pool_connection_for_tests().await?; + + let mut query = dsl::multicast_group.into_boxed(); + if !fetch_opts.include_deleted { + query = query.filter(dsl::time_deleted.is_null()); + } + if let Some(state) = args.state.map(MulticastGroupState::from) { + query = query.filter(dsl::state.eq(state)); + } + if let Some(ref pool_name) = args.pool { + let pool_id: Uuid = pool_dsl::ip_pool + .filter(pool_dsl::name.eq(pool_name.clone())) + .filter(pool_dsl::time_deleted.is_null()) + .select(pool_dsl::id) + .first_async(&*conn) + .await + .with_context(|| { + format!("no pool found with name '{pool_name}'") + })?; + query = query.filter(dsl::ip_pool_id.eq(pool_id)); + } + + let groups: Vec = query + .order_by(dsl::time_created.desc()) + .limit(i64::from(u32::from(fetch_opts.fetch_limit))) + .select(ExternalMulticastGroup::as_select()) + .get_results_async(&*conn) + .await?; + + check_limit(&groups, fetch_opts.fetch_limit, || { + String::from("listing multicast groups") + }); + + // Batch lookup underlay IPs for groups + let underlay_ids: Vec = + groups.iter().filter_map(|group| group.underlay_group_id).collect(); + let underlay_map: HashMap = + if underlay_ids.is_empty() { + HashMap::new() + } else { + underlay_dsl::underlay_multicast_group + .filter(underlay_dsl::id.eq_any(underlay_ids)) + .select((underlay_dsl::id, underlay_dsl::multicast_ip)) + .get_results_async::<(Uuid, ipnetwork::IpNetwork)>(&*conn) + .await + .context("fetching underlay groups")? + .into_iter() + .collect() + }; + + // Fetch members for all groups with deterministic ordering + let group_ids: Vec = groups.iter().map(|g| g.identity.id).collect(); + let members: Vec = if group_ids.is_empty() { + Vec::new() + } else { + let mut mq = member_dsl::multicast_group_member + .filter(member_dsl::external_group_id.eq_any(group_ids)) + .into_boxed(); + if !fetch_opts.include_deleted { + mq = mq.filter(member_dsl::time_deleted.is_null()); + } + mq.order_by(member_dsl::external_group_id.asc()) + .then_order_by(member_dsl::parent_id.asc()) + .then_order_by(member_dsl::id.asc()) + .select(MulticastGroupMember::as_select()) + .get_results_async(&*conn) + .await + .context("fetching multicast group members")? + }; + + // Derive effective source filtering state from members for each group. + // If any member has empty source_ips, the group effectively allows any source + // (filter disabled). Otherwise, show the union of all member source IPs + // (filter enabled with allowlist). None = any-source, Some(set) = filtered. + let source_filter_map: HashMap>> = { + let mut map: HashMap>> = + HashMap::new(); + for member in &members { + if member.source_ips.is_empty() { + // Any member with empty sources means any-source allowed + map.insert(member.external_group_id, None); + } else { + map.entry(member.external_group_id) + .and_modify(|v| { + if let Some(set) = v { + for ip in &member.source_ips { + set.insert(ip.ip()); + } + } + // If already None (any-source), leave it as None + }) + .or_insert_with(|| { + Some( + member + .source_ips + .iter() + .map(|ip| ip.ip()) + .collect(), + ) + }); + } + } + map + }; + + // Batch lookup instance names + let parent_ids: Vec = members.iter().map(|m| m.parent_id).collect(); + let instance_names: HashMap = if parent_ids.is_empty() { + HashMap::new() + } else { + instance_dsl::instance + .filter(instance_dsl::id.eq_any(parent_ids)) + .select((instance_dsl::id, instance_dsl::name)) + .get_results_async::<(Uuid, String)>(&*conn) + .await + .context("fetching instance names")? + .into_iter() + .collect() + }; + + // Batch lookup sled serials + let sled_ids: Vec = members + .iter() + .filter_map(|m| m.sled_id.map(|s| s.into_untyped_uuid())) + .collect(); + let sled_serials: HashMap = if sled_ids.is_empty() { + HashMap::new() + } else { + sled_dsl::sled + .filter(sled_dsl::id.eq_any(sled_ids)) + .select((sled_dsl::id, sled_dsl::serial_number)) + .get_results_async::<(Uuid, String)>(&*conn) + .await + .context("fetching sled serials")? + .into_iter() + .collect() + }; + + // Build group_id -> formatted members string + let mut members_map: HashMap> = HashMap::new(); + for member in &members { + let inst_name = instance_names + .get(&member.parent_id) + .cloned() + .unwrap_or_else(|| member.parent_id.to_string()); + let sled_serial = member + .sled_id + .and_then(|s| sled_serials.get(&s.into_untyped_uuid()).cloned()) + .unwrap_or_else(|| "-".to_string()); + let formatted = format!("{inst_name}@{sled_serial}"); + members_map + .entry(member.external_group_id) + .or_default() + .push(formatted); + } + + // Sort each group's members for deterministic output + for v in members_map.values_mut() { + v.sort_unstable(); + } + + let rows: Vec = groups + .into_iter() + .map(|group| { + let mcast_ip = group.multicast_ip.ip(); + let range = + if is_ssm_address(mcast_ip) { RANGE_SSM } else { RANGE_ASM }; + // Format effective source filter state (derived from members) + let sources = source_filter_map + .get(&group.identity.id) + .and_then(|opt| opt.as_ref()) + .filter(|set| !set.is_empty()) + .map(|set| { + set.iter() + .map(|ip| ip.to_string()) + .collect::>() + .join(",") + }) + .unwrap_or_else(|| "-".to_string()); + let underlay_ip = group + .underlay_group_id + .and_then(|id| underlay_map.get(&id)) + .map(|ip| ip.ip()); + let members = members_map + .get(&group.identity.id) + .map(|v| v.join(", ")) + .unwrap_or_else(|| "-".to_string()); + MulticastGroupRow { + id: group.identity.id, + name: group.identity.name.to_string(), + state: group.state, + multicast_ip: mcast_ip, + range, + underlay_ip, + sources, + members, + vni: u32::from(group.vni.0), + created: group.identity.time_created, + } + }) + .collect(); + + let table = tabled::Table::new(rows) + .with(tabled::settings::Style::empty()) + .with(tabled::settings::Padding::new(0, 1, 0, 0)) + .to_string(); + + println!("{table}"); + + Ok(()) +} + +pub(super) async fn cmd_db_multicast_members( + datastore: &DataStore, + fetch_opts: &DbFetchOptions, + args: &MulticastMembersArgs, +) -> Result<(), anyhow::Error> { + use nexus_db_schema::schema::multicast_group::dsl as group_dsl; + use nexus_db_schema::schema::multicast_group_member::dsl; + + let conn = datastore.pool_connection_for_tests().await?; + + // Resolve group_ip or group_name to a group_id if specified + let resolved_group_id = match (&args.group_ip, &args.group_name) { + (Some(ip), _) => { + let group: ExternalMulticastGroup = group_dsl::multicast_group + .filter(group_dsl::time_deleted.is_null()) + .filter( + group_dsl::multicast_ip.eq(ipnetwork::IpNetwork::from(*ip)), + ) + .select(ExternalMulticastGroup::as_select()) + .first_async(&*conn) + .await + .with_context(|| format!("no multicast group with IP {ip}"))?; + Some(group.id()) + } + (None, Some(name)) => { + let group: ExternalMulticastGroup = group_dsl::multicast_group + .filter(group_dsl::time_deleted.is_null()) + .filter(group_dsl::name.eq(name.clone())) + .select(ExternalMulticastGroup::as_select()) + .first_async(&*conn) + .await + .with_context(|| { + format!("no multicast group with name '{name}'") + })?; + Some(group.id()) + } + (None, None) => args.group_id, + }; + + let mut query = dsl::multicast_group_member.into_boxed(); + if !fetch_opts.include_deleted { + query = query.filter(dsl::time_deleted.is_null()); + } + if let Some(group_id) = resolved_group_id { + query = query.filter(dsl::external_group_id.eq(group_id)); + } + if let Some(state) = args.state.map(MulticastGroupMemberState::from) { + query = query.filter(dsl::state.eq(state)); + } + if let Some(sled_id) = args.sled_id { + query = query.filter(dsl::sled_id.eq(sled_id.into_untyped_uuid())); + } + if let Some(source_ip) = args.source_ip { + let ip_network = ipnetwork::IpNetwork::from(source_ip); + query = query.filter(dsl::source_ips.contains(vec![ip_network])); + } + + let members: Vec = query + .order_by(dsl::time_created.desc()) + .limit(i64::from(u32::from(fetch_opts.fetch_limit))) + .select(MulticastGroupMember::as_select()) + .get_results_async(&*conn) + .await?; + + check_limit(&members, fetch_opts.fetch_limit, || { + String::from("listing multicast group members") + }); + + // Batch lookup group names + let group_ids: Vec = + members.iter().map(|member| member.external_group_id).collect(); + let group_names: HashMap = if group_ids.is_empty() { + HashMap::new() + } else { + group_dsl::multicast_group + .filter(group_dsl::id.eq_any(group_ids)) + .select((group_dsl::id, group_dsl::name)) + .get_results_async::<(Uuid, String)>(&*conn) + .await + .context("fetching group names")? + .into_iter() + .collect() + }; + + let rows: Vec = members + .into_iter() + .map(|member| { + let group_name = group_names + .get(&member.external_group_id) + .cloned() + .unwrap_or_else(|| member.external_group_id.to_string()); + let sources = Some(&member.source_ips) + .filter(|ips| !ips.is_empty()) + .map(|ips| { + ips.iter() + .map(|ip| ip.ip().to_string()) + .collect::>() + .join(",") + }) + .unwrap_or_else(|| "-".to_string()); + MulticastMemberRow { + id: member.id, + group_name, + parent_id: member.parent_id, + state: member.state, + multicast_ip: member.multicast_ip.ip(), + sources, + sled_id: member.sled_id.map(SledUuid::from), + created: member.time_created, + } + }) + .collect(); + + let table = tabled::Table::new(rows) + .with(tabled::settings::Style::empty()) + .with(tabled::settings::Padding::new(0, 1, 0, 0)) + .to_string(); + + println!("{table}"); + + Ok(()) +} + +pub(super) async fn cmd_db_multicast_pools( + datastore: &DataStore, + fetch_opts: &DbFetchOptions, +) -> Result<(), anyhow::Error> { + use nexus_db_schema::schema::ip_pool::dsl as pool_dsl; + use nexus_db_schema::schema::ip_pool_range::dsl as range_dsl; + + let conn = datastore.pool_connection_for_tests().await?; + + // Get multicast pools + let mut query = pool_dsl::ip_pool.into_boxed(); + query = query.filter(pool_dsl::pool_type.eq(IpPoolType::Multicast)); + if !fetch_opts.include_deleted { + query = query.filter(pool_dsl::time_deleted.is_null()); + } + + let pools: Vec = query + .order_by(pool_dsl::time_created.desc()) + .limit(i64::from(u32::from(fetch_opts.fetch_limit))) + .select(IpPool::as_select()) + .get_results_async(&*conn) + .await?; + + check_limit(&pools, fetch_opts.fetch_limit, || { + String::from("listing multicast pools") + }); + + if pools.is_empty() { + println!("no multicast IP pools found"); + return Ok(()); + } + + // Get ranges for each pool + let pool_ids: Vec = pools.iter().map(|pool| pool.id()).collect(); + + let mut range_query = range_dsl::ip_pool_range.into_boxed(); + range_query = + range_query.filter(range_dsl::ip_pool_id.eq_any(pool_ids.clone())); + if !fetch_opts.include_deleted { + range_query = range_query.filter(range_dsl::time_deleted.is_null()); + } + + let ranges: Vec = range_query + .order_by(range_dsl::first_address) + .select(IpPoolRange::as_select()) + .get_results_async(&*conn) + .await?; + + let pool_map: HashMap = + pools.iter().map(|pool| (pool.id(), pool)).collect(); + + let rows: Vec = ranges + .into_iter() + .filter_map(|range| { + pool_map.get(&range.ip_pool_id).map(|pool| MulticastPoolRow { + pool_id: pool.id(), + pool_name: pool.name().to_string(), + first_address: range.first_address.ip(), + last_address: range.last_address.ip(), + created: range.time_created, + }) + }) + .collect(); + + if rows.is_empty() { + println!("no multicast IP pool ranges found"); + return Ok(()); + } + + let table = tabled::Table::new(rows) + .with(tabled::settings::Style::empty()) + .with(tabled::settings::Padding::new(0, 1, 0, 0)) + .to_string(); + + println!("{table}"); + + Ok(()) +} + +pub(super) async fn cmd_db_multicast_info( + datastore: &DataStore, + fetch_opts: &DbFetchOptions, + args: &MulticastInfoArgs, +) -> Result<(), anyhow::Error> { + use nexus_db_schema::schema::instance::dsl as instance_dsl; + use nexus_db_schema::schema::ip_pool::dsl as pool_dsl; + use nexus_db_schema::schema::multicast_group::dsl as group_dsl; + use nexus_db_schema::schema::multicast_group_member::dsl as member_dsl; + use nexus_db_schema::schema::sled::dsl as sled_dsl; + use nexus_db_schema::schema::underlay_multicast_group::dsl as underlay_dsl; + + let conn = datastore.pool_connection_for_tests().await?; + + // Find the group by ID, IP, or name, pairing filter with error message + let (mut query, not_found_msg) = + match (&args.group_id, &args.ip, &args.name) { + (Some(id), _, _) => ( + group_dsl::multicast_group + .filter(group_dsl::id.eq(*id)) + .into_boxed(), + format!("no multicast group found with ID {id}"), + ), + (None, Some(ip), _) => ( + group_dsl::multicast_group + .filter( + group_dsl::multicast_ip + .eq(ipnetwork::IpNetwork::from(*ip)), + ) + .into_boxed(), + format!("no multicast group found with IP {ip}"), + ), + (None, None, Some(name)) => ( + group_dsl::multicast_group + .filter(group_dsl::name.eq(name.clone())) + .into_boxed(), + format!("no multicast group found with name \"{name}\""), + ), + (None, None, None) => { + anyhow::bail!("must specify --group-id, --ip, or --name") + } + }; + + if !fetch_opts.include_deleted { + query = query.filter(group_dsl::time_deleted.is_null()); + } + + // Fetch group with underlay in single query using LEFT JOIN + let result: Option<( + ExternalMulticastGroup, + Option, + )> = + query + .left_join(underlay_dsl::underlay_multicast_group.on( + underlay_dsl::id.nullable().eq(group_dsl::underlay_group_id), + )) + .select(( + ExternalMulticastGroup::as_select(), + Option::::as_select(), + )) + .first_async(&*conn) + .await + .optional()?; + + let (group, underlay) = match result { + Some((grp, ulay)) => (grp, ulay), + None => { + println!("{not_found_msg}"); + return Ok(()); + } + }; + + // Look up the pool name + let pool_name: String = match pool_dsl::ip_pool + .filter(pool_dsl::id.eq(group.ip_pool_id)) + .select(pool_dsl::name) + .first_async(&*conn) + .await + .optional() + .context("fetching pool name")? + { + Some(name) => name, + None => { + eprintln!("warning: no pool found for id {}", group.ip_pool_id); + "".into() + } + }; + + // Find members for this group (fetch early to derive source_ips) + let mut member_query = member_dsl::multicast_group_member.into_boxed(); + member_query = member_query + .filter(member_dsl::external_group_id.eq(group.identity.id)); + if !fetch_opts.include_deleted { + member_query = member_query.filter(member_dsl::time_deleted.is_null()); + } + + let members: Vec = member_query + .order_by(member_dsl::time_created.desc()) + .select(MulticastGroupMember::as_select()) + .get_results_async(&*conn) + .await?; + + // Derive effective source filter state from members. + // If any member has empty source_ips, the group allows any source ("-"). + // Otherwise, show the union of all member source IPs. + let has_any_source_member = members.iter().any(|m| m.source_ips.is_empty()); + let source_ips_display = if has_any_source_member { + "-".to_string() + } else { + let source_ips: BTreeSet = members + .iter() + .flat_map(|m| m.source_ips.iter().map(|ip| ip.ip())) + .collect(); + if source_ips.is_empty() { + "-".to_string() + } else { + source_ips + .iter() + .map(|ip| ip.to_string()) + .collect::>() + .join(",") + } + }; + + // Print group details + println!("MULTICAST GROUP"); + println!(" id: {}", group.identity.id); + println!(" name: {}", group.identity.name); + println!(" state: {:?}", group.state); + println!(" multicast_ip: {}", group.multicast_ip); + println!(" vni: {}", u32::from(group.vni.0)); + println!(" source_ips: {source_ips_display}"); + println!(" ip_pool: {pool_name} ({})", group.ip_pool_id); + println!(" underlay_group: {:?}", group.underlay_group_id); + println!(" tag: {:?}", group.tag); + println!(" created: {}", group.identity.time_created); + if let Some(deleted) = group.identity.time_deleted { + println!(" deleted: {deleted}"); + } + + // Display underlay group if present + if let Some(underlay_group) = underlay { + println!("\nUNDERLAY GROUP"); + println!(" id: {}", underlay_group.id); + println!(" multicast_ip: {}", underlay_group.multicast_ip); + println!(" tag: {:?}", underlay_group.tag); + println!(" created: {}", underlay_group.time_created); + if let Some(deleted) = underlay_group.time_deleted { + println!(" deleted: {deleted}"); + } + } + + if members.is_empty() { + println!("\nMEMBERS: (none)"); + } else { + println!("\nMEMBERS ({}):", members.len()); + + // Batch lookup instance names (parent_id references instances) + let parent_ids: Vec = + members.iter().map(|member| member.parent_id).collect(); + let instances: Vec<(Uuid, String)> = instance_dsl::instance + .filter(instance_dsl::id.eq_any(parent_ids)) + .select((instance_dsl::id, instance_dsl::name)) + .get_results_async(&*conn) + .await + .context("fetching instance names")?; + let instance_map: HashMap = + instances.into_iter().collect(); + + // Batch lookup sled serials + let sled_ids: Vec = members + .iter() + .filter_map(|member| member.sled_id.map(|s| s.into_untyped_uuid())) + .collect(); + let sleds: Vec<(Uuid, String)> = if sled_ids.is_empty() { + Vec::new() + } else { + sled_dsl::sled + .filter(sled_dsl::id.eq_any(sled_ids)) + .select((sled_dsl::id, sled_dsl::serial_number)) + .get_results_async(&*conn) + .await + .context("fetching sled serials")? + }; + let sled_map: HashMap = sleds.into_iter().collect(); + + let rows: Vec = members + .into_iter() + .map(|member| { + let instance_name = instance_map + .get(&member.parent_id) + .cloned() + .unwrap_or_else(|| member.parent_id.to_string()); + let sled_serial = member + .sled_id + .and_then(|s| sled_map.get(&s.into_untyped_uuid()).cloned()) + .unwrap_or_else(|| "-".to_string()); + let sources = Some(&member.source_ips) + .filter(|ips| !ips.is_empty()) + .map(|ips| { + ips.iter() + .map(|ip| ip.ip().to_string()) + .collect::>() + .join(",") + }) + .unwrap_or_else(|| "-".to_string()); + MulticastInfoMemberRow { + id: member.id, + instance: instance_name, + state: member.state, + multicast_ip: member.multicast_ip.ip(), + sources, + sled: sled_serial, + created: member.time_created, + } + }) + .collect(); + + let table = tabled::Table::new(rows) + .with(tabled::settings::Style::empty()) + .with(tabled::settings::Padding::new(0, 1, 0, 0)) + .to_string(); + + println!("{table}"); + } + + Ok(()) +} diff --git a/dev-tools/omdb/src/bin/omdb/nexus.rs b/dev-tools/omdb/src/bin/omdb/nexus.rs index 6657e273541..c064948a9cc 100644 --- a/dev-tools/omdb/src/bin/omdb/nexus.rs +++ b/dev-tools/omdb/src/bin/omdb/nexus.rs @@ -63,6 +63,7 @@ use nexus_types::internal_api::background::InstanceReincarnationStatus; use nexus_types::internal_api::background::InstanceUpdaterStatus; use nexus_types::internal_api::background::InventoryLoadStatus; use nexus_types::internal_api::background::LookupRegionPortStatus; +use nexus_types::internal_api::background::MulticastGroupReconcilerStatus; use nexus_types::internal_api::background::ProbeDistributorStatus; use nexus_types::internal_api::background::ReadOnlyRegionReplacementStartStatus; use nexus_types::internal_api::background::RegionReplacementDriverStatus; @@ -1264,6 +1265,9 @@ fn print_task_details(bgtask: &BackgroundTask, details: &serde_json::Value) { "lookup_region_port" => { print_task_lookup_region_port(details); } + "multicast_reconciler" => { + print_task_multicast_reconciler(details); + } "phantom_disks" => { print_task_phantom_disks(details); } @@ -2198,6 +2202,76 @@ fn print_task_lookup_region_port(details: &serde_json::Value) { } } +fn print_task_multicast_reconciler(details: &serde_json::Value) { + let status = match serde_json::from_value::( + details.clone(), + ) { + Err(error) => { + eprintln!( + "warning: failed to interpret task details: {error:?}: {details:?}" + ); + return; + } + Ok(status) => status, + }; + + if status.disabled { + println!(" multicast feature is disabled"); + return; + } + + const GROUPS_CREATED: &str = "groups created (Creating->Active):"; + const GROUPS_DELETED: &str = "groups deleted (cleanup):"; + const GROUPS_VERIFIED: &str = "groups verified (Active):"; + const EMPTY_GROUPS_MARKED: &str = "empty groups marked for deletion:"; + const MEMBERS_PROCESSED: &str = "members processed:"; + const MEMBERS_DELETED: &str = "members deleted:"; + const WIDTH: usize = const_max_len(&[ + GROUPS_CREATED, + GROUPS_DELETED, + GROUPS_VERIFIED, + EMPTY_GROUPS_MARKED, + MEMBERS_PROCESSED, + MEMBERS_DELETED, + ]) + 1; + const NUM_WIDTH: usize = 3; + + if !status.errors.is_empty() { + println!( + " task did not complete successfully! ({} errors)", + status.errors.len() + ); + for error in &status.errors { + println!(" > {error}"); + } + } + + println!( + " {GROUPS_CREATED:NUM_WIDTH$}", + status.groups_created + ); + println!( + " {GROUPS_DELETED:NUM_WIDTH$}", + status.groups_deleted + ); + println!( + " {GROUPS_VERIFIED:NUM_WIDTH$}", + status.groups_verified + ); + println!( + " {EMPTY_GROUPS_MARKED:NUM_WIDTH$}", + status.empty_groups_marked + ); + println!( + " {MEMBERS_PROCESSED:NUM_WIDTH$}", + status.members_processed + ); + println!( + " {MEMBERS_DELETED:NUM_WIDTH$}", + status.members_deleted + ); +} + fn print_task_phantom_disks(details: &serde_json::Value) { #[derive(Deserialize)] struct TaskSuccess { diff --git a/dev-tools/omdb/tests/successes.out b/dev-tools/omdb/tests/successes.out index 986509a32d0..f82df34e314 100644 --- a/dev-tools/omdb/tests/successes.out +++ b/dev-tools/omdb/tests/successes.out @@ -85,6 +85,36 @@ stderr: note: using database URL postgresql://root@[::1]:REDACTED_PORT/omicron?sslmode=disable note: database schema version matches expected () ============================================= +EXECUTING COMMAND: omdb ["db", "multicast", "groups"] +termination: Exited(0) +--------------------------------------------- +stdout: +ID NAME STATE MULTICAST_IP RANGE UNDERLAY_IP SOURCES MEMBERS VNI CREATED +--------------------------------------------- +stderr: +note: using database URL postgresql://root@[::1]:REDACTED_PORT/omicron?sslmode=disable +note: database schema version matches expected () +============================================= +EXECUTING COMMAND: omdb ["db", "multicast", "members"] +termination: Exited(0) +--------------------------------------------- +stdout: +ID GROUP_NAME PARENT_ID STATE MULTICAST_IP SOURCES SLED_ID CREATED +--------------------------------------------- +stderr: +note: using database URL postgresql://root@[::1]:REDACTED_PORT/omicron?sslmode=disable +note: database schema version matches expected () +============================================= +EXECUTING COMMAND: omdb ["db", "multicast", "pools"] +termination: Exited(0) +--------------------------------------------- +stdout: +no multicast IP pools found +--------------------------------------------- +stderr: +note: using database URL postgresql://root@[::1]:REDACTED_PORT/omicron?sslmode=disable +note: database schema version matches expected () +============================================= EXECUTING COMMAND: omdb ["db", "sleds"] termination: Exited(0) --------------------------------------------- @@ -749,7 +779,12 @@ task: "multicast_reconciler" configured period: every m last completed activation: , triggered by started at (s ago) and ran for ms -warning: unknown background task: "multicast_reconciler" (don't know how to interpret details: Object {"disabled": Bool(false), "empty_groups_marked": Number(0), "errors": Array [], "groups_created": Number(0), "groups_deleted": Number(0), "groups_verified": Number(0), "members_deleted": Number(0), "members_processed": Number(0)}) + groups created (Creating->Active): 0 + groups deleted (cleanup): 0 + groups verified (Active): 0 + empty groups marked for deletion: 0 + members processed: 0 + members deleted: 0 task: "phantom_disks" configured period: every s @@ -1350,7 +1385,12 @@ task: "multicast_reconciler" configured period: every m last completed activation: , triggered by started at (s ago) and ran for ms -warning: unknown background task: "multicast_reconciler" (don't know how to interpret details: Object {"disabled": Bool(false), "empty_groups_marked": Number(0), "errors": Array [], "groups_created": Number(0), "groups_deleted": Number(0), "groups_verified": Number(0), "members_deleted": Number(0), "members_processed": Number(0)}) + groups created (Creating->Active): 0 + groups deleted (cleanup): 0 + groups verified (Active): 0 + empty groups marked for deletion: 0 + members processed: 0 + members deleted: 0 task: "phantom_disks" configured period: every s diff --git a/dev-tools/omdb/tests/test_all_output.rs b/dev-tools/omdb/tests/test_all_output.rs index cd1e4e15fd1..45b8ae8765f 100644 --- a/dev-tools/omdb/tests/test_all_output.rs +++ b/dev-tools/omdb/tests/test_all_output.rs @@ -96,6 +96,7 @@ async fn test_omdb_usage_errors() { &["db", "sitrep", "--help"], &["db", "saga"], &["db", "snapshots"], + &["db", "multicast"], &["db", "network"], &["mgs"], &["nexus"], @@ -199,6 +200,9 @@ async fn test_omdb_success_cases(cptestctx: &ControlPlaneTestContext) { &["db", "dns", "diff", "external", "2"], &["db", "dns", "names", "external", "2"], &["db", "instances"], + &["db", "multicast", "groups"], + &["db", "multicast", "members"], + &["db", "multicast", "pools"], &["db", "sleds"], &["db", "sleds", "-F", "discretionary"], &["mgs", "inventory"], diff --git a/dev-tools/omdb/tests/test_multicast.rs b/dev-tools/omdb/tests/test_multicast.rs new file mode 100644 index 00000000000..d1d761fd372 --- /dev/null +++ b/dev-tools/omdb/tests/test_multicast.rs @@ -0,0 +1,728 @@ +// 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/. + +#![cfg(feature = "multicast")] +//! Tests for omdb multicast commands with real data. +//! +//! These tests verify that omdb correctly formats multicast data by creating +//! actual multicast pools, groups, and members, then running omdb commands +//! and checking the output. + +use std::net::IpAddr; +use std::process::Command; +use std::time::Duration; + +use dropshot::test_util::ClientTestContext; +use futures::future::join3; +use nexus_db_queries::db::fixed_data::silo::DEFAULT_SILO; +use nexus_test_utils::http_testing::{AuthnMode, NexusRequest}; +use nexus_test_utils::resource_helpers::{ + create_default_ip_pools, create_instance_with, create_multicast_ip_pool, + create_project, link_ip_pool, object_put_upsert, objects_list_page_authz, +}; +use nexus_test_utils_macros::nexus_test; +use nexus_types::external_api::instance::InstanceNetworkInterfaceAttachment; +use nexus_types::external_api::multicast::{ + InstanceMulticastGroupJoin, MulticastGroup, MulticastGroupMember, +}; +use nexus_types::identity::Resource; +use omicron_common::address::{IpRange, Ipv4Range}; +use omicron_common::api::external::Instance; +use omicron_test_utils::dev::poll::{self, CondCheckError, wait_for_condition}; + +type ControlPlaneTestContext = + nexus_test_utils::ControlPlaneTestContext; + +const PROJECT_NAME: &str = "omdb-test-project"; + +/// Path to the omdb binary - set by cargo when running tests +const CMD_OMDB: &str = env!("CARGO_BIN_EXE_omdb"); + +// Timeout constants for test operations +const POLL_INTERVAL: Duration = Duration::from_millis(80); +const MULTICAST_OPERATION_TIMEOUT: Duration = Duration::from_secs(120); + +/// Run an omdb command and return its stdout. +fn run_omdb(db_url: &str, args: &[&str]) -> String { + let output = Command::new(CMD_OMDB) + .env("OMDB_DB_URL", db_url) + .args(args) + .output() + .expect("failed to execute omdb"); + + if !output.status.success() { + let stderr = String::from_utf8_lossy(&output.stderr); + panic!("omdb command failed with args {args:?}:\nstderr: {stderr}"); + } + + String::from_utf8_lossy(&output.stdout).to_string() +} + +/// Build URL for a specific multicast group by name. +fn mcast_group_url(group_name: &str) -> String { + format!("/v1/multicast-groups/{group_name}") +} + +/// Create a multicast IP pool and link it to the default silo. +async fn create_multicast_pool_linked( + client: &ClientTestContext, + pool_name: &str, + ip_range: Option, +) { + create_multicast_ip_pool(client, pool_name, ip_range).await; + link_ip_pool(client, pool_name, &DEFAULT_SILO.id(), false).await; +} + +/// Convenience function to wait for a group to become "Active". +async fn wait_for_group_active( + client: &ClientTestContext, + group_name: &str, +) -> MulticastGroup { + match wait_for_condition( + || async { + let group: MulticastGroup = + NexusRequest::object_get(client, &mcast_group_url(group_name)) + .authn_as(AuthnMode::PrivilegedUser) + .execute_and_parse_unwrap() + .await; + if group.state == "Active" { + Ok(group) + } else { + Err(CondCheckError::<()>::NotYet) + } + }, + &POLL_INTERVAL, + &MULTICAST_OPERATION_TIMEOUT, + ) + .await + { + Ok(group) => group, + Err(poll::Error::TimedOut(elapsed)) => { + panic!( + "group {group_name} did not reach state 'Active' within {elapsed:?}" + ); + } + Err(poll::Error::PermanentError(err)) => { + panic!( + "failed waiting for group {group_name} to reach 'Active': {err:?}" + ); + } + } +} + +/// Wait for a specific member to reach the expected state. +async fn wait_for_member_state( + cptestctx: &ControlPlaneTestContext, + group_name: &str, + instance_id: uuid::Uuid, + expected_state: nexus_db_model::MulticastGroupMemberState, +) -> MulticastGroupMember { + let client = &cptestctx.external_client; + let expected_state_str = expected_state.to_string(); + + match wait_for_condition( + || async { + let url = format!("/v1/multicast-groups/{group_name}/members"); + let members = + objects_list_page_authz::(client, &url) + .await + .items; + if let Some(member) = + members.iter().find(|m| m.instance_id == instance_id) + { + if member.state == expected_state_str { + Ok(member.clone()) + } else { + Err(CondCheckError::<()>::NotYet) + } + } else { + Err(CondCheckError::<()>::NotYet) + } + }, + &POLL_INTERVAL, + &MULTICAST_OPERATION_TIMEOUT, + ) + .await + { + Ok(member) => member, + Err(poll::Error::TimedOut(elapsed)) => { + panic!( + "member {instance_id} in group {group_name} did not reach state '{expected_state_str}' within {elapsed:?}" + ); + } + Err(poll::Error::PermanentError(err)) => { + panic!( + "failed waiting for member {instance_id} in group {group_name}: {err:?}" + ); + } + } +} + +/// Create an instance for multicast testing. +async fn create_test_instance( + client: &ClientTestContext, + project_name: &str, + instance_name: &str, + start: bool, +) -> Instance { + create_instance_with( + client, + project_name, + instance_name, + &InstanceNetworkInterfaceAttachment::DefaultIpv4, + vec![], + vec![], + start, + None, + None, + vec![], + ) + .await +} + +/// Test omdb multicast pools command. +#[nexus_test] +async fn test_omdb_multicast_pools(cptestctx: &ControlPlaneTestContext) { + let db_url = cptestctx.database.listen_url().to_string(); + let client = &cptestctx.external_client; + + // Before creating any pools, should show "no multicast IP pools found" + let output = run_omdb(&db_url, &["db", "multicast", "pools"]); + assert!( + output.contains("no multicast IP pools found"), + "Expected empty pool message, got: {output}" + ); + + // Create a multicast pool (no silo linking needed for pools-only test) + create_multicast_ip_pool(client, "test-mcast-pool", None).await; + + // Now should show the pool with all columns + let output = run_omdb(&db_url, &["db", "multicast", "pools"]); + // pool name + assert!( + output.contains("test-mcast-pool"), + "Expected pool name in output, got: {output}" + ); + // first address (default range from test-utils: 224.1.0.0 - 224.1.255.255) + assert!( + output.contains("224.1.0.0"), + "Expected first address in output, got: {output}" + ); + // last address + assert!( + output.contains("224.1.255.255"), + "Expected last address in output, got: {output}" + ); +} + +/// Test omdb multicast groups, members, and info commands. +/// +/// This consolidated test verifies all multicast commands work with actual data. +#[nexus_test] +async fn test_omdb_multicast_commands(cptestctx: &ControlPlaneTestContext) { + let db_url = cptestctx.database.listen_url().to_string(); + let client = &cptestctx.external_client; + + // Setup: create pools and project + join3( + create_default_ip_pools(client), + create_project(client, PROJECT_NAME), + create_multicast_pool_linked(client, "test-mcast-pool", None), + ) + .await; + + // Create an instance without multicast groups first + let instance = create_test_instance( + client, + PROJECT_NAME, + "test-instance", + false, // don't start + ) + .await; + + // Add a multicast member via API (this implicitly creates the group) + // Use instance-centric join endpoint: PUT /v1/instances/{instance}/multicast-groups/{group} + let join_url = format!( + "/v1/instances/{}/multicast-groups/test-mcast-group?project={PROJECT_NAME}", + instance.identity.id + ); + + object_put_upsert::<_, MulticastGroupMember>( + client, + &join_url, + &InstanceMulticastGroupJoin { + source_ips: None, // ASM (Any-Source Multicast) + ip_version: None, + }, + ) + .await; + + // Wait for the group to become "Active" + wait_for_group_active(client, "test-mcast-group").await; + + // Get the group details for later tests + let group_url = mcast_group_url("test-mcast-group"); + let group: MulticastGroup = NexusRequest::object_get(client, &group_url) + .authn_as(AuthnMode::PrivilegedUser) + .execute() + .await + .expect("failed to get group") + .parsed_body() + .expect("failed to parse group"); + + // Test: omdb db multicast groups + let output = run_omdb(&db_url, &["db", "multicast", "groups"]); + // group id + assert!( + output.contains(&group.identity.id.to_string()), + "Expected group id in output, got: {output}" + ); + // group name + assert!( + output.contains("test-mcast-group"), + "Expected group name in output, got: {output}" + ); + // state + assert!( + output.contains("Active"), + "Expected state 'Active' in output, got: {output}" + ); + // multicast ip + assert!( + output.contains(&group.multicast_ip.to_string()), + "Expected multicast ip in output, got: {output}" + ); + // range (ASM for 224.x.x.x) + assert!( + output.contains("ASM"), + "Expected range 'ASM' in output, got: {output}" + ); + // vni (column exists but VNI is internal, not exposed in the external API) + assert!( + output.contains("VNI"), + "Expected VNI column in output, got: {output}" + ); + // members (instance@sled format, "-" when not started) + assert!( + output.contains("test-instance@-"), + "Expected member 'test-instance@-' in output, got: {output}" + ); + + // Test: omdb db multicast groups --state active + let output = + run_omdb(&db_url, &["db", "multicast", "groups", "--state", "active"]); + assert!( + output.contains("test-mcast-group"), + "Expected group name with state filter, got: {output}" + ); + + // Test: omdb db multicast groups --pool + let output = run_omdb( + &db_url, + &["db", "multicast", "groups", "--pool", "test-mcast-pool"], + ); + assert!( + output.contains("test-mcast-group"), + "Expected group name with pool filter, got: {output}" + ); + + // Test: omdb db multicast members + let output = run_omdb(&db_url, &["db", "multicast", "members"]); + // group name + assert!( + output.contains("test-mcast-group"), + "Expected group name in members output, got: {output}" + ); + // parent id (instance id) + assert!( + output.contains(&instance.identity.id.to_string()), + "Expected parent id in members output, got: {output}" + ); + // multicast ip + let group_ip = group.multicast_ip.to_string(); + assert!( + output.contains(&group_ip), + "Expected multicast ip in members output, got: {output}" + ); + // sources ("-" = any-source member) + let has_any_source = output.lines().any(|line| { + line.contains(&instance.identity.id.to_string()) && line.contains(" - ") + }); + assert!( + has_any_source, + "Expected '-' for any-source member, got: {output}" + ); + + // Test: omdb db multicast members --group-name + let output = run_omdb( + &db_url, + &["db", "multicast", "members", "--group-name", "test-mcast-group"], + ); + assert!( + output.contains(&instance.identity.id.to_string()), + "Expected instance ID with group-name filter, got: {output}" + ); + + // Test: omdb db multicast members --group-ip (reuses group_ip from above) + let output = run_omdb( + &db_url, + &["db", "multicast", "members", "--group-ip", &group_ip], + ); + assert!( + output.contains(&instance.identity.id.to_string()), + "Expected instance ID with group-ip filter, got: {output}" + ); + + // Test: omdb db multicast members --group-id + let group_id = group.identity.id.to_string(); + let output = run_omdb( + &db_url, + &["db", "multicast", "members", "--group-id", &group_id], + ); + assert!( + output.contains(&instance.identity.id.to_string()), + "Expected instance ID with group-id filter, got: {output}" + ); + + // Test: omdb db multicast members --state left + // Wait for the RPW reconciler to transition member to "Left" state + // (instance isn't running, so no sled_id assignment) + wait_for_member_state( + cptestctx, + "test-mcast-group", + instance.identity.id, + nexus_db_model::MulticastGroupMemberState::Left, + ) + .await; + let output = + run_omdb(&db_url, &["db", "multicast", "members", "--state", "left"]); + assert!( + output.contains(&instance.identity.id.to_string()), + "Expected instance ID with state=left filter, got: {output}" + ); + + // Test: omdb db multicast members --sled-id + // Create a started instance so the member gets a sled_id + let started_instance = create_test_instance( + client, + PROJECT_NAME, + "started-instance", + true, // start the instance + ) + .await; + + // Add member to a new group for the started instance + let sled_join_url = format!( + "/v1/instances/{}/multicast-groups/sled-test-group?project={PROJECT_NAME}", + started_instance.identity.id + ); + object_put_upsert::<_, MulticastGroupMember>( + client, + &sled_join_url, + &InstanceMulticastGroupJoin { source_ips: None, ip_version: None }, + ) + .await; + + wait_for_group_active(client, "sled-test-group").await; + + // Query members by sled_id - the started instance should be on first_sled + let sled_id = cptestctx.first_sled_id().to_string(); + let output = run_omdb( + &db_url, + &["db", "multicast", "members", "--sled-id", &sled_id], + ); + assert!( + output.contains(&started_instance.identity.id.to_string()), + "Expected started instance ID with sled-id filter, got: {output}" + ); + + // Test: omdb db multicast members --state joined + // Wait for the started instance's member to reach "Joined" state + wait_for_member_state( + cptestctx, + "sled-test-group", + started_instance.identity.id, + nexus_db_model::MulticastGroupMemberState::Joined, + ) + .await; + + // Now test the --state joined filter + let output_joined = + run_omdb(&db_url, &["db", "multicast", "members", "--state", "joined"]); + assert!( + output_joined.contains(&started_instance.identity.id.to_string()), + "Expected started instance in joined state, got: {output_joined}" + ); + // state column shows "Joined" + assert!( + output_joined.contains("Joined"), + "Expected 'Joined' state in members output, got: {output_joined}" + ); + // sled_id column shows the sled UUID + assert!( + output_joined.contains(&sled_id), + "Expected sled_id in members output, got: {output_joined}" + ); + + // Verify info for started instance shows sled serial (not "-") + let output_info = run_omdb( + &db_url, + &["db", "multicast", "info", "--name", "sled-test-group"], + ); + // member instance name + assert!( + output_info.contains("started-instance"), + "Expected 'started-instance' in info members, got: {output_info}" + ); + // underlay group should be present for active group + assert!( + output_info.contains("UNDERLAY GROUP"), + "Expected 'UNDERLAY GROUP' section in info output, got: {output_info}" + ); + + // Verify groups output shows started instance with sled serial (not "-") + let output_groups = run_omdb(&db_url, &["db", "multicast", "groups"]); + // sled-test-group should show "started-instance@" not "started-instance@-" + assert!( + output_groups.contains("started-instance@"), + "Expected 'started-instance@' in groups members column, got: {output_groups}" + ); + // The sled serial should appear (not just "-") + // Note: test sled serial is typically "serial0" or similar + assert!( + !output_groups.contains("started-instance@-"), + "Started instance should have sled serial, not '-', got: {output_groups}" + ); + + // Verify underlay_ip column shows an IP for active groups + // Active groups with joined members should have an underlay group assigned + // The underlay IP is in the ff04::/16 range (admin-local IPv6 multicast) + assert!( + output_groups.contains("ff04:"), + "Expected underlay_ip (ff04:*) for active group in groups output, got: {output_groups}" + ); + + // Verify started instance is not in "Left" state + let output_left = + run_omdb(&db_url, &["db", "multicast", "members", "--state", "left"]); + assert!( + !output_left.contains(&started_instance.identity.id.to_string()), + "Started instance should not be in 'Left' state, got: {output_left}" + ); + + // Test: combined filters (--group-name + --state) + // The started instance's member should appear when filtering by both + let output_combined = run_omdb( + &db_url, + &[ + "db", + "multicast", + "members", + "--group-name", + "sled-test-group", + "--state", + "joined", + ], + ); + assert!( + output_combined.contains(&started_instance.identity.id.to_string()), + "Expected started instance with combined filters, got: {output_combined}" + ); + + // Test: combined filters that should return empty (wrong group + state) + let output_combined_empty = run_omdb( + &db_url, + &[ + "db", + "multicast", + "members", + "--group-name", + "test-mcast-group", + "--state", + "joined", + ], + ); + // test-mcast-group has a non-started instance, so it should not be in "Joined" state + assert!( + !output_combined_empty + .contains(&started_instance.identity.id.to_string()), + "Started instance should not appear in wrong group filter, got: {output_combined_empty}" + ); + + // Test: omdb db multicast info --name + let output = run_omdb( + &db_url, + &["db", "multicast", "info", "--name", "test-mcast-group"], + ); + // section header + assert!( + output.contains("MULTICAST GROUP"), + "Expected 'MULTICAST GROUP' header in info output, got: {output}" + ); + // id + assert!( + output.contains(&group.identity.id.to_string()), + "Expected group id in info output, got: {output}" + ); + // name + assert!( + output.contains("test-mcast-group"), + "Expected group name in info output, got: {output}" + ); + // state + assert!( + output.contains("Active"), + "Expected state 'Active' in info output, got: {output}" + ); + // multicast ip + assert!( + output.contains(&group.multicast_ip.to_string()), + "Expected multicast ip in info output, got: {output}" + ); + // vni (field exists but VNI is internal, not exposed in the external API) + assert!( + output.contains("vni:"), + "Expected vni field in info output, got: {output}" + ); + // ip pool + assert!( + output.contains("test-mcast-pool"), + "Expected pool name in info output, got: {output}" + ); + // members section + assert!( + output.contains("MEMBERS"), + "Expected 'MEMBERS' section in info output, got: {output}" + ); + // member instance name + assert!( + output.contains("test-instance"), + "Expected instance name in info members, got: {output}" + ); + // member sled ("-" when not started) - check specific line pattern + // More specific than just contains("-") which could match table separators + let has_sled_dash = output + .lines() + .any(|line| line.contains("test-instance") && line.contains(" - ")); + assert!( + has_sled_dash, + "Expected sled '-' for non-started instance on same line as instance name, got: {output}" + ); + + // Test: omdb db multicast info --ip + let output = + run_omdb(&db_url, &["db", "multicast", "info", "--ip", &group_ip]); + assert!( + output.contains("test-mcast-group"), + "Expected group name when querying by IP, got: {output}" + ); + + // Test: omdb db multicast info --group-id (reuses group_id from members test) + let output = run_omdb( + &db_url, + &["db", "multicast", "info", "--group-id", &group_id], + ); + assert!( + output.contains("test-mcast-group"), + "Expected group name when querying by ID, got: {output}" + ); + + // Test SSM (Source-Specific Multicast) - group in 232/8 range + // SSM range is 232.0.0.0/8 for IPv4, ff3x::/32 for IPv6 + let ssm_range = IpRange::V4( + Ipv4Range::new( + std::net::Ipv4Addr::new(232, 1, 0, 0), + std::net::Ipv4Addr::new(232, 1, 0, 255), + ) + .unwrap(), + ); + create_multicast_pool_linked(client, "test-ssm-pool", Some(ssm_range)) + .await; + + let ssm_instance = + create_test_instance(client, PROJECT_NAME, "ssm-instance", false).await; + + let ssm_join_url = format!( + "/v1/instances/{}/multicast-groups/ssm-group?project={PROJECT_NAME}", + ssm_instance.identity.id + ); + object_put_upsert::<_, MulticastGroupMember>( + client, + &ssm_join_url, + &InstanceMulticastGroupJoin { + source_ips: Some(vec![ + "10.0.0.1".parse::().unwrap(), + "10.0.0.2".parse::().unwrap(), + ]), + ip_version: None, + }, + ) + .await; + + wait_for_group_active(client, "ssm-group").await; + + // Verify SSM group shows in groups list with sources + let output = run_omdb(&db_url, &["db", "multicast", "groups"]); + assert!( + output.contains("ssm-group"), + "Expected SSM group in output, got: {output}" + ); + // Verify SSM is shown in RANGE column (232.x.x.x = SSM range) + assert!( + output.contains("SSM"), + "Expected SSM in range column, got: {output}" + ); + // Verify ASM is shown for 224.x.x.x range (test-mcast-group) + assert!( + output.contains("ASM"), + "Expected ASM in range column, got: {output}" + ); + // Verify SSM source IPs + assert!( + output.contains("10.0.0.1") && output.contains("10.0.0.2"), + "Expected SSM source IPs in output, got: {output}" + ); + + // Verify SSM sources show in info command + let output = + run_omdb(&db_url, &["db", "multicast", "info", "--name", "ssm-group"]); + assert!( + output.contains("10.0.0.1") || output.contains("10.0.0.2"), + "Expected SSM source IPs in info output, got: {output}" + ); + + // Test: omdb db multicast members shows sources per member + let output = run_omdb(&db_url, &["db", "multicast", "members"]); + // SSM member should show its sources + assert!( + output.contains("10.0.0.1") || output.contains("10.0.0.2"), + "Expected SSM member sources in members output, got: {output}" + ); + + // Test: omdb db multicast members --source-ip + // Filter by SSM source IP - should find SSM member + let output = run_omdb( + &db_url, + &["db", "multicast", "members", "--source-ip", "10.0.0.1"], + ); + assert!( + output.contains(&ssm_instance.identity.id.to_string()), + "Expected SSM instance with source-ip filter, got: {output}" + ); + // Members without sources should not appear for any source-ip filter + assert!( + !output.contains(&instance.identity.id.to_string()), + "Member without sources should not appear, got: {output}" + ); + + // Test: --source-ip with non-existent IP returns no members + let output = run_omdb( + &db_url, + &["db", "multicast", "members", "--source-ip", "10.99.99.99"], + ); + assert!( + !output.contains(&ssm_instance.identity.id.to_string()), + "No members should match non-existent source IP, got: {output}" + ); +} diff --git a/dev-tools/omdb/tests/usage_errors.out b/dev-tools/omdb/tests/usage_errors.out index 31d64d581e3..b37ee8ec3e7 100644 --- a/dev-tools/omdb/tests/usage_errors.out +++ b/dev-tools/omdb/tests/usage_errors.out @@ -141,6 +141,7 @@ Commands: instances Alias to `omdb instance list` network Print information about the network migrations Print information about migrations + multicast Print information about multicast groups snapshots Print information about snapshots validate Validate the contents of the database volumes Print information about volumes @@ -208,6 +209,7 @@ Commands: instances Alias to `omdb instance list` network Print information about the network migrations Print information about migrations + multicast Print information about multicast groups snapshots Print information about snapshots validate Validate the contents of the database volumes Print information about volumes @@ -818,6 +820,41 @@ Database Options: --include-deleted whether to include soft-deleted records when enumerating objects that can be soft-deleted +Safety Options: + -w, --destructive Allow potentially-destructive subcommands +============================================= +EXECUTING COMMAND: omdb ["db", "multicast"] +termination: Exited(2) +--------------------------------------------- +stdout: +--------------------------------------------- +stderr: +Print information about multicast groups + +Usage: omdb db multicast [OPTIONS] + +Commands: + groups List all multicast groups + members List all multicast group members + pools List multicast IP pools and their ranges + info Get detailed info for a multicast group + help Print this message or the help of the given subcommand(s) + +Options: + --log-level log level filter [env: LOG_LEVEL=] [default: warn] + --color Color output [default: auto] [possible values: auto, always, never] + -h, --help Print help + +Connection Options: + --db-url URL of the database SQL interface [env: OMDB_DB_URL=] + --dns-server [env: OMDB_DNS_SERVER=] + +Database Options: + --fetch-limit limit to apply to queries that fetch rows [env: + OMDB_FETCH_LIMIT=] [default: 500] + --include-deleted whether to include soft-deleted records when enumerating objects + that can be soft-deleted + Safety Options: -w, --destructive Allow potentially-destructive subcommands ============================================= diff --git a/nexus/db-schema/src/schema.rs b/nexus/db-schema/src/schema.rs index 9c5145d0892..42a18f268da 100644 --- a/nexus/db-schema/src/schema.rs +++ b/nexus/db-schema/src/schema.rs @@ -2946,7 +2946,11 @@ table! { } // Allow multicast tables to appear together for NOT EXISTS subqueries -allow_tables_to_appear_in_same_query!(multicast_group, multicast_group_member); +allow_tables_to_appear_in_same_query!( + multicast_group, + underlay_multicast_group, + multicast_group_member +); allow_tables_to_appear_in_same_query!(user_data_export, snapshot, image); diff --git a/nexus/test-utils/src/resource_helpers.rs b/nexus/test-utils/src/resource_helpers.rs index 6a1f8a931ab..d292f38a02d 100644 --- a/nexus/test-utils/src/resource_helpers.rs +++ b/nexus/test-utils/src/resource_helpers.rs @@ -232,6 +232,29 @@ where .unwrap() } +/// Like [`object_put`], but expects 201 Created instead of 200 OK. +pub async fn object_put_upsert( + client: &ClientTestContext, + path: &str, + input: &InputType, +) -> OutputType +where + InputType: serde::Serialize, + OutputType: serde::de::DeserializeOwned, +{ + NexusRequest::new( + RequestBuilder::new(client, Method::PUT, path) + .body(Some(input)) + .expect_status(Some(StatusCode::CREATED)), + ) + .authn_as(AuthnMode::PrivilegedUser) + .execute() + .await + .unwrap_or_else(|e| panic!("failed to make \"PUT\" request to {path}: {e}")) + .parsed_body() + .unwrap() +} + pub async fn object_put_error( client: &ClientTestContext, path: &str, From 8101922b99bdc4f6f252df00ea3d61b7bdd5d40c Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Thu, 14 May 2026 11:27:18 +0000 Subject: [PATCH 3/5] [dendrite] update --- Cargo.lock | 14 +++++++------- Cargo.toml | 2 +- package-manifest.toml | 12 ++++++------ tools/dendrite_stub_checksums | 6 +++--- tools/dendrite_version | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e8160c5e35b..66661d3861e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1742,7 +1742,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?rev=23aa445fea291fab3589c8986b6bb7b4c6783438#23aa445fea291fab3589c8986b6bb7b4c6783438" +source = "git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e#b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e" dependencies = [ "anyhow", "chrono", @@ -3109,11 +3109,11 @@ dependencies = [ [[package]] name = "dpd-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?rev=23aa445fea291fab3589c8986b6bb7b4c6783438#23aa445fea291fab3589c8986b6bb7b4c6783438" +source = "git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e#b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e" dependencies = [ "async-trait", "chrono", - "common 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=23aa445fea291fab3589c8986b6bb7b4c6783438)", + "common 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e)", "crc8", "futures", "http", @@ -7597,7 +7597,7 @@ dependencies = [ "chrono", "crucible-agent-client", "dns-service-client", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=23aa445fea291fab3589c8986b6bb7b4c6783438)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e)", "dropshot", "futures", "gateway-messages", @@ -8554,7 +8554,7 @@ dependencies = [ "display-error-chain", "dns-server", "dns-service-client", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=23aa445fea291fab3589c8986b6bb7b4c6783438)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e)", "dropshot", "ereport-types", "expectorate", @@ -16754,7 +16754,7 @@ name = "wicket-common" version = "0.1.0" dependencies = [ "anyhow", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=23aa445fea291fab3589c8986b6bb7b4c6783438)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e)", "dropshot", "gateway-client", "gateway-types", @@ -16819,7 +16819,7 @@ dependencies = [ "clap", "debug-ignore", "display-error-chain", - "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=23aa445fea291fab3589c8986b6bb7b4c6783438)", + "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e)", "dropshot", "either", "expectorate", diff --git a/Cargo.toml b/Cargo.toml index 2402cad2b47..f984ca76cc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -497,7 +497,7 @@ digest = "0.10.7" dns-server = { path = "dns-server" } dns-server-api = { path = "dns-server-api" } dns-service-client = { path = "clients/dns-service-client" } -dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "23aa445fea291fab3589c8986b6bb7b4c6783438" } +dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e" } dropshot = { version = "0.17.0", features = [ "usdt-probes" ] } dropshot-api-manager = "0.7.1" dropshot-api-manager-types = "0.7.1" diff --git a/package-manifest.toml b/package-manifest.toml index bc34f8307ed..5f6e5ca97c9 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -765,8 +765,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "23aa445fea291fab3589c8986b6bb7b4c6783438" -source.sha256 = "964a710c1e1ed6c887f2dcbc800922521e51394af6071d6f18f059c74b8cf43b" +source.commit = "b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e" +source.sha256 = "e93fb407fd59631550d39031628b5908d26348417b066573b0dd718463e48ceb" output.type = "zone" output.intermediate_only = true @@ -792,8 +792,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "23aa445fea291fab3589c8986b6bb7b4c6783438" -source.sha256 = "8957e5da2b8f5c8416b5ce46e56c2b69bbc5620a9ada7e6a3ffab1d827264357" +source.commit = "b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e" +source.sha256 = "ab330b945064ae184480131c9a2d569df982808c0d2a51436dff8f55f921ef7a" output.type = "zone" output.intermediate_only = true @@ -812,8 +812,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "23aa445fea291fab3589c8986b6bb7b4c6783438" -source.sha256 = "57365bebd6f28b05dd18e2b3b6ec4a9e63678b3946c29117629d31b0027627aa" +source.commit = "b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e" +source.sha256 = "356d25615d803fe6f18f1180af5c5e1b1d094e157faba44824d1177e24283248" output.type = "zone" output.intermediate_only = true diff --git a/tools/dendrite_stub_checksums b/tools/dendrite_stub_checksums index 9759004dac1..cc19f5649f6 100644 --- a/tools/dendrite_stub_checksums +++ b/tools/dendrite_stub_checksums @@ -1,3 +1,3 @@ -CIDL_SHA256_ILLUMOS="964a710c1e1ed6c887f2dcbc800922521e51394af6071d6f18f059c74b8cf43b" -CIDL_SHA256_LINUX_DPD="4a1b9dd7606cd383d309c0afa80527b845665908b846bb58eec49b452a9a67dc" -CIDL_SHA256_LINUX_SWADM="26c52328b5db50a77f903579521c7e6a89d36e851ba9ecf536aa6db749a7c0e4" +CIDL_SHA256_ILLUMOS="e93fb407fd59631550d39031628b5908d26348417b066573b0dd718463e48ceb" +CIDL_SHA256_LINUX_DPD="c68c5c1b6f671f8afcdfbbba2fe19a028db3b8d0a76c805f743a920b0e0980c4" +CIDL_SHA256_LINUX_SWADM="6fd13a520bfd7dfa18063f9d2ad38117acc03ea8f60783662648435b43a6daf2" diff --git a/tools/dendrite_version b/tools/dendrite_version index 5c247d59bcf..9e5c65fa4e2 100644 --- a/tools/dendrite_version +++ b/tools/dendrite_version @@ -1 +1 @@ -COMMIT="23aa445fea291fab3589c8986b6bb7b4c6783438" +COMMIT="b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e" From df36929cb94e04c71a403b9f687b0ef5747895b9 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Thu, 21 May 2026 13:51:00 +0000 Subject: [PATCH 4/5] [multicast-e2e] migrate to mg-api-types + oxlog patch + maghemite 864e0e15 (zl/ddm-mcast) --- .envrc | 1 + Cargo.lock | 1986 ++++++++++++----- Cargo.toml | 37 +- clients/ddm-admin-client/src/lib.rs | 4 +- dev-tools/downloader/src/lib.rs | 82 + env.sh | 1 + internal-dns/types/src/config.rs | 98 +- internal-dns/types/src/names.rs | 5 +- nexus/Cargo.toml | 2 +- nexus/reconfigurator/execution/src/dns.rs | 7 +- .../execution/src/test_utils.rs | 2 + nexus/reconfigurator/planning/src/example.rs | 3 +- .../tasks/sync_switch_configuration.rs | 24 +- nexus/src/app/bgp.rs | 6 +- nexus/test-utils/src/nexus_test.rs | 4 + nexus/test-utils/src/starter.rs | 45 +- .../tests/integration_tests/initialization.rs | 7 + nexus/types/src/deployment/execution/dns.rs | 4 +- .../src/deployment/execution/overridables.rs | 30 + nexus/types/versions/Cargo.toml | 1 + nexus/types/versions/src/impls/networking.rs | 6 +- package-manifest.toml | 24 +- sled-agent/early-networking/Cargo.toml | 2 +- sled-agent/early-networking/src/lib.rs | 28 +- sled-agent/rack-setup/src/plan/service.rs | 19 +- test-utils/src/dev/maghemite.rs | 244 +- tools/install_builder_prerequisites.sh | 1 + tools/maghemite_ddm_openapi_version | 2 +- tools/maghemite_mg_openapi_version | 2 +- tools/maghemite_mgd_checksums | 4 +- tools/update_maghemite.sh | 8 +- workspace-hack/Cargo.toml | 20 +- 32 files changed, 2103 insertions(+), 606 deletions(-) diff --git a/.envrc b/.envrc index 9731258f343..a6ab4f52174 100644 --- a/.envrc +++ b/.envrc @@ -5,6 +5,7 @@ PATH_add out/cockroachdb/bin PATH_add out/clickhouse PATH_add out/dendrite-stub/bin PATH_add out/mgd/root/opt/oxide/mgd/bin +PATH_add out/mg-ddm/root/opt/oxide/mg-ddm/bin if [ "$OMICRON_USE_FLAKE" = 1 ] && nix flake show &> /dev/null then diff --git a/Cargo.lock b/Cargo.lock index f08f2761a3a..247f541e1cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -185,6 +185,17 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "api_identity" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "omicron-workspace-hack", + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "approx" version = "0.5.1" @@ -647,9 +658,28 @@ dependencies = [ [[package]] name = "bhyve_api" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/propolis?rev=6615e4f072c58f4d10e29007f328c536c464445d#6615e4f072c58f4d10e29007f328c536c464445d" +source = "git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd#75518ad2c26db9278895ab1262c28daf13bfdffd" +dependencies = [ + "bhyve_api_sys 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", + "libc", + "strum 0.26.3", +] + +[[package]] +name = "bhyve_api" +version = "0.0.0" +source = "git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845#bc489ddf0f38f75e0c194b86cf6f0de377f68845" +dependencies = [ + "bhyve_api_sys 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845)", + "libc", + "strum 0.26.3", +] + +[[package]] +name = "bhyve_api_sys" +version = "0.0.0" +source = "git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd#75518ad2c26db9278895ab1262c28daf13bfdffd" dependencies = [ - "bhyve_api_sys", "libc", "strum 0.26.3", ] @@ -657,7 +687,7 @@ dependencies = [ [[package]] name = "bhyve_api_sys" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/propolis?rev=6615e4f072c58f4d10e29007f328c536c464445d#6615e4f072c58f4d10e29007f328c536c464445d" +source = "git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845#bc489ddf0f38f75e0c194b86cf6f0de377f68845" dependencies = [ "libc", "strum 0.26.3", @@ -672,7 +702,7 @@ dependencies = [ "bitflags 2.11.0", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.10.5", "log", "prettyplease", "proc-macro2", @@ -848,7 +878,7 @@ dependencies = [ "derive_more 0.99.20", "hex", "hkdf", - "omicron-ledger", + "omicron-ledger 0.1.0", "omicron-workspace-hack", "proptest", "rand 0.8.6", @@ -856,7 +886,7 @@ dependencies = [ "serde", "serde_with", "sha3", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog", "slog-async", "slog-error-chain", @@ -868,6 +898,35 @@ dependencies = [ "zeroize", ] +[[package]] +name = "bootstore" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "bytes", + "camino", + "chacha20poly1305", + "ciborium", + "derive_more 0.99.20", + "hex", + "hkdf", + "omicron-ledger 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-workspace-hack", + "rand 0.8.6", + "secrecy 0.10.3", + "serde", + "serde_with", + "sha3", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "slog", + "slog-error-chain", + "thiserror 2.0.18", + "tokio", + "uuid", + "vsss-rs", + "zeroize", +] + [[package]] name = "bootstrap-agent-api" version = "0.1.0" @@ -879,9 +938,9 @@ dependencies = [ "omicron-workspace-hack", "schemars 0.8.22", "serde", - "sled-agent-types", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", "tufaceous-artifact", ] @@ -899,8 +958,8 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "uuid", ] @@ -909,7 +968,7 @@ dependencies = [ name = "bootstrap-agent-lockstep-api" version = "0.1.0" dependencies = [ - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "dropshot", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -929,8 +988,8 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", ] @@ -940,13 +999,30 @@ version = "0.1.0" dependencies = [ "anyhow", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", + "strum 0.27.2", +] + +[[package]] +name = "bootstrap-agent-lockstep-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "omicron-common", + "omicron-passwords 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "omicron-uuid-kinds", "omicron-workspace-hack", "schemars 0.8.22", "serde", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "strum 0.27.2", ] @@ -1234,7 +1310,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom", + "nom 7.1.3", ] [[package]] @@ -1451,7 +1527,7 @@ dependencies = [ "chrono", "clap", "clickhouse-admin-server-client", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "dropshot", "futures", "omicron-common", @@ -1473,7 +1549,7 @@ dependencies = [ name = "clickhouse-admin-api" version = "0.1.0" dependencies = [ - "clickhouse-admin-types-versions", + "clickhouse-admin-types-versions 0.1.0", "dropshot", "dropshot-api-manager-types", "omicron-common", @@ -1489,7 +1565,7 @@ name = "clickhouse-admin-keeper-client" version = "0.1.0" dependencies = [ "chrono", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "omicron-uuid-kinds", "omicron-workspace-hack", "progenitor 0.14.0", @@ -1504,7 +1580,7 @@ name = "clickhouse-admin-server-client" version = "0.1.0" dependencies = [ "chrono", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "omicron-uuid-kinds", "omicron-workspace-hack", "progenitor 0.14.0", @@ -1519,7 +1595,7 @@ name = "clickhouse-admin-single-client" version = "0.1.0" dependencies = [ "chrono", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "omicron-uuid-kinds", "omicron-workspace-hack", "progenitor 0.14.0", @@ -1534,7 +1610,7 @@ name = "clickhouse-admin-test-utils" version = "0.1.0" dependencies = [ "camino", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "clickward", "dropshot", "omicron-workspace-hack", @@ -1544,7 +1620,16 @@ dependencies = [ name = "clickhouse-admin-types" version = "0.1.0" dependencies = [ - "clickhouse-admin-types-versions", + "clickhouse-admin-types-versions 0.1.0", + "omicron-workspace-hack", +] + +[[package]] +name = "clickhouse-admin-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "clickhouse-admin-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "omicron-workspace-hack", ] @@ -1572,6 +1657,29 @@ dependencies = [ "slog-term", ] +[[package]] +name = "clickhouse-admin-types-versions" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "atomicwrites", + "camino", + "camino-tempfile", + "chrono", + "daft", + "derive_more 0.99.20", + "expectorate", + "iddqd", + "itertools 0.14.0", + "omicron-common", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", + "serde_json", + "slog", +] + [[package]] name = "clickhouse-cluster-dev" version = "0.1.0" @@ -1581,7 +1689,7 @@ dependencies = [ "clickward", "omicron-workspace-hack", "oxide-tokio-rt", - "oximeter-db", + "oximeter-db 0.1.0", "oximeter-test-utils", "scopeguard", "slog", @@ -1635,7 +1743,7 @@ dependencies = [ name = "cockroach-admin-api" version = "0.1.0" dependencies = [ - "cockroach-admin-types-versions", + "cockroach-admin-types-versions 0.1.0", "dropshot", "dropshot-api-manager-types", "http", @@ -1662,7 +1770,17 @@ dependencies = [ name = "cockroach-admin-types" version = "0.1.0" dependencies = [ - "cockroach-admin-types-versions", + "cockroach-admin-types-versions 0.1.0", + "omicron-workspace-hack", + "serde", +] + +[[package]] +name = "cockroach-admin-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "cockroach-admin-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "omicron-workspace-hack", "serde", ] @@ -1683,6 +1801,20 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "cockroach-admin-types-versions" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "chrono", + "csv", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", + "thiserror 2.0.18", +] + [[package]] name = "colorchoice" version = "1.0.4" @@ -1705,7 +1837,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] @@ -1721,7 +1853,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?branch=main#f20f786e67c86388dfaaf0ef3aa9d2693dfe1da4" +source = "git+https://github.com/oxidecomputer/dendrite?branch=main#50ed531201ea5f85115141a2203d551fbbdaa3da" dependencies = [ "anyhow", "chrono", @@ -1734,7 +1866,7 @@ dependencies = [ "slog-async", "slog-bunyan", "slog-term", - "smf 0.10.0", + "smf 0.10.0 (git+https://github.com/illumos/smf-rs)", "thiserror 1.0.69", "tokio", ] @@ -1755,7 +1887,7 @@ dependencies = [ "slog-async", "slog-bunyan", "slog-term", - "smf 0.10.0", + "smf 0.10.0 (git+https://github.com/illumos/smf-rs)", "thiserror 1.0.69", "tokio", ] @@ -1777,7 +1909,7 @@ dependencies = [ "slog-async", "slog-bunyan", "slog-term", - "smf 0.10.0", + "smf 0.10.0 (git+https://github.com/illumos/smf-rs)", "thiserror 1.0.69", "tokio", ] @@ -2167,7 +2299,20 @@ dependencies = [ [[package]] name = "crucible-client-types" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/crucible?rev=3c1708d86e10f0370807388a1efe092edd99d431#3c1708d86e10f0370807388a1efe092edd99d431" +source = "git+https://github.com/oxidecomputer/crucible?rev=ae1da83e66c648574827298f4bc444632bf4d047#ae1da83e66c648574827298f4bc444632bf4d047" +dependencies = [ + "base64 0.22.1", + "crucible-workspace-hack", + "schemars 0.8.22", + "serde", + "serde_json", + "uuid", +] + +[[package]] +name = "crucible-client-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/crucible?rev=bd9a0e2abe6b6b89aec8c85f4ee57474144ed150#bd9a0e2abe6b6b89aec8c85f4ee57474144ed150" dependencies = [ "base64 0.22.1", "crucible-workspace-hack", @@ -2236,6 +2381,18 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "crucible-smf" +version = "0.0.0" +source = "git+https://github.com/oxidecomputer/crucible?rev=7103cd3a3d7b0112d2949dd135db06fef0c156bb#7103cd3a3d7b0112d2949dd135db06fef0c156bb" +dependencies = [ + "crucible-workspace-hack", + "libc", + "num-derive 0.4.2", + "num-traits", + "thiserror 2.0.18", +] + [[package]] name = "crucible-workspace-hack" version = "0.1.0" @@ -2341,9 +2498,9 @@ dependencies = [ [[package]] name = "daft" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a26f1f0a7934549bf8d8448d9da072c31f14e1e407b6cbacfdc07b3777988e" +checksum = "49921a57f45e3bf2cc8a0c4e3a10aa342b95a481d7dd89d844c1225496957296" dependencies = [ "daft-derive", "newtype-uuid", @@ -2354,9 +2511,9 @@ dependencies = [ [[package]] name = "daft-derive" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c6a4a4003df965e441d13b2a7044efa44334b567c984701f8a2773f815c5e2" +checksum = "91850c0efee1e6dffcea4e5841ff3a71db80575a79f933d0c77e41c6fe0973d1" dependencies = [ "proc-macro2", "quote", @@ -2526,8 +2683,9 @@ dependencies = [ [[package]] name = "ddm-admin-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/maghemite?rev=5050964daba98b5ecf91ea2a5a9be9418f1853f9#5050964daba98b5ecf91ea2a5a9be9418f1853f9" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" dependencies = [ + "ddm-api-types-versions", "oxnet", "progenitor 0.14.0", "reqwest 0.13.2", @@ -2536,6 +2694,29 @@ dependencies = [ "uuid", ] +[[package]] +name = "ddm-api-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" +dependencies = [ + "ddm-api-types-versions", +] + +[[package]] +name = "ddm-api-types-versions" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" +dependencies = [ + "multicast-types", + "omicron-common", + "oxnet", + "schemars 0.8.22", + "serde", + "serde_repr", + "thiserror 2.0.18", + "uuid", +] + [[package]] name = "debug-ignore" version = "1.0.5" @@ -2938,11 +3119,11 @@ dependencies = [ [[package]] name = "dlpi" version = "0.2.0" -source = "git+https://github.com/oxidecomputer/dlpi-sys#d9645f8d61187e76384474b1100f6537fb644993" +source = "git+https://github.com/oxidecomputer/dlpi-sys#a611f32a2374579d25e628b395a9cb251f753388" dependencies = [ "libc", "libdlpi-sys", - "num_enum 0.7.5", + "num_enum 0.7.6", "pretty-hex", "thiserror 2.0.18", ] @@ -2964,8 +3145,8 @@ dependencies = [ "hickory-proto 0.25.2", "hickory-resolver 0.25.2", "hickory-server", - "internal-dns-types", - "internal-dns-types-versions", + "internal-dns-types 0.1.0", + "internal-dns-types-versions 0.1.0", "omicron-common", "omicron-test-utils", "omicron-workspace-hack", @@ -2992,7 +3173,7 @@ dependencies = [ "chrono", "dropshot", "dropshot-api-manager-types", - "internal-dns-types-versions", + "internal-dns-types-versions 0.1.0", "omicron-workspace-hack", "schemars 0.8.22", "semver 1.0.28", @@ -3006,7 +3187,7 @@ dependencies = [ "chrono", "expectorate", "http", - "internal-dns-types-versions", + "internal-dns-types-versions 0.1.0", "omicron-workspace-hack", "progenitor 0.14.0", "reqwest 0.13.2", @@ -3027,7 +3208,7 @@ dependencies = [ "dns-service-client", "dropshot", "expectorate", - "internal-dns-types", + "internal-dns-types 0.1.0", "omicron-test-utils", "omicron-workspace-hack", "oxide-tokio-rt", @@ -3085,7 +3266,7 @@ checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" [[package]] name = "dpd-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dendrite?branch=main#f20f786e67c86388dfaaf0ef3aa9d2693dfe1da4" +source = "git+https://github.com/oxidecomputer/dendrite?branch=main#50ed531201ea5f85115141a2203d551fbbdaa3da" dependencies = [ "async-trait", "chrono", @@ -3441,7 +3622,7 @@ dependencies = [ "anyhow", "async-trait", "base64 0.22.1", - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "bytes", "chrono", "clap", @@ -3452,8 +3633,8 @@ dependencies = [ "hickory-resolver 0.25.2", "http", "humantime", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "internet-checksum", "ispf", "macaddr", @@ -3471,7 +3652,7 @@ dependencies = [ "russh-keys", "serde", "serde_json", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-error-chain", "socket2 0.5.10", @@ -3559,6 +3740,20 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "ereport-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "dropshot", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", + "serde_json", + "thiserror 2.0.18", +] + [[package]] name = "errno" version = "0.3.14" @@ -3566,7 +3761,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3985,8 +4180,8 @@ version = "0.1.0" dependencies = [ "dropshot", "dropshot-api-manager-types", - "ereport-types", - "gateway-types-versions", + "ereport-types 0.1.0", + "gateway-types-versions 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -4003,7 +4198,7 @@ dependencies = [ "anyhow", "clap", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "omicron-common", "omicron-uuid-kinds", @@ -4030,9 +4225,34 @@ dependencies = [ "base64 0.22.1", "chrono", "daft", - "ereport-types", + "ereport-types 0.1.0", + "gateway-messages", + "gateway-types 0.1.0", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "progenitor 0.14.0", + "rand 0.9.2", + "reqwest 0.13.2", + "schemars 0.8.22", + "serde", + "serde_json", + "slog", + "thiserror 2.0.18", + "tokio", + "uuid", +] + +[[package]] +name = "gateway-client" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "base64 0.22.1", + "chrono", + "daft", + "ereport-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "gateway-messages", - "gateway-types", + "gateway-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "omicron-uuid-kinds", "omicron-workspace-hack", "progenitor 0.14.0", @@ -4119,9 +4339,9 @@ version = "0.1.0" dependencies = [ "camino", "dropshot", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", - "gateway-types", + "gateway-types 0.1.0", "omicron-gateway", "omicron-test-utils", "omicron-workspace-hack", @@ -4137,7 +4357,16 @@ dependencies = [ name = "gateway-types" version = "0.1.0" dependencies = [ - "gateway-types-versions", + "gateway-types-versions 0.1.0", + "omicron-workspace-hack", +] + +[[package]] +name = "gateway-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "gateway-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "omicron-workspace-hack", ] @@ -4160,6 +4389,24 @@ dependencies = [ "uuid", ] +[[package]] +name = "gateway-types-versions" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "daft", + "dropshot", + "gateway-messages", + "hex", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", + "thiserror 2.0.18", + "tufaceous-artifact", + "uuid", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -4239,6 +4486,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "gfss" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "digest", + "omicron-workspace-hack", + "rand 0.9.2", + "schemars 0.8.22", + "secrecy 0.10.3", + "serde", + "subtle", + "thiserror 2.0.18", + "zeroize", +] + [[package]] name = "ghash" version = "0.5.1" @@ -5048,7 +5311,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.3", + "socket2 0.5.10", "system-configuration", "tokio", "tower-layer", @@ -5170,9 +5433,9 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "iddqd" -version = "0.3.18" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616230c7d641ef971a3a5bfcc654c6b7524ab9c9fb665693c6a397dba9a14aca" +checksum = "b1fb967ac6b9edb2b5bd91496fc95fdf5eee0772aa31aca370766975f7e57962" dependencies = [ "allocator-api2", "daft", @@ -5181,7 +5444,6 @@ dependencies = [ "hashbrown 0.16.1", "proptest", "ref-cast", - "rustc-hash", "schemars 0.8.22", "serde_core", "serde_json", @@ -5269,13 +5531,13 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "bhyve_api", + "bhyve_api 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", "byteorder", "camino", "camino-tempfile", "cfg-if", "chrono", - "crucible-smf", + "crucible-smf 0.0.0 (git+https://github.com/oxidecomputer/crucible?rev=3c1708d86e10f0370807388a1efe092edd99d431)", "debug-ignore", "dropshot", "futures", @@ -5283,7 +5545,7 @@ dependencies = [ "iddqd", "ipnetwork", "itertools 0.14.0", - "key-manager-types", + "key-manager-types 0.1.0", "libc", "macaddr", "nix 0.31.2", @@ -5300,7 +5562,7 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-async", "slog-error-chain", @@ -5317,16 +5579,65 @@ dependencies = [ ] [[package]] -name = "impl-trait-for-tuples" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +name = "illumos-utils" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - + "anyhow", + "async-trait", + "bhyve_api 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845)", + "byteorder", + "camino", + "camino-tempfile", + "cfg-if", + "chrono", + "crucible-smf 0.0.0 (git+https://github.com/oxidecomputer/crucible?rev=7103cd3a3d7b0112d2949dd135db06fef0c156bb)", + "debug-ignore", + "dropshot", + "futures", + "http", + "iddqd", + "ipnetwork", + "itertools 0.14.0", + "key-manager-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "libc", + "macaddr", + "nix 0.31.2", + "omicron-common", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "opte-ioctl", + "oxide-vpc", + "oxlog", + "oxnet", + "rustix 1.1.3", + "schemars 0.8.22", + "serde", + "sled-agent-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "slog", + "slog-async", + "slog-error-chain", + "slog-term", + "smf 0.2.3", + "thiserror 2.0.18", + "tofino", + "tokio", + "uuid", + "whoami 1.6.1", + "zone", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "indent_write" version = "2.2.0" @@ -5466,7 +5777,7 @@ dependencies = [ "hex-literal", "http", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "installinator-client", "installinator-common", "ipcc", @@ -5484,7 +5795,7 @@ dependencies = [ "serde_json", "sha2", "sled-hardware", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "sled-storage", "slog", "slog-async", @@ -5498,7 +5809,7 @@ dependencies = [ "tokio-stream", "tufaceous-artifact", "tufaceous-lib", - "update-engine", + "update-engine 0.1.0", ] [[package]] @@ -5517,7 +5828,7 @@ dependencies = [ "serde", "slog", "tufaceous-artifact", - "update-engine", + "update-engine 0.1.0", "uuid", ] @@ -5535,7 +5846,7 @@ dependencies = [ "serde", "serde_json", "slog", - "update-engine", + "update-engine 0.1.0", ] [[package]] @@ -5544,7 +5855,7 @@ version = "0.1.0" dependencies = [ "anyhow", "camino", - "illumos-utils", + "illumos-utils 0.1.0", "installinator-common-versions", "libc", "omicron-common", @@ -5557,7 +5868,7 @@ dependencies = [ "test-strategy", "thiserror 2.0.18", "tokio", - "update-engine", + "update-engine 0.1.0", ] [[package]] @@ -5587,8 +5898,8 @@ dependencies = [ "clap", "dropshot", "hickory-resolver 0.25.2", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "omicron-common", "omicron-workspace-hack", "oxide-tokio-rt", @@ -5610,7 +5921,7 @@ dependencies = [ "futures", "hickory-proto 0.25.2", "hickory-resolver 0.25.2", - "internal-dns-types", + "internal-dns-types 0.1.0", "omicron-common", "omicron-test-utils", "omicron-uuid-kinds", @@ -5628,6 +5939,24 @@ dependencies = [ "tokio", ] +[[package]] +name = "internal-dns-resolver" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "futures", + "hickory-proto 0.25.2", + "hickory-resolver 0.25.2", + "internal-dns-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-common", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "qorb", + "reqwest 0.13.2", + "slog", + "thiserror 2.0.18", +] + [[package]] name = "internal-dns-types" version = "0.1.0" @@ -5635,7 +5964,7 @@ dependencies = [ "anyhow", "chrono", "expectorate", - "internal-dns-types-versions", + "internal-dns-types-versions 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -5645,9 +5974,38 @@ dependencies = [ "strum 0.27.2", ] +[[package]] +name = "internal-dns-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "chrono", + "internal-dns-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-common", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", + "strum 0.27.2", +] + +[[package]] +name = "internal-dns-types-versions" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "omicron-common", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", +] + [[package]] name = "internal-dns-types-versions" version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ "anyhow", "chrono", @@ -5729,7 +6087,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi 0.5.2", "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5806,7 +6164,7 @@ dependencies = [ "portable-atomic", "portable-atomic-util", "serde_core", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5892,7 +6250,7 @@ version = "0.1.0" dependencies = [ "async-trait", "hkdf", - "key-manager-types", + "key-manager-types 0.1.0", "omicron-common", "omicron-workspace-hack", "secrecy 0.10.3", @@ -5911,6 +6269,15 @@ dependencies = [ "secrecy 0.10.3", ] +[[package]] +name = "key-manager-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "omicron-workspace-hack", + "secrecy 0.10.3", +] + [[package]] name = "knuffel" version = "3.2.0" @@ -6015,7 +6382,7 @@ checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] name = "libdlpi-sys" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/dlpi-sys#d9645f8d61187e76384474b1100f6537fb644993" +source = "git+https://github.com/oxidecomputer/dlpi-sys#a611f32a2374579d25e628b395a9cb251f753388" [[package]] name = "libefi-illumos" @@ -6095,23 +6462,23 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libnet" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/netadm-sys?branch=main#1e40efd8497973ef3b7d6f0285510424f53f43c5" +source = "git+https://github.com/oxidecomputer/netadm-sys?branch=main#ca2cb23e186d8f75dd1f206a7bbe9699758ab12d" dependencies = [ "anyhow", "cfg-if", "colored 3.1.1", "dlpi", "libc", - "num_enum 0.7.5", + "num_enum 0.7.6", "nvpair", "nvpair-sys", "oxnet", - "rand 0.10.0", + "rand 0.10.1", "rusty-doors", "socket2 0.6.3", "thiserror 2.0.18", "tracing", - "winnow 0.7.14", + "winnow 1.0.3", ] [[package]] @@ -6276,14 +6643,15 @@ dependencies = [ [[package]] name = "lldpd-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/lldp#d22509dfdb051321b859e924948605115691b93c" +source = "git+https://github.com/oxidecomputer/lldp#0d199cebf8fe3b24b9d943bdc46a00c227e5a345" dependencies = [ "chrono", "futures", "lldpd-common", - "progenitor 0.11.2", + "lldpd-types-versions", + "progenitor 0.13.0", "protocol", - "reqwest 0.12.28", + "reqwest 0.13.2", "schemars 0.8.22", "serde", "serde_json", @@ -6294,7 +6662,7 @@ dependencies = [ [[package]] name = "lldpd-common" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/lldp#d22509dfdb051321b859e924948605115691b93c" +source = "git+https://github.com/oxidecomputer/lldp#0d199cebf8fe3b24b9d943bdc46a00c227e5a345" dependencies = [ "anyhow", "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?branch=main)", @@ -6308,6 +6676,18 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "lldpd-types-versions" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/lldp#0d199cebf8fe3b24b9d943bdc46a00c227e5a345" +dependencies = [ + "chrono", + "protocol", + "schemars 0.8.22", + "serde", + "uuid", +] + [[package]] name = "lock_api" version = "0.4.14" @@ -6478,11 +6858,11 @@ dependencies = [ [[package]] name = "mg-admin-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/maghemite?rev=5050964daba98b5ecf91ea2a5a9be9418f1853f9#5050964daba98b5ecf91ea2a5a9be9418f1853f9" +source = "git+https://github.com/oxidecomputer/maghemite?rev=7696ee48d5ee29a917dea459e281fe2e8ff20513#7696ee48d5ee29a917dea459e281fe2e8ff20513" dependencies = [ "chrono", "colored 3.1.1", - "progenitor 0.14.0", + "progenitor 0.13.0", "rdb-types", "reqwest 0.13.2", "schemars 0.8.22", @@ -6493,6 +6873,77 @@ dependencies = [ "uuid", ] +[[package]] +name = "mg-admin-client" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" +dependencies = [ + "chrono", + "colored 3.1.1", + "mg-api-types-versions", + "mg-common", + "progenitor 0.14.0", + "reqwest 0.13.2", + "schemars 0.8.22", + "serde", + "serde_json", + "slog", + "tabwriter", + "uuid", +] + +[[package]] +name = "mg-api-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" +dependencies = [ + "mg-api-types-versions", +] + +[[package]] +name = "mg-api-types-versions" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" +dependencies = [ + "chrono", + "multicast-types", + "nom 8.0.0", + "num_enum 0.7.6", + "omicron-common", + "oxnet", + "schemars 0.8.22", + "serde", + "serde_json", + "slog", + "thiserror 2.0.18", + "uuid", +] + +[[package]] +name = "mg-common" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" +dependencies = [ + "anstyle", + "anyhow", + "backoff", + "clap", + "ddm-api-types", + "libc", + "libnet", + "omicron-common", + "oximeter 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "oximeter-producer 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "oxnet", + "schemars 0.8.22", + "serde", + "slog", + "slog-async", + "slog-bunyan", + "smf 0.10.0 (git+https://github.com/illumos/smf-rs?branch=main)", + "uuid", +] + [[package]] name = "mgs-dev" version = "0.1.0" @@ -6501,7 +6952,7 @@ dependencies = [ "camino", "clap", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "gateway-test-utils", "libc", @@ -6622,6 +7073,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "multicast-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270#864e0e150a90fd838199ceb38c2ad8a2be92a270" +dependencies = [ + "omicron-common", + "schemars 0.8.22", + "serde", + "thiserror 2.0.18", +] + [[package]] name = "multimap" version = "0.10.1" @@ -6732,7 +7194,7 @@ dependencies = [ "newtype_derive", "nexus-db-fixed-data", "nexus-db-model", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-test-utils", @@ -6768,7 +7230,32 @@ dependencies = [ "chrono", "futures", "iddqd", - "nexus-types", + "nexus-types 0.1.0", + "omicron-common", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "oxnet", + "progenitor 0.14.0", + "regress 0.10.5", + "reqwest 0.13.2", + "schemars 0.8.22", + "serde", + "serde_json", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", + "slog", + "uuid", +] + +[[package]] +name = "nexus-client" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "chrono", + "futures", + "iddqd", + "nexus-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -6779,8 +7266,8 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sled-agent-types", - "sled-agent-types-versions", + "sled-agent-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "sled-agent-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "slog", "uuid", ] @@ -6795,7 +7282,7 @@ dependencies = [ "expectorate", "ipnet", "libc", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -6804,7 +7291,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "sled-agent-types", + "sled-agent-types 0.1.0", "tokio-postgres", "toml 0.8.23", "uuid", @@ -6826,7 +7313,7 @@ name = "nexus-db-fixed-data" version = "0.1.0" dependencies = [ "nexus-db-model", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-uuid-kinds", @@ -6851,7 +7338,7 @@ dependencies = [ "nexus-db-model", "nexus-db-queries", "nexus-db-schema", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-test-utils", @@ -6872,16 +7359,16 @@ dependencies = [ "camino", "camino-tempfile", "chrono", - "clickhouse-admin-types", - "cockroach-admin-types", + "clickhouse-admin-types 0.1.0", + "cockroach-admin-types 0.1.0", "db-macros", "derive-where", "diesel", - "ereport-types", + "ereport-types 0.1.0", "expectorate", "hex", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "ipnetwork", "itertools 0.14.0", "macaddr", @@ -6889,11 +7376,11 @@ dependencies = [ "nexus-config", "nexus-db-schema", "nexus-defaults", - "nexus-types", + "nexus-types 0.1.0", "omicron-certificates", "omicron-cockroach-metrics", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-rpaths", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -6909,8 +7396,8 @@ dependencies = [ "serde", "serde_json", "sled-agent-client", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "sqlparser", @@ -6919,7 +7406,7 @@ dependencies = [ "test-strategy", "thiserror 2.0.18", "tokio", - "trust-quorum-protocol", + "trust-quorum-protocol 0.1.0", "tufaceous-artifact", "uuid", "vergen-gitcl", @@ -6936,26 +7423,26 @@ dependencies = [ "camino", "camino-tempfile", "chrono", - "clickhouse-admin-types", - "cockroach-admin-types", + "clickhouse-admin-types 0.1.0", + "cockroach-admin-types 0.1.0", "const_format", "criterion", "db-macros", "diesel", "diesel-dtrace", "dropshot", - "ereport-types", + "ereport-types 0.1.0", "expectorate", "fmd-adm-sys", "futures", - "gateway-client", - "gateway-types", + "gateway-client 0.1.0", + "gateway-types 0.1.0", "hex", "hyper-rustls", "iddqd", - "illumos-utils", - "internal-dns-resolver", - "internal-dns-types", + "illumos-utils 0.1.0", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "ipnetwork", "itertools 0.14.0", "macaddr", @@ -6969,11 +7456,11 @@ dependencies = [ "nexus-inventory", "nexus-reconfigurator-planning", "nexus-test-utils", - "nexus-types", + "nexus-types 0.1.0", "nonempty", "omicron-cockroach-metrics", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-rpaths", "omicron-sled-agent", "omicron-test-utils", @@ -7004,8 +7491,8 @@ dependencies = [ "serde_with", "sha2", "sled-agent-client", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "static_assertions", @@ -7016,8 +7503,8 @@ dependencies = [ "term 0.7.0", "thiserror 2.0.18", "tokio", - "trust-quorum-protocol", - "trust-quorum-types", + "trust-quorum-protocol 0.1.0", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "url", "usdt 0.5.0", @@ -7058,7 +7545,7 @@ name = "nexus-external-api" version = "0.1.0" dependencies = [ "anyhow", - "api_identity", + "api_identity 0.1.0", "base64 0.22.1", "chrono", "dropshot", @@ -7067,21 +7554,21 @@ dependencies = [ "hyper", "ipnetwork", "itertools 0.14.0", - "nexus-types", - "nexus-types-versions", + "nexus-types 0.1.0", + "nexus-types-versions 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", "openapiv3", "oximeter-types-versions 0.1.0", "oxnet", - "oxql-types", + "oxql-types 0.1.0", "schemars 0.8.22", "scim2-rs", "serde", "serde_json", "slog-error-chain", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "uuid", ] @@ -7092,10 +7579,10 @@ version = "0.1.0" dependencies = [ "anyhow", "chrono", - "ereport-types", + "ereport-types 0.1.0", "iddqd", "nexus-reconfigurator-planning", - "nexus-types", + "nexus-types 0.1.0", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -7115,13 +7602,13 @@ dependencies = [ "dropshot", "dropshot-api-manager-types", "http", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", "schemars 0.8.22", "serde", - "sled-agent-types-versions", + "sled-agent-types-versions 0.1.0", "uuid", ] @@ -7135,22 +7622,22 @@ dependencies = [ "chrono", "clickhouse-admin-keeper-client", "clickhouse-admin-server-client", - "clickhouse-admin-types", - "cockroach-admin-types", + "clickhouse-admin-types 0.1.0", + "cockroach-admin-types 0.1.0", "dns-service-client", "expectorate", "fmd-adm-sys", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "gateway-test-utils", - "gateway-types", + "gateway-types 0.1.0", "httpmock", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "itertools 0.14.0", - "nexus-client", - "nexus-types", + "nexus-client 0.1.0", + "nexus-types 0.1.0", "ntp-admin-client", "omicron-cockroach-metrics", "omicron-common", @@ -7163,9 +7650,9 @@ dependencies = [ "serde_json", "sled-agent-client", "sled-agent-resolvable-files-examples", - "sled-agent-types", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "strum 0.27.2", @@ -7183,15 +7670,15 @@ version = "0.1.0" dependencies = [ "dropshot", "http", - "nexus-types", - "nexus-types-versions", + "nexus-types 0.1.0", + "nexus-types-versions 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", "schemars 0.8.22", "serde", - "sled-hardware-types", - "trust-quorum-types", + "sled-hardware-types 0.1.0", + "trust-quorum-types 0.1.0", "uuid", ] @@ -7199,13 +7686,13 @@ dependencies = [ name = "nexus-lockstep-client" version = "0.1.0" dependencies = [ - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "chrono", "futures", "iddqd", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-uuid-kinds", "omicron-workspace-hack", "oxnet", @@ -7215,9 +7702,9 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sled-agent-types", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", "slog", "uuid", ] @@ -7247,7 +7734,7 @@ dependencies = [ "nexus-db-queries", "nexus-db-schema", "nexus-test-utils", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-test-utils", @@ -7271,17 +7758,17 @@ dependencies = [ "chrono", "dropshot", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "gateway-test-utils", - "gateway-types", + "gateway-types 0.1.0", "http", "hubtools 0.4.7 (git+https://github.com/oxidecomputer/hubtools.git?rev=2b1ef9b38d75563ea800baa3b17327eec17b1b7a)", "iddqd", - "illumos-utils", - "internal-dns-resolver", - "internal-dns-types", - "nexus-types", + "illumos-utils 0.1.0", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", + "nexus-types 0.1.0", "omicron-common", "omicron-test-utils", "omicron-uuid-kinds", @@ -7294,10 +7781,10 @@ dependencies = [ "sha2", "sled-agent-api", "sled-agent-client", - "sled-agent-types", - "sled-agent-types-versions", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", "sled-diagnostics", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "sp-sim", @@ -7305,7 +7792,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "uuid", ] @@ -7316,9 +7803,9 @@ version = "0.1.0" dependencies = [ "anyhow", "futures", - "gateway-client", - "internal-dns-resolver", - "internal-dns-types", + "gateway-client 0.1.0", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "ipnetwork", "nexus-db-lookup", "nexus-db-queries", @@ -7330,8 +7817,8 @@ dependencies = [ "pq-sys", "reqwest 0.13.2", "sled-agent-client", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "static_assertions", "thiserror 2.0.18", @@ -7344,12 +7831,12 @@ version = "0.1.0" dependencies = [ "ipnet", "nexus-reconfigurator-planning", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", - "sled-agent-types", + "sled-agent-types 0.1.0", "tufaceous-artifact", ] @@ -7367,7 +7854,7 @@ dependencies = [ "nexus-reconfigurator-preparation", "nexus-test-utils", "nexus-test-utils-macros", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-nexus", "omicron-rpaths", @@ -7395,15 +7882,15 @@ dependencies = [ "clickhouse-admin-keeper-client", "clickhouse-admin-server-client", "clickhouse-admin-single-client", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "cockroach-admin-client", "diesel", "fmd-adm-sys", "futures", "httptest", "iddqd", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "ipnet", "ipnetwork", "newtype-uuid", @@ -7419,7 +7906,7 @@ dependencies = [ "nexus-reconfigurator-preparation", "nexus-test-utils", "nexus-test-utils-macros", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-nexus", "omicron-rpaths", @@ -7430,11 +7917,11 @@ dependencies = [ "pq-sys", "reqwest 0.13.2", "sled-agent-client", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-error-chain", "tokio", - "update-engine", + "update-engine 0.1.0", "uuid", ] @@ -7448,21 +7935,21 @@ dependencies = [ "camino-tempfile", "chrono", "clap", - "clickhouse-admin-types", - "cockroach-admin-types", + "clickhouse-admin-types 0.1.0", + "cockroach-admin-types 0.1.0", "daft", "debug-ignore", "dropshot", "expectorate", - "gateway-client", - "gateway-types", + "gateway-client 0.1.0", + "gateway-types 0.1.0", "hex-literal", "hickory-resolver 0.25.2", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "indexmap 2.14.0", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "ipnet", "itertools 0.14.0", "maplit", @@ -7470,7 +7957,7 @@ dependencies = [ "nexus-inventory", "nexus-reconfigurator-blippy", "nexus-reconfigurator-simulation", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-deployment-graph", "omicron-test-utils", @@ -7483,8 +7970,8 @@ dependencies = [ "reconfigurator-cli", "semver 1.0.28", "sled-agent-client", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "sp-sim", @@ -7512,14 +7999,14 @@ dependencies = [ "futures", "nexus-db-model", "nexus-db-queries", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-uuid-kinds", "omicron-workspace-hack", "pq-sys", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", ] @@ -7534,7 +8021,7 @@ dependencies = [ "nexus-db-model", "nexus-db-queries", "nexus-db-schema", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-test-utils", @@ -7561,13 +8048,13 @@ dependencies = [ "itertools 0.14.0", "nexus-inventory", "nexus-reconfigurator-planning", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", "petname", "sapling-renderdag", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "strum 0.27.2", "swrite", @@ -7590,7 +8077,7 @@ dependencies = [ "nexus-db-queries", "nexus-test-utils", "nexus-test-utils-macros", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-test-utils", @@ -7611,16 +8098,16 @@ name = "nexus-test-interface" version = "0.1.0" dependencies = [ "async-trait", - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "nexus-config", "nexus-db-queries", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-uuid-kinds", "omicron-workspace-hack", "pq-sys", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "tokio", "uuid", @@ -7631,7 +8118,7 @@ name = "nexus-test-utils" version = "0.1.0" dependencies = [ "anyhow", - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "bytes", "camino", "camino-tempfile", @@ -7650,18 +8137,18 @@ dependencies = [ "http-body-util", "hyper", "iddqd", - "illumos-utils", - "internal-dns-resolver", - "internal-dns-types", - "nexus-client", + "illumos-utils 0.1.0", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", + "nexus-client 0.1.0", "nexus-config", "nexus-db-queries", "nexus-lockstep-client", "nexus-test-interface", - "nexus-types", + "nexus-types 0.1.0", "omicron-cockroach-admin", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-rpaths", "omicron-sled-agent", "omicron-test-utils", @@ -7669,7 +8156,7 @@ dependencies = [ "omicron-workspace-hack", "oximeter 0.1.0", "oximeter-collector", - "oximeter-producer", + "oximeter-producer 0.1.0", "oxnet", "pq-sys", "pretty_assertions", @@ -7677,7 +8164,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "sled-agent-client", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-error-chain", "tokio", @@ -7701,46 +8188,46 @@ name = "nexus-types" version = "0.1.0" dependencies = [ "anyhow", - "api_identity", + "api_identity 0.1.0", "async-trait", "base64 0.22.1", - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "chrono", "clap", - "clickhouse-admin-types", - "cockroach-admin-types", + "clickhouse-admin-types 0.1.0", + "cockroach-admin-types 0.1.0", "cookie", "daft", "derive-where", "derive_more 0.99.20", "dropshot", "either", - "ereport-types", + "ereport-types 0.1.0", "expectorate", "futures", - "gateway-client", - "gateway-types", + "gateway-client 0.1.0", + "gateway-types 0.1.0", "http", "humantime", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "indent_write", - "internal-dns-types", + "internal-dns-types 0.1.0", "ipnet", "ipnetwork", "itertools 0.14.0", "newtype-uuid", "newtype_derive", - "nexus-types-versions", + "nexus-types-versions 0.1.0", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", "openssl", - "oximeter-db", + "oximeter-db 0.1.0", "oxnet", - "oxql-types", + "oxql-types 0.1.0", "parse-display", "proptest", "regex", @@ -7749,9 +8236,9 @@ dependencies = [ "serde", "serde_json", "serde_with", - "sled-agent-types", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "steno", @@ -7763,11 +8250,122 @@ dependencies = [ "thiserror 2.0.18", "tokio", "tough", - "trust-quorum-protocol", - "trust-quorum-types", + "trust-quorum-protocol 0.1.0", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "unicode-width 0.1.14", - "update-engine", + "update-engine 0.1.0", + "url", + "uuid", +] + +[[package]] +name = "nexus-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "api_identity 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "async-trait", + "base64 0.22.1", + "bootstrap-agent-lockstep-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "chrono", + "clap", + "clickhouse-admin-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "cockroach-admin-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "cookie", + "daft", + "derive-where", + "derive_more 0.99.20", + "dropshot", + "either", + "ereport-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "futures", + "gateway-client 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "gateway-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "http", + "humantime", + "iddqd", + "illumos-utils 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "indent_write", + "internal-dns-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "ipnet", + "ipnetwork", + "itertools 0.14.0", + "newtype-uuid", + "newtype_derive", + "nexus-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-common", + "omicron-passwords 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "openssl", + "oximeter-db 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "oxnet", + "oxql-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "parse-display", + "regex", + "schemars 0.8.22", + "semver 1.0.28", + "serde", + "serde_json", + "serde_with", + "sled-agent-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "sled-agent-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "slog", + "slog-error-chain", + "steno", + "strum 0.27.2", + "swrite", + "tabled 0.15.0", + "test-strategy", + "textwrap 0.16.2", + "thiserror 2.0.18", + "tokio", + "tough", + "trust-quorum-protocol 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "trust-quorum-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "tufaceous-artifact", + "unicode-width 0.1.14", + "update-engine 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "url", + "uuid", +] + +[[package]] +name = "nexus-types-versions" +version = "0.1.0" +dependencies = [ + "anyhow", + "api_identity 0.1.0", + "base64 0.22.1", + "chrono", + "daft", + "dropshot", + "http", + "mg-admin-client 0.1.0 (git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270)", + "mg-api-types", + "omicron-common", + "omicron-passwords 0.1.0", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "openssl", + "oxnet", + "oxql-types 0.1.0", + "parse-display", + "regex", + "schemars 0.8.22", + "semver 1.0.28", + "serde", + "serde_json", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", + "slog-error-chain", + "strum 0.27.2", + "thiserror 2.0.18", + "tough", + "tufaceous-artifact", "url", "uuid", ] @@ -7775,30 +8373,31 @@ dependencies = [ [[package]] name = "nexus-types-versions" version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ "anyhow", - "api_identity", + "api_identity 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "base64 0.22.1", "chrono", "daft", "dropshot", "http", - "mg-admin-client", + "mg-admin-client 0.1.0 (git+https://github.com/oxidecomputer/maghemite?rev=7696ee48d5ee29a917dea459e281fe2e8ff20513)", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "omicron-uuid-kinds", "omicron-workspace-hack", "openssl", "oxnet", - "oxql-types", + "oxql-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "parse-display", "regex", "schemars 0.8.22", "semver 1.0.28", "serde", "serde_json", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "slog-error-chain", "strum 0.27.2", "thiserror 2.0.18", @@ -7870,6 +8469,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + [[package]] name = "nonempty" version = "0.12.0" @@ -7948,7 +8556,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8080,11 +8688,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" dependencies = [ - "num_enum_derive 0.7.5", + "num_enum_derive 0.7.6", "rustversion", ] @@ -8102,9 +8710,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", @@ -8198,13 +8806,13 @@ dependencies = [ "clap", "clickhouse-admin-api", "clickhouse-admin-test-utils", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "clickward", "dropshot", "expectorate", "flume", "http", - "illumos-utils", + "illumos-utils 0.1.0", "omicron-common", "omicron-test-utils", "omicron-uuid-kinds", @@ -8213,7 +8821,7 @@ dependencies = [ "openapiv3", "oxide-tokio-rt", "oximeter 0.1.0", - "oximeter-db", + "oximeter-db 0.1.0", "oximeter-test-utils", "schemars 0.8.22", "serde", @@ -8241,14 +8849,14 @@ dependencies = [ "chrono", "clap", "cockroach-admin-api", - "cockroach-admin-types", - "cockroach-admin-types-versions", + "cockroach-admin-types 0.1.0", + "cockroach-admin-types-versions 0.1.0", "csv", "dropshot", "expectorate", "fmd-adm-sys", "http", - "illumos-utils", + "illumos-utils 0.1.0", "nexus-test-utils", "omicron-common", "omicron-rpaths", @@ -8284,7 +8892,7 @@ dependencies = [ "anyhow", "chrono", "cockroach-admin-client", - "cockroach-admin-types", + "cockroach-admin-types 0.1.0", "futures", "omicron-workspace-hack", "parallel-task-set", @@ -8302,7 +8910,7 @@ name = "omicron-common" version = "0.1.0" dependencies = [ "anyhow", - "api_identity", + "api_identity 0.1.0", "async-trait", "backoff", "backon", @@ -8320,7 +8928,7 @@ dependencies = [ "itertools 0.14.0", "libc", "macaddr", - "omicron-ledger", + "omicron-ledger 0.1.0", "omicron-uuid-kinds", "omicron-workspace-hack", "oxnet", @@ -8362,7 +8970,7 @@ dependencies = [ "progenitor-client 0.14.0", "reqwest 0.13.2", "serde", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "thiserror 2.0.18", @@ -8390,7 +8998,7 @@ dependencies = [ "expectorate", "fmd-adm-sys", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-test-utils", "libc", "nexus-config", @@ -8463,21 +9071,21 @@ dependencies = [ "chrono", "clap", "dropshot", - "ereport-types", + "ereport-types 0.1.0", "expectorate", "futures", "gateway-api", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "gateway-sp-comms", "gateway-test-utils", - "gateway-types", - "gateway-types-versions", + "gateway-types 0.1.0", + "gateway-types-versions 0.1.0", "hex", "http", "hyper", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "ipcc", "omicron-common", "omicron-test-utils", @@ -8486,7 +9094,7 @@ dependencies = [ "oxide-tokio-rt", "oximeter 0.1.0", "oximeter-instruments", - "oximeter-producer", + "oximeter-producer 0.1.0", "schemars 0.8.22", "serde", "serde_json", @@ -8524,6 +9132,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "omicron-ledger" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "async-trait", + "camino", + "omicron-workspace-hack", + "serde", + "serde_json", + "slog", + "slog-error-chain", + "thiserror 2.0.18", + "tokio", +] + [[package]] name = "omicron-live-tests" version = "0.1.0" @@ -8533,8 +9157,8 @@ dependencies = [ "dns-service-client", "dropshot", "futures", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "live-tests-macros", "nexus-config", "nexus-db-model", @@ -8543,7 +9167,7 @@ dependencies = [ "nexus-lockstep-client", "nexus-reconfigurator-planning", "nexus-reconfigurator-preparation", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-test-utils", @@ -8552,7 +9176,7 @@ dependencies = [ "pq-sys", "reqwest 0.13.2", "serde", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-error-chain", "textwrap 0.16.2", @@ -8592,7 +9216,7 @@ dependencies = [ "async-bb8-diesel", "async-trait", "base64 0.22.1", - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "buf-list", "bytes", "camino", @@ -8614,15 +9238,15 @@ dependencies = [ "dns-service-client", "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e)", "dropshot", - "ereport-types", + "ereport-types 0.1.0", "expectorate", "fatfs", "fmd-adm-sys", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "gateway-test-utils", - "gateway-types", + "gateway-types 0.1.0", "headers", "hex", "hickory-resolver 0.25.2", @@ -8636,9 +9260,9 @@ dependencies = [ "hyper-rustls", "hyper-staticfile", "iddqd", - "illumos-utils", - "internal-dns-resolver", - "internal-dns-types", + "illumos-utils 0.1.0", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "ipnet", "ipnetwork", "itertools 0.14.0", @@ -8646,10 +9270,11 @@ dependencies = [ "lldpd-client", "macaddr", "maplit", - "mg-admin-client", + "mg-admin-client 0.1.0 (git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270)", + "mg-api-types", "nexus-auth", "nexus-background-task-interface", - "nexus-client", + "nexus-client 0.1.0", "nexus-config", "nexus-db-lookup", "nexus-db-model", @@ -8673,13 +9298,13 @@ dependencies = [ "nexus-test-interface", "nexus-test-utils", "nexus-test-utils-macros", - "nexus-types", - "nexus-types-versions", + "nexus-types 0.1.0", + "nexus-types-versions 0.1.0", "ntp-admin-client", "num-integer", "omicron-cockroach-metrics", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-rpaths", "omicron-sled-agent", "omicron-test-utils", @@ -8693,11 +9318,11 @@ dependencies = [ "oximeter 0.1.0", "oximeter-client", "oximeter-collector", - "oximeter-db", + "oximeter-db 0.1.0", "oximeter-instruments", - "oximeter-producer", + "oximeter-producer 0.1.0", "oxnet", - "oxql-types", + "oxql-types 0.1.0", "parallel-task-set", "parse-display", "paste", @@ -8713,7 +9338,6 @@ dependencies = [ "range-requests", "raw-cpuid", "rcgen", - "rdb-types", "ref-cast", "regex", "reqwest 0.13.2", @@ -8733,9 +9357,9 @@ dependencies = [ "sha2", "similar-asserts", "sled-agent-client", - "sled-agent-types", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-async", "slog-dtrace", @@ -8755,12 +9379,12 @@ dependencies = [ "tokio-test", "tokio-util", "tough", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "tufaceous", "tufaceous-artifact", "tufaceous-lib", "update-common", - "update-engine", + "update-engine 0.1.0", "usdt 0.5.0", "uuid", "zip 4.6.1", @@ -8831,21 +9455,21 @@ dependencies = [ "diesel", "dropshot", "dyn-clone", - "ereport-types", + "ereport-types 0.1.0", "expectorate", "fmd-adm-sys", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "gateway-test-utils", - "gateway-types", + "gateway-types 0.1.0", "http", "humantime", "iddqd", "indent_write", "indicatif", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "ipnetwork", "itertools 0.14.0", "multimap", @@ -8861,7 +9485,7 @@ dependencies = [ "nexus-saga-recovery", "nexus-test-utils", "nexus-test-utils-macros", - "nexus-types", + "nexus-types 0.1.0", "ntp-admin-client", "omicron-common", "omicron-nexus", @@ -8872,7 +9496,7 @@ dependencies = [ "owo-colors 4.3.0", "oxide-tokio-rt", "oximeter-client", - "oximeter-db", + "oximeter-db 0.1.0", "oxnet", "petgraph 0.8.3", "pq-sys", @@ -8883,8 +9507,8 @@ dependencies = [ "serde_json", "sigpipe", "sled-agent-client", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "steno", @@ -8895,10 +9519,10 @@ dependencies = [ "tabled 0.15.0", "textwrap 0.16.2", "tokio", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "unicode-width 0.1.14", - "update-engine", + "update-engine 0.1.0", "url", "uuid", "vergen-gitcl", @@ -8916,7 +9540,7 @@ dependencies = [ "expectorate", "futures", "hex", - "illumos-utils", + "illumos-utils 0.1.0", "indent_write", "indicatif", "omicron-workspace-hack", @@ -8961,6 +9585,21 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "omicron-passwords" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "argon2", + "omicron-workspace-hack", + "rand 0.9.2", + "schemars 0.8.22", + "secrecy 0.10.3", + "serde", + "serde_with", + "thiserror 2.0.18", +] + [[package]] name = "omicron-pins" version = "0.1.0" @@ -8982,13 +9621,13 @@ dependencies = [ "camino", "clap", "dropshot", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "nexus-db-model", "nexus-db-queries", "nexus-mgs-updates", "nexus-reconfigurator-execution", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-rpaths", "omicron-uuid-kinds", @@ -9001,7 +9640,7 @@ dependencies = [ "slog", "supports-color 3.0.2", "tokio", - "update-engine", + "update-engine 0.1.0", "uuid", ] @@ -9093,11 +9732,11 @@ dependencies = [ "async-trait", "atomicwrites", "base64 0.22.1", - "bootstore", + "bootstore 0.1.0", "bootstrap-agent-api", "bootstrap-agent-client", "bootstrap-agent-lockstep-api", - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "bytes", "camino", "camino-tempfile", @@ -9105,7 +9744,7 @@ dependencies = [ "cfg-if", "chrono", "clap", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "crucible-agent-client", "crucible-pantry-client", "derive_more 0.99.20", @@ -9129,23 +9768,23 @@ dependencies = [ "hyper", "hyper-staticfile", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "installinator-common", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "ipnetwork", "itertools 0.14.0", "key-manager", "libc", "macaddr", - "nexus-client", + "nexus-client 0.1.0", "nexus-config", "nexus-lockstep-client", - "nexus-types", + "nexus-types 0.1.0", "nix 0.31.2", "omicron-common", "omicron-ddm-admin-client", - "omicron-ledger", + "omicron-ledger 0.1.0", "omicron-rpaths", "omicron-test-utils", "omicron-uuid-kinds", @@ -9154,13 +9793,13 @@ dependencies = [ "oxide-tokio-rt", "oximeter 0.1.0", "oximeter-instruments", - "oximeter-producer", + "oximeter-producer 0.1.0", "oxnet", "pretty_assertions", "progenitor 0.14.0", "propolis-client", "propolis-mock-server", - "propolis_api_types", + "propolis_api_types 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", "rand 0.9.2", "range-requests", "regress 0.10.5", @@ -9182,11 +9821,11 @@ dependencies = [ "sled-agent-measurements", "sled-agent-rack-setup", "sled-agent-resolvable-files", - "sled-agent-types", - "sled-agent-types-versions", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", "sled-diagnostics", "sled-hardware", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "sled-storage", "slog", "slog-async", @@ -9208,8 +9847,8 @@ dependencies = [ "toml 0.8.23", "transient-dns-server", "trust-quorum", - "trust-quorum-protocol", - "trust-quorum-types", + "trust-quorum-protocol 0.1.0", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "tufaceous-brand-metadata", "usdt 0.5.0", @@ -9350,7 +9989,6 @@ dependencies = [ "inout", "ipnet", "ipnetwork", - "itertools 0.13.0", "lalrpop-util", "lazy_static", "libc", @@ -9391,7 +10029,6 @@ dependencies = [ "reqwest 0.12.28", "reqwest 0.13.2", "rsa", - "rustc-hash", "rustix 0.38.44", "rustix 1.1.3", "rustls 0.23.37", @@ -9746,7 +10383,7 @@ dependencies = [ [[package]] name = "oximeter" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/omicron?branch=main#ccede3cb5287e447b0f30916000c7943b1596689" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ "anyhow", "chrono", @@ -9802,10 +10439,10 @@ dependencies = [ "expectorate", "futures", "httpmock", - "internal-dns-resolver", - "internal-dns-types", - "nexus-client", - "nexus-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", + "nexus-client 0.1.0", + "nexus-types 0.1.0", "omicron-common", "omicron-test-utils", "omicron-workspace-hack", @@ -9815,7 +10452,7 @@ dependencies = [ "oximeter 0.1.0", "oximeter-api", "oximeter-client", - "oximeter-db", + "oximeter-db 0.1.0", "oximeter-types 0.1.0", "proptest", "qorb", @@ -9854,7 +10491,7 @@ dependencies = [ "chrono", "chrono-tz", "clap", - "clickhouse-admin-types", + "clickhouse-admin-types 0.1.0", "clickward", "const_format", "criterion", @@ -9871,7 +10508,7 @@ dependencies = [ "indexmap 2.14.0", "itertools 0.14.0", "libc", - "nom", + "nom 7.1.3", "num", "omicron-common", "omicron-test-utils", @@ -9879,7 +10516,7 @@ dependencies = [ "oxide-tokio-rt", "oximeter 0.1.0", "oximeter-test-utils", - "oxql-types", + "oxql-types 0.1.0", "parse-display", "peg", "qorb", @@ -9910,6 +10547,61 @@ dependencies = [ "uuid", ] +[[package]] +name = "oximeter-db" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "async-recursion", + "async-trait", + "bcs", + "bytes", + "camino", + "chrono", + "chrono-tz", + "clap", + "clickhouse-admin-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "clickward", + "const_format", + "debug-ignore", + "dropshot", + "futures", + "gethostname", + "highway", + "iana-time-zone", + "iddqd", + "indexmap 2.14.0", + "libc", + "nom 7.1.3", + "num", + "omicron-common", + "omicron-workspace-hack", + "oxide-tokio-rt", + "oximeter 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "oxql-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "parse-display", + "qorb", + "quote", + "regex", + "reqwest 0.13.2", + "schemars 0.8.22", + "serde", + "serde_json", + "slog", + "slog-async", + "slog-dtrace", + "slog-error-chain", + "slog-term", + "strum 0.27.2", + "termtree", + "thiserror 2.0.18", + "tokio", + "tokio-util", + "usdt 0.5.0", + "uuid", +] + [[package]] name = "oximeter-instruments" version = "0.1.0" @@ -9949,7 +10641,7 @@ dependencies = [ [[package]] name = "oximeter-macro-impl" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/omicron?branch=main#ccede3cb5287e447b0f30916000c7943b1596689" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ "omicron-workspace-hack", "proc-macro2", @@ -9966,14 +10658,14 @@ dependencies = [ "clap", "dropshot", "either", - "internal-dns-resolver", - "internal-dns-types", - "nexus-client", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", + "nexus-client 0.1.0", "omicron-common", "omicron-test-utils", "omicron-workspace-hack", "oximeter 0.1.0", - "oximeter-producer-api", + "oximeter-producer-api 0.1.0", "schemars 0.8.22", "serde", "serde_json", @@ -9986,6 +10678,31 @@ dependencies = [ "uuid", ] +[[package]] +name = "oximeter-producer" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "chrono", + "dropshot", + "either", + "internal-dns-resolver 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "internal-dns-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "nexus-client 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-common", + "omicron-workspace-hack", + "oximeter 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "oximeter-producer-api 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "schemars 0.8.22", + "serde", + "slog", + "slog-dtrace", + "slog-error-chain", + "thiserror 2.0.18", + "tokio", + "uuid", +] + [[package]] name = "oximeter-producer-api" version = "0.1.0" @@ -9995,6 +10712,16 @@ dependencies = [ "oximeter-types-versions 0.1.0", ] +[[package]] +name = "oximeter-producer-api" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "dropshot", + "omicron-workspace-hack", + "oximeter-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", +] + [[package]] name = "oximeter-schema" version = "0.1.0" @@ -10018,7 +10745,7 @@ dependencies = [ [[package]] name = "oximeter-schema" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/omicron?branch=main#ccede3cb5287e447b0f30916000c7943b1596689" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ "anyhow", "chrono", @@ -10045,7 +10772,7 @@ dependencies = [ "clickward", "omicron-test-utils", "omicron-workspace-hack", - "oximeter-db", + "oximeter-db 0.1.0", "oximeter-macro-impl 0.1.0", "oximeter-types 0.1.0", "slog", @@ -10067,7 +10794,7 @@ dependencies = [ [[package]] name = "oximeter-timeseries-macro" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/omicron?branch=main#ccede3cb5287e447b0f30916000c7943b1596689" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ "omicron-workspace-hack", "oximeter-schema 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", @@ -10096,22 +10823,10 @@ dependencies = [ [[package]] name = "oximeter-types" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/omicron?branch=main#ccede3cb5287e447b0f30916000c7943b1596689" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ - "bytes", - "chrono", - "float-ord", - "num", - "omicron-common", "omicron-workspace-hack", "oximeter-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", - "parse-display", - "regex", - "schemars 0.8.22", - "serde", - "strum 0.27.2", - "thiserror 2.0.18", - "uuid", ] [[package]] @@ -10139,13 +10854,20 @@ dependencies = [ [[package]] name = "oximeter-types-versions" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/omicron?branch=main#ccede3cb5287e447b0f30916000c7943b1596689" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ + "bytes", "chrono", + "float-ord", + "num", "omicron-common", "omicron-workspace-hack", + "parse-display", + "regex", "schemars 0.8.22", "serde", + "strum 0.27.2", + "thiserror 2.0.18", "uuid", ] @@ -10167,9 +10889,9 @@ dependencies = [ [[package]] name = "oxnet" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc6fb07ecd6d2a17ff1431bc5b3ce11036c0b6dd93a3c4904db5b910817b162" +checksum = "057865b45bb202b17ed475d8f22f0416412de2c317c168fefecf9d207faf048d" dependencies = [ "ipnetwork", "schemars 0.8.22", @@ -10193,6 +10915,23 @@ dependencies = [ "uuid", ] +[[package]] +name = "oxql-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "chrono", + "highway", + "num", + "omicron-workspace-hack", + "oximeter-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "schemars 0.8.22", + "serde", + "serde_json", + "uuid", +] + [[package]] name = "p256" version = "0.13.2" @@ -10582,7 +11321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cd31dcfdbbd7431a807ef4df6edd6473228e94d5c805e8cf671227a21bad068" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.12.1", "proc-macro2", "quote", "rand 0.8.6", @@ -11273,10 +12012,23 @@ dependencies = [ [[package]] name = "propolis-api-types-versions" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/propolis?rev=6615e4f072c58f4d10e29007f328c536c464445d#6615e4f072c58f4d10e29007f328c536c464445d" +source = "git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd#75518ad2c26db9278895ab1262c28daf13bfdffd" +dependencies = [ + "crucible-client-types 0.1.0 (git+https://github.com/oxidecomputer/crucible?rev=bd9a0e2abe6b6b89aec8c85f4ee57474144ed150)", + "propolis_types 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", + "schemars 0.8.22", + "serde", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "propolis-api-types-versions" +version = "0.0.0" +source = "git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845#bc489ddf0f38f75e0c194b86cf6f0de377f68845" dependencies = [ - "crucible-client-types", - "propolis_types", + "crucible-client-types 0.1.0 (git+https://github.com/oxidecomputer/crucible?rev=ae1da83e66c648574827298f4bc444632bf4d047)", + "propolis_types 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845)", "schemars 0.8.22", "serde", "thiserror 1.0.69", @@ -11286,15 +12038,15 @@ dependencies = [ [[package]] name = "propolis-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/propolis?rev=6615e4f072c58f4d10e29007f328c536c464445d#6615e4f072c58f4d10e29007f328c536c464445d" +source = "git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd#75518ad2c26db9278895ab1262c28daf13bfdffd" dependencies = [ "async-trait", "base64 0.21.7", - "crucible-client-types", + "crucible-client-types 0.1.0 (git+https://github.com/oxidecomputer/crucible?rev=bd9a0e2abe6b6b89aec8c85f4ee57474144ed150)", "futures", "progenitor 0.14.0", "progenitor-client 0.14.0", - "propolis-api-types-versions", + "propolis-api-types-versions 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", "rand 0.9.2", "reqwest 0.13.2", "schemars 0.8.22", @@ -11310,7 +12062,7 @@ dependencies = [ [[package]] name = "propolis-mock-server" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/propolis?rev=6615e4f072c58f4d10e29007f328c536c464445d#6615e4f072c58f4d10e29007f328c536c464445d" +source = "git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd#75518ad2c26db9278895ab1262c28daf13bfdffd" dependencies = [ "anyhow", "atty", @@ -11320,9 +12072,9 @@ dependencies = [ "futures", "hyper", "progenitor 0.14.0", - "propolis-api-types-versions", - "propolis_api_types", - "propolis_types", + "propolis-api-types-versions 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", + "propolis_api_types 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", + "propolis_types 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", "rand 0.9.2", "reqwest 0.13.2", "schemars 0.8.22", @@ -11343,16 +12095,34 @@ dependencies = [ [[package]] name = "propolis_api_types" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/propolis?rev=6615e4f072c58f4d10e29007f328c536c464445d#6615e4f072c58f4d10e29007f328c536c464445d" +source = "git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd#75518ad2c26db9278895ab1262c28daf13bfdffd" +dependencies = [ + "crucible-client-types 0.1.0 (git+https://github.com/oxidecomputer/crucible?rev=bd9a0e2abe6b6b89aec8c85f4ee57474144ed150)", + "propolis-api-types-versions 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", +] + +[[package]] +name = "propolis_api_types" +version = "0.0.0" +source = "git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845#bc489ddf0f38f75e0c194b86cf6f0de377f68845" dependencies = [ - "crucible-client-types", - "propolis-api-types-versions", + "crucible-client-types 0.1.0 (git+https://github.com/oxidecomputer/crucible?rev=ae1da83e66c648574827298f4bc444632bf4d047)", + "propolis-api-types-versions 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845)", +] + +[[package]] +name = "propolis_types" +version = "0.0.0" +source = "git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd#75518ad2c26db9278895ab1262c28daf13bfdffd" +dependencies = [ + "schemars 0.8.22", + "serde", ] [[package]] name = "propolis_types" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/propolis?rev=6615e4f072c58f4d10e29007f328c536c464445d#6615e4f072c58f4d10e29007f328c536c464445d" +source = "git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845#bc489ddf0f38f75e0c194b86cf6f0de377f68845" dependencies = [ "schemars 0.8.22", "serde", @@ -11380,7 +12150,7 @@ dependencies = [ [[package]] name = "protocol" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/lldp#d22509dfdb051321b859e924948605115691b93c" +source = "git+https://github.com/oxidecomputer/lldp#0d199cebf8fe3b24b9d943bdc46a00c227e5a345" dependencies = [ "anyhow", "schemars 0.8.22", @@ -11464,7 +12234,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls 0.23.37", - "socket2 0.6.3", + "socket2 0.5.10", "thiserror 2.0.18", "tokio", "tracing", @@ -11502,9 +12272,9 @@ dependencies = [ "cfg_aliases 0.2.1", "libc", "once_cell", - "socket2 0.6.3", + "socket2 0.5.10", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] @@ -11572,9 +12342,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ "chacha20 0.10.0", "getrandom 0.4.1", @@ -11766,7 +12536,7 @@ dependencies = [ [[package]] name = "rdb-types" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/maghemite?rev=5050964daba98b5ecf91ea2a5a9be9418f1853f9#5050964daba98b5ecf91ea2a5a9be9418f1853f9" +source = "git+https://github.com/oxidecomputer/maghemite?rev=7696ee48d5ee29a917dea459e281fe2e8ff20513#7696ee48d5ee29a917dea459e281fe2e8ff20513" dependencies = [ "oxnet", "schemars 0.8.22", @@ -11788,18 +12558,18 @@ dependencies = [ "datatest-stable", "dropshot", "expectorate", - "gateway-types", + "gateway-types 0.1.0", "humantime", "iddqd", "indent_write", - "internal-dns-types", + "internal-dns-types 0.1.0", "itertools 0.14.0", "newtype-uuid", "nexus-inventory", "nexus-reconfigurator-blippy", "nexus-reconfigurator-planning", "nexus-reconfigurator-simulation", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-repl-utils", "omicron-rpaths", @@ -11810,7 +12580,7 @@ dependencies = [ "semver 1.0.28", "serde", "serde_json", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-error-chain", "slog-term", @@ -11835,21 +12605,21 @@ dependencies = [ "clap", "dropshot", "futures", - "gateway-client", - "gateway-types", + "gateway-client 0.1.0", + "gateway-types 0.1.0", "humantime", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "nexus-mgs-updates", - "nexus-types", + "nexus-types 0.1.0", "omicron-common", "omicron-repl-utils", "omicron-workspace-hack", "oxide-tokio-rt", "qorb", "serde_json", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "swrite", "tokio", @@ -12417,7 +13187,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -12520,7 +13290,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -12778,7 +13548,7 @@ dependencies = [ [[package]] name = "scim2-rs" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/scim2-rs?rev=018ae6f7bd752cd9b2124887e00c93c6b4244103#018ae6f7bd752cd9b2124887e00c93c6b4244103" +source = "git+https://github.com/oxidecomputer/scim2-rs?rev=163606c052ee30b16dfab282fca721dd81e0868a#163606c052ee30b16dfab282fca721dd81e0868a" dependencies = [ "anyhow", "chrono", @@ -12797,7 +13567,7 @@ dependencies = [ [[package]] name = "scim2-test-client" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/scim2-rs?rev=018ae6f7bd752cd9b2124887e00c93c6b4244103#018ae6f7bd752cd9b2124887e00c93c6b4244103" +source = "git+https://github.com/oxidecomputer/scim2-rs?rev=163606c052ee30b16dfab282fca721dd81e0868a#163606c052ee30b16dfab282fca721dd81e0868a" dependencies = [ "anyhow", "clap", @@ -13384,12 +14154,12 @@ dependencies = [ "schemars 0.8.22", "semver 1.0.28", "serde", - "sled-agent-types", - "sled-agent-types-versions", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", "sled-diagnostics", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog-error-chain", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "uuid", "x509-cert", @@ -13413,11 +14183,11 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sled-agent-types", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", "slog", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "uuid", ] @@ -13442,13 +14212,13 @@ dependencies = [ "futures", "glob", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "installinator-common", "key-manager", - "key-manager-types", + "key-manager-types 0.1.0", "ntp-admin-v1-client", "omicron-common", - "omicron-ledger", + "omicron-ledger 0.1.0", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -13463,8 +14233,8 @@ dependencies = [ "sha2", "sled-agent-api", "sled-agent-resolvable-files-examples", - "sled-agent-types", - "sled-agent-types-versions", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", "sled-hardware", "sled-storage", "slog", @@ -13473,7 +14243,7 @@ dependencies = [ "test-strategy", "thiserror 2.0.18", "tokio", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "tufaceous-artifact", "xshell", "zone", @@ -13486,17 +14256,17 @@ dependencies = [ "anyhow", "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=cc8e02a0800034c431c8cf96b889ea638da3d194)", "futures", - "gateway-client", + "gateway-client 0.1.0", "http", - "internal-dns-resolver", - "internal-dns-types", - "mg-admin-client", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", + "mg-admin-client 0.1.0 (git+https://github.com/oxidecomputer/maghemite?rev=864e0e150a90fd838199ceb38c2ad8a2be92a270)", + "mg-api-types", "omicron-common", "omicron-ddm-admin-client", "omicron-workspace-hack", "oxnet", - "rdb-types", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-error-chain", "thiserror 2.0.18", @@ -13513,13 +14283,13 @@ dependencies = [ "derive_more 0.99.20", "dropshot", "futures", - "illumos-utils", + "illumos-utils 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", "serde", "sled-agent-api", - "sled-agent-types", + "sled-agent-types 0.1.0", "slog", "slog-error-chain", "thiserror 2.0.18", @@ -13539,8 +14309,8 @@ dependencies = [ "serde", "sled-agent-config-reconciler", "sled-agent-resolvable-files", - "sled-agent-types", - "sled-agent-types-versions", + "sled-agent-types 0.1.0", + "sled-agent-types-versions 0.1.0", "slog", "slog-error-chain", "thiserror 2.0.18", @@ -13552,8 +14322,8 @@ name = "sled-agent-rack-setup" version = "0.1.0" dependencies = [ "anyhow", - "bootstore", - "bootstrap-agent-lockstep-types", + "bootstore 0.1.0", + "bootstrap-agent-lockstep-types 0.1.0", "camino", "camino-tempfile", "cancel-safe-futures", @@ -13563,17 +14333,17 @@ dependencies = [ "futures", "http", "iddqd", - "illumos-utils", - "internal-dns-resolver", - "internal-dns-types", + "illumos-utils 0.1.0", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "itertools 0.14.0", "nexus-lockstep-client", "nexus-reconfigurator-blippy", - "nexus-types", + "nexus-types 0.1.0", "ntp-admin-client", "omicron-common", "omicron-ddm-admin-client", - "omicron-ledger", + "omicron-ledger 0.1.0", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -13585,8 +14355,8 @@ dependencies = [ "serde", "sled-agent-client", "sled-agent-config-reconciler", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "sled-storage", "slog", "slog-error-chain", @@ -13595,8 +14365,8 @@ dependencies = [ "tokio", "toml 0.8.23", "trust-quorum", - "trust-quorum-protocol", - "trust-quorum-types", + "trust-quorum-protocol 0.1.0", + "trust-quorum-types 0.1.0", "uuid", ] @@ -13609,7 +14379,7 @@ dependencies = [ "dropshot", "expectorate", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -13620,7 +14390,7 @@ dependencies = [ "sha2", "sled-agent-config-reconciler", "sled-agent-resolvable-files-examples", - "sled-agent-types", + "sled-agent-types 0.1.0", "sled-storage", "slog", "slog-error-chain", @@ -13640,7 +14410,7 @@ dependencies = [ "omicron-workspace-hack", "serde_json", "sha2", - "sled-agent-types", + "sled-agent-types 0.1.0", "sled-storage", "tufaceous-artifact", ] @@ -13651,7 +14421,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "bootstore", + "bootstore 0.1.0", "byte-wrapper", "camino", "chrono", @@ -13665,8 +14435,8 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sled-agent-types-versions", - "sled-hardware-types", + "sled-agent-types-versions 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "swrite", @@ -13676,6 +14446,36 @@ dependencies = [ "uuid", ] +[[package]] +name = "sled-agent-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "async-trait", + "bootstore 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "byte-wrapper", + "camino", + "chrono", + "daft", + "iddqd", + "omicron-common", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "oxnet", + "schemars 0.8.22", + "serde", + "serde_json", + "sled-agent-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "slog", + "slog-error-chain", + "swrite", + "thiserror 2.0.18", + "tufaceous-artifact", + "uuid", +] + [[package]] name = "sled-agent-types-versions" version = "0.1.0" @@ -13683,7 +14483,7 @@ dependencies = [ "anyhow", "assert_matches", "async-trait", - "bootstore", + "bootstore 0.1.0", "byte-wrapper", "camino", "chrono", @@ -13693,28 +14493,67 @@ dependencies = [ "ipnetwork", "itertools 0.14.0", "omicron-common", - "omicron-ledger", - "omicron-passwords", + "omicron-ledger 0.1.0", + "omicron-passwords 0.1.0", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", "oxnet", - "propolis-api-types-versions", - "propolis_api_types", + "propolis-api-types-versions 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", + "propolis_api_types 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=75518ad2c26db9278895ab1262c28daf13bfdffd)", "proptest", "schemars 0.8.22", "serde", "serde_json", "serde_with", "sha3", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "strum 0.27.2", "test-strategy", "thiserror 2.0.18", "toml 0.8.23", - "trust-quorum-types-versions", + "trust-quorum-types-versions 0.1.0", + "tufaceous-artifact", + "uuid", +] + +[[package]] +name = "sled-agent-types-versions" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "async-trait", + "bootstore 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "byte-wrapper", + "camino", + "chrono", + "daft", + "iddqd", + "indent_write", + "ipnetwork", + "itertools 0.14.0", + "omicron-common", + "omicron-ledger 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-passwords 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "oxnet", + "propolis-api-types-versions 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845)", + "propolis_api_types 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=bc489ddf0f38f75e0c194b86cf6f0de377f68845)", + "schemars 0.8.22", + "serde", + "serde_json", + "serde_with", + "sha3", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "slog", + "slog-error-chain", + "strum 0.27.2", + "thiserror 2.0.18", + "trust-quorum-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "tufaceous-artifact", "uuid", ] @@ -13729,7 +14568,7 @@ dependencies = [ "chrono", "fs-err 3.3.0", "futures", - "illumos-utils", + "illumos-utils 0.1.0", "jiff", "libc", "omicron-common", @@ -13762,7 +14601,7 @@ dependencies = [ "futures", "gethostname", "illumos-devinfo", - "illumos-utils", + "illumos-utils 0.1.0", "libc", "libefi-illumos", "libnvme", @@ -13774,7 +14613,7 @@ dependencies = [ "rand 0.9.2", "schemars 0.8.22", "serde", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "thiserror 2.0.18", @@ -13798,6 +14637,19 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "sled-hardware-types" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "daft", + "omicron-workspace-hack", + "schemars 0.8.22", + "serde", + "slog", + "thiserror 2.0.18", +] + [[package]] name = "sled-storage" version = "0.1.0" @@ -13813,7 +14665,7 @@ dependencies = [ "futures", "glob", "iddqd", - "illumos-utils", + "illumos-utils 0.1.0", "key-manager", "omicron-common", "omicron-test-utils", @@ -13994,6 +14846,17 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "smf" +version = "0.10.0" +source = "git+https://github.com/illumos/smf-rs?branch=main#72389b5161d2cca1f0e239b337af68bf31f191f4" +dependencies = [ + "libc", + "libscf-sys", + "num-traits", + "thiserror 1.0.69", +] + [[package]] name = "smf" version = "0.10.0" @@ -14049,7 +14912,7 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.117", @@ -14086,10 +14949,10 @@ dependencies = [ "futures", "gateway-ereport-messages", "gateway-messages", - "gateway-types", + "gateway-types 0.1.0", "hex", "hubtools 0.4.7 (git+https://github.com/oxidecomputer/hubtools.git?rev=2b1ef9b38d75563ea800baa3b17327eec17b1b7a)", - "nexus-types", + "nexus-types 0.1.0", "nix 0.31.2", "omicron-common", "omicron-workspace-hack", @@ -14686,7 +15549,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix 1.1.3", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -14706,7 +15569,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -15019,7 +15882,7 @@ dependencies = [ [[package]] name = "tofino" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/tofino#7e56ab6e9a64ebae27cd97cd6e10ebf2cfdc3a33" +source = "git+https://github.com/oxidecomputer/tofino#e25e52991785039e967fd8fe7d86554d976e6d4b" dependencies = [ "anyhow", "cc", @@ -15421,10 +16284,10 @@ dependencies = [ "reconfigurator-cli", "reedline", "serde_json", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog", "tabled 0.15.0", - "trust-quorum-protocol", + "trust-quorum-protocol 0.1.0", "trust-quorum-test-utils", ] @@ -15474,7 +16337,7 @@ dependencies = [ [[package]] name = "transceiver-controller" version = "0.1.1" -source = "git+https://github.com/oxidecomputer/transceiver-control?branch=main#11afc484d5957b13d3058e44db274aa720cea1c4" +source = "git+https://github.com/oxidecomputer/transceiver-control?branch=main#81167659157860d6587713b3362b7bc791dfb530" dependencies = [ "anyhow", "clap", @@ -15522,7 +16385,7 @@ dependencies = [ [[package]] name = "transceiver-decode" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/transceiver-control?branch=main#11afc484d5957b13d3058e44db274aa720cea1c4" +source = "git+https://github.com/oxidecomputer/transceiver-control?branch=main#81167659157860d6587713b3362b7bc791dfb530" dependencies = [ "schemars 0.8.22", "serde", @@ -15546,7 +16409,7 @@ dependencies = [ [[package]] name = "transceiver-messages" version = "0.1.1" -source = "git+https://github.com/oxidecomputer/transceiver-control?branch=main#11afc484d5957b13d3058e44db274aa720cea1c4" +source = "git+https://github.com/oxidecomputer/transceiver-control?branch=main#81167659157860d6587713b3362b7bc791dfb530" dependencies = [ "bitflags 2.11.0", "clap", @@ -15579,7 +16442,7 @@ dependencies = [ "dropshot", "hickory-proto 0.25.2", "hickory-resolver 0.25.2", - "internal-dns-types", + "internal-dns-types 0.1.0", "omicron-workspace-hack", "slog", "tempfile", @@ -15592,7 +16455,7 @@ dependencies = [ "anyhow", "assert_matches", "attest-mock", - "bootstore", + "bootstore 0.1.0", "bytes", "camino", "chacha20poly1305", @@ -15602,11 +16465,11 @@ dependencies = [ "derive_more 0.99.20", "dropshot", "futures", - "gfss", + "gfss 0.1.0", "hex", "hkdf", "iddqd", - "omicron-ledger", + "omicron-ledger 0.1.0", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -15618,8 +16481,8 @@ dependencies = [ "serde_with", "sha3", "sled-agent-measurements", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "sprockets-tls", @@ -15629,9 +16492,9 @@ dependencies = [ "test-strategy", "thiserror 2.0.18", "tokio", - "trust-quorum-protocol", + "trust-quorum-protocol 0.1.0", "trust-quorum-test-utils", - "trust-quorum-types", + "trust-quorum-types 0.1.0", "uuid", "zeroize", ] @@ -15642,7 +16505,7 @@ version = "0.1.0" dependencies = [ "assert_matches", "attest-mock", - "bootstore", + "bootstore 0.1.0", "bytes", "camino", "chacha20poly1305", @@ -15650,7 +16513,7 @@ dependencies = [ "daft", "derive_more 0.99.20", "dropshot", - "gfss", + "gfss 0.1.0", "hex", "hkdf", "iddqd", @@ -15664,8 +16527,8 @@ dependencies = [ "serde_json", "serde_with", "sha3", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "static_assertions", @@ -15673,7 +16536,42 @@ dependencies = [ "test-strategy", "thiserror 2.0.18", "trust-quorum-test-utils", - "trust-quorum-types", + "trust-quorum-types 0.1.0", + "uuid", + "zeroize", +] + +[[package]] +name = "trust-quorum-protocol" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "bootstore 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "bytes", + "camino", + "chacha20poly1305", + "ciborium", + "daft", + "derive_more 0.99.20", + "gfss 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "hex", + "hkdf", + "iddqd", + "omicron-uuid-kinds", + "omicron-workspace-hack", + "rand 0.9.2", + "secrecy 0.10.3", + "serde", + "serde_with", + "sha3", + "sled-agent-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", + "slog", + "slog-error-chain", + "static_assertions", + "subtle", + "thiserror 2.0.18", + "trust-quorum-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "uuid", "zeroize", ] @@ -15682,40 +16580,71 @@ dependencies = [ name = "trust-quorum-test-utils" version = "0.1.0" dependencies = [ - "bootstore", + "bootstore 0.1.0", "camino", "daft", "dropshot", - "gfss", + "gfss 0.1.0", "iddqd", "omicron-uuid-kinds", "omicron-workspace-hack", "secrecy 0.10.3", "serde", "serde_json", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", - "trust-quorum-protocol", - "trust-quorum-types", + "trust-quorum-protocol 0.1.0", + "trust-quorum-types 0.1.0", +] + +[[package]] +name = "trust-quorum-types" +version = "0.1.0" +dependencies = [ + "omicron-workspace-hack", + "trust-quorum-types-versions 0.1.0", ] [[package]] name = "trust-quorum-types" version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "omicron-workspace-hack", + "trust-quorum-types-versions 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", +] + +[[package]] +name = "trust-quorum-types-versions" +version = "0.1.0" dependencies = [ + "byte-wrapper", + "daft", + "derive_more 0.99.20", + "gfss 0.1.0", + "iddqd", + "omicron-uuid-kinds", "omicron-workspace-hack", - "trust-quorum-types-versions", + "rand 0.9.2", + "schemars 0.8.22", + "serde", + "serde_with", + "sled-hardware-types 0.1.0", + "slog", + "slog-error-chain", + "thiserror 2.0.18", ] [[package]] name = "trust-quorum-types-versions" version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" dependencies = [ "byte-wrapper", "daft", "derive_more 0.99.20", - "gfss", + "gfss 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "iddqd", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -15723,7 +16652,7 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_with", - "sled-hardware-types", + "sled-hardware-types 0.1.0 (git+https://github.com/oxidecomputer/omicron?branch=main)", "slog", "slog-error-chain", "thiserror 2.0.18", @@ -16223,6 +17152,36 @@ dependencies = [ "uuid", ] +[[package]] +name = "update-engine" +version = "0.1.0" +source = "git+https://github.com/oxidecomputer/omicron?branch=main#dbaeb64ed174748570548023bb4b119d939105b0" +dependencies = [ + "anyhow", + "cancel-safe-futures", + "chrono", + "debug-ignore", + "derive-where", + "either", + "futures", + "indent_write", + "indexmap 2.14.0", + "libsw", + "linear-map", + "omicron-workspace-hack", + "owo-colors 4.3.0", + "petgraph 0.8.3", + "schemars 0.8.22", + "serde", + "serde_json", + "serde_with", + "slog", + "swrite", + "tokio", + "unicode-width 0.1.14", + "uuid", +] + [[package]] name = "url" version = "2.5.8" @@ -16797,7 +17756,7 @@ dependencies = [ "itertools 0.14.0", "maplit", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-workspace-hack", "owo-colors 4.3.0", "proptest", @@ -16808,8 +17767,8 @@ dependencies = [ "serde", "serde_json", "shell-words", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-async", "slog-envlogger", @@ -16827,7 +17786,7 @@ dependencies = [ "tufaceous-artifact", "tui-tree-widget", "unicode-width 0.1.14", - "update-engine", + "update-engine 0.1.0", "wicket-common", "wicketd-client", "zeroize", @@ -16840,8 +17799,8 @@ dependencies = [ "anyhow", "dpd-client 0.1.0 (git+https://github.com/oxidecomputer/dendrite?rev=b6d8ba7957c8ed1e6b29fa4b2d85ad2c2248565e)", "dropshot", - "gateway-client", - "gateway-types", + "gateway-client 0.1.0", + "gateway-types 0.1.0", "maplit", "omicron-common", "omicron-workspace-hack", @@ -16852,8 +17811,8 @@ dependencies = [ "serde", "serde_json", "sha2", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "slog-error-chain", "thiserror 2.0.18", @@ -16861,7 +17820,7 @@ dependencies = [ "toml 0.8.23", "transceiver-controller 0.1.1 (git+https://github.com/oxidecomputer/transceiver-control)", "tufaceous-artifact", - "update-engine", + "update-engine 0.1.0", ] [[package]] @@ -16911,29 +17870,29 @@ dependencies = [ "flume", "fs-err 3.3.0", "futures", - "gateway-client", + "gateway-client 0.1.0", "gateway-messages", "gateway-test-utils", - "gateway-types", + "gateway-types 0.1.0", "hex", "hickory-resolver 0.25.2", "http", "http-body-util", "hubtools 0.4.7 (git+https://github.com/oxidecomputer/hubtools.git?rev=2b1ef9b38d75563ea800baa3b17327eec17b1b7a)", "hyper", - "illumos-utils", + "illumos-utils 0.1.0", "installinator", "installinator-api", "installinator-client", "installinator-common", - "internal-dns-resolver", - "internal-dns-types", + "internal-dns-resolver 0.1.0", + "internal-dns-types 0.1.0", "itertools 0.14.0", "maplit", "omicron-certificates", "omicron-common", "omicron-ddm-admin-client", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-test-utils", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -16951,8 +17910,8 @@ dependencies = [ "sled-agent-config-reconciler", "sled-agent-resolvable-files", "sled-agent-resolvable-files-examples", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "sled-storage", "slog", "slog-dtrace", @@ -16970,7 +17929,7 @@ dependencies = [ "tufaceous-artifact", "tufaceous-lib", "update-common", - "update-engine", + "update-engine 0.1.0", "uuid", "wicket", "wicket-common", @@ -16984,15 +17943,15 @@ version = "0.1.0" dependencies = [ "bootstrap-agent-lockstep-client", "dropshot", - "gateway-client", + "gateway-client 0.1.0", "omicron-common", - "omicron-passwords", + "omicron-passwords 0.1.0", "omicron-uuid-kinds", "omicron-workspace-hack", "schemars 0.8.22", "semver 1.0.28", "serde", - "sled-hardware-types", + "sled-hardware-types 0.1.0", "slog", "tufaceous-artifact", "wicket-common", @@ -17002,7 +17961,7 @@ dependencies = [ name = "wicketd-client" version = "0.1.0" dependencies = [ - "bootstrap-agent-lockstep-types", + "bootstrap-agent-lockstep-types 0.1.0", "chrono", "installinator-common", "omicron-common", @@ -17015,10 +17974,10 @@ dependencies = [ "semver 1.0.28", "serde", "serde_json", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", - "update-engine", + "update-engine 0.1.0", "uuid", "wicket-common", ] @@ -17051,7 +18010,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] @@ -17454,6 +18413,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -17828,7 +18796,7 @@ dependencies = [ "async-trait", "camino", "camino-tempfile", - "illumos-utils", + "illumos-utils 0.1.0", "key-manager", "omicron-common", "omicron-uuid-kinds", @@ -17901,14 +18869,14 @@ dependencies = [ "camino", "clap", "dropshot", - "illumos-utils", + "illumos-utils 0.1.0", "omicron-common", "omicron-workspace-hack", "oxide-tokio-rt", "oxnet", "serde_json", - "sled-agent-types", - "sled-hardware-types", + "sled-agent-types 0.1.0", + "sled-hardware-types 0.1.0", "slog", "tokio", "uzers", diff --git a/Cargo.toml b/Cargo.toml index 1f9d1f7f029..a6d23c88021 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -569,7 +569,7 @@ hyper = "1.6.0" hyper-util = "0.1.16" hyper-rustls = "0.27.7" hyper-staticfile = "0.10.1" -iddqd = { version = "0.3.18", features = ["daft", "serde", "schemars08"] } +iddqd = { version = "0.4.1", features = ["daft", "serde", "schemars08"] } illumos-utils = { path = "illumos-utils" } iana-time-zone = "0.1.63" indent_write = "2.2.0" @@ -611,8 +611,9 @@ ntp-admin-client = { path = "clients/ntp-admin-client" } ntp-admin-v1-client = { path = "clients/ntp-admin-v1-client" } ntp-admin-types = { path = "ntp-admin/types" } ntp-admin-types-versions = { path = "ntp-admin/types/versions" } -mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "5050964daba98b5ecf91ea2a5a9be9418f1853f9" } -ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "5050964daba98b5ecf91ea2a5a9be9418f1853f9" } +mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "864e0e150a90fd838199ceb38c2ad8a2be92a270" } +mg-api-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "864e0e150a90fd838199ceb38c2ad8a2be92a270" } +ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "864e0e150a90fd838199ceb38c2ad8a2be92a270" } multimap = "0.10.1" nexus-auth = { path = "nexus/auth" } nexus-background-task-interface = { path = "nexus/background-task-interface" } @@ -676,7 +677,7 @@ oxide-client = { path = "clients/oxide-client" } oxide-tokio-rt = "0.1.4" oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "2c6efefe14321dafe7e9e80129d38316adb2d238", features = [ "api", "std" ] } oxlog = { path = "dev-tools/oxlog" } -oxnet = "0.1.4" +oxnet = "0.1.5" once_cell = "1.21.3" openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" } openapiv3 = "2.2.0" @@ -728,11 +729,11 @@ progenitor-client013 = { package = "progenitor-client", version = "0.13.0" } # NOTE: if you change the pinned revision of the `bhyve_api` and propolis # dependencies, you must also update the references in package-manifest.toml to # match the new revision. -bhyve_api = { git = "https://github.com/oxidecomputer/propolis", rev = "6615e4f072c58f4d10e29007f328c536c464445d" } -propolis-api-types-versions = { git = "https://github.com/oxidecomputer/propolis", rev = "6615e4f072c58f4d10e29007f328c536c464445d" } -propolis_api_types = { git = "https://github.com/oxidecomputer/propolis", rev = "6615e4f072c58f4d10e29007f328c536c464445d" } -propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "6615e4f072c58f4d10e29007f328c536c464445d" } -propolis-mock-server = { git = "https://github.com/oxidecomputer/propolis", rev = "6615e4f072c58f4d10e29007f328c536c464445d" } +bhyve_api = { git = "https://github.com/oxidecomputer/propolis", rev = "75518ad2c26db9278895ab1262c28daf13bfdffd" } +propolis-api-types-versions = { git = "https://github.com/oxidecomputer/propolis", rev = "75518ad2c26db9278895ab1262c28daf13bfdffd" } +propolis_api_types = { git = "https://github.com/oxidecomputer/propolis", rev = "75518ad2c26db9278895ab1262c28daf13bfdffd" } +propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "75518ad2c26db9278895ab1262c28daf13bfdffd" } +propolis-mock-server = { git = "https://github.com/oxidecomputer/propolis", rev = "75518ad2c26db9278895ab1262c28daf13bfdffd" } # NOTE: see above! proptest = "1.7.0" qorb = "0.4.1" @@ -749,7 +750,6 @@ rats-corim = { git = "https://github.com/oxidecomputer/rats-corim.git", rev = "f raw-cpuid = { git = "https://github.com/oxidecomputer/rust-cpuid.git", rev = "a4cf01df76f35430ff5d39dc2fe470bcb953503b" } rayon = "1.10" rcgen = "0.12.1" -rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "5050964daba98b5ecf91ea2a5a9be9418f1853f9" } reconfigurator-cli = { path = "dev-tools/reconfigurator-cli" } reedline = "0.40.0" ref-cast = "1.0" @@ -895,8 +895,8 @@ newtype-uuid = { version = "1.3.2", default-features = false } newtype-uuid-macros = "0.1.0" omicron-uuid-kinds = { path = "uuid-kinds", features = ["serde", "schemars08", "uuid-v4"] } -scim2-rs = { git = "https://github.com/oxidecomputer/scim2-rs", rev = "018ae6f7bd752cd9b2124887e00c93c6b4244103" } -scim2-test-client = { git = "https://github.com/oxidecomputer/scim2-rs", rev = "018ae6f7bd752cd9b2124887e00c93c6b4244103" } +scim2-rs = { git = "https://github.com/oxidecomputer/scim2-rs", rev = "163606c052ee30b16dfab282fca721dd81e0868a" } +scim2-test-client = { git = "https://github.com/oxidecomputer/scim2-rs", rev = "163606c052ee30b16dfab282fca721dd81e0868a" } # NOTE: The test profile inherits from the dev profile, so settings under # profile.dev get inherited. AVOID setting anything under profile.test: that @@ -1128,4 +1128,17 @@ path = "workspace-hack" [patch."https://github.com/oxidecomputer/omicron"] omicron-uuid-kinds = { path = "uuid-kinds" } omicron-common = { path = "common" } +# oxlog is built as a binary by omicron-package. Without this patch, +# transitive git-pulls of oxlog (illumos-utils -> oxlog, via maghemite's +# branch=main omicron deps) leave both local and git copies in the dep graph, +# and cargo's `--package oxlog` fails as ambiguous. +# +# TODO: This patch is a symptom of the broader maghemite -> omicron +# self-reference loop (maghemite depends on oximeter-producer, which pulls +# nexus-client -> nexus-types from omicron@main and not a rev). @jgallagher +# flagged this in review; @bnaecker suggested extracting oximeter-producer +# out of omicron to break it. When that lands, this patch (and any +# duplicated path+git entries for illumos-utils, nexus-types, etc.) can be +# removed. +oxlog = { path = "dev-tools/oxlog" } diff --git a/clients/ddm-admin-client/src/lib.rs b/clients/ddm-admin-client/src/lib.rs index 7a8b56d499d..466a8883918 100644 --- a/clients/ddm-admin-client/src/lib.rs +++ b/clients/ddm-admin-client/src/lib.rs @@ -13,6 +13,7 @@ pub use ddm_admin_client::types; use ddm_admin_client::Client as InnerClient; use either::Either; +use omicron_common::address::DDMD_PORT; use oxnet::Ipv6Net; use sled_hardware_types::underlay::BOOTSTRAP_MASK; use sled_hardware_types::underlay::BOOTSTRAP_PREFIX; @@ -26,9 +27,6 @@ use thiserror::Error; use crate::types::EnableStatsRequest; -// TODO-cleanup Is it okay to hardcode this port number here? -const DDMD_PORT: u16 = 8000; - #[derive(Debug, Error, SlogInlineError)] pub enum DdmError { #[error("Failed to construct an HTTP client:")] diff --git a/dev-tools/downloader/src/lib.rs b/dev-tools/downloader/src/lib.rs index 44fb340de28..a7e5a65683b 100644 --- a/dev-tools/downloader/src/lib.rs +++ b/dev-tools/downloader/src/lib.rs @@ -69,6 +69,9 @@ enum Target { /// Maghemite mgd binary MaghemiteMgd, + /// Maghemite ddmd binary + MaghemiteDdmd, + /// SoftNPU, an admin program (scadm) and a pre-compiled P4 program. Softnpu, @@ -137,6 +140,7 @@ pub async fn run_cmd(args: DownloadArgs) -> Result<()> { Target::Console => downloader.download_console().await, Target::DendriteStub => downloader.download_dendrite_stub().await, Target::MaghemiteMgd => downloader.download_maghemite_mgd().await, + Target::MaghemiteDdmd => downloader.download_maghemite_ddmd().await, Target::Softnpu => downloader.download_softnpu().await, Target::TransceiverControl => { downloader.download_transceiver_control().await @@ -946,6 +950,84 @@ impl Downloader<'_> { Ok(()) } + async fn download_maghemite_ddmd(&self) -> Result<()> { + let download_dir = self.output_dir.join("downloads"); + tokio::fs::create_dir_all(&download_dir).await?; + + let checksums_path = self.versions_dir.join("maghemite_mgd_checksums"); + let [mg_ddm_sha2, ddmd_linux_sha2] = get_values_from_file( + ["MG_DDM_SHA256", "DDMD_LINUX_SHA256"], + &checksums_path, + ) + .await?; + let commit_path = + self.versions_dir.join("maghemite_ddm_openapi_version"); + let [commit] = get_values_from_file(["COMMIT"], &commit_path).await?; + + let repo = "oxidecomputer/maghemite"; + let base_url = format!("{BUILDOMAT_URL}/{repo}/image/{commit}"); + + let filename = "mg-ddm.tar.gz"; + let tarball_path = download_dir.join(filename); + download_file_and_verify( + &self.log, + &tarball_path, + &format!("{base_url}/{filename}"), + ChecksumAlgorithm::Sha2, + &mg_ddm_sha2, + ) + .await?; + unpack_tarball(&self.log, &tarball_path, &download_dir).await?; + + let destination_dir = self.output_dir.join("mg-ddm"); + let _ = tokio::fs::remove_dir_all(&destination_dir).await; + tokio::fs::create_dir_all(&destination_dir).await?; + copy_dir_all( + &download_dir.join("root"), + &destination_dir.join("root"), + )?; + + let binary_dir = destination_dir.join("root/opt/oxide/mg-ddm/bin"); + + match os_name()? { + Os::Linux => { + let filename = "ddmd"; + let path = download_dir.join(filename); + download_file_and_verify( + &self.log, + &path, + &format!( + "{BUILDOMAT_URL}/{repo}/linux/{commit}/{filename}" + ), + ChecksumAlgorithm::Sha2, + &ddmd_linux_sha2, + ) + .await?; + set_permissions(&path, 0o755).await?; + tokio::fs::copy(path, binary_dir.join(filename)).await?; + } + Os::Mac => { + info!( + self.log, + "Building maghemite ddmd from source for macOS" + ); + + let binaries = [("ddmd", &["--no-default-features"][..])]; + + let built_binaries = self + .build_from_git("maghemite", &commit, &binaries) + .await?; + + let dest = binary_dir.join("ddmd"); + tokio::fs::copy(&built_binaries[0], &dest).await?; + set_permissions(&dest, 0o755).await?; + } + Os::Illumos => (), + } + + Ok(()) + } + async fn download_softnpu(&self) -> Result<()> { let destination_dir = self.output_dir.join("npuzone"); tokio::fs::create_dir_all(&destination_dir).await?; diff --git a/env.sh b/env.sh index 6a84c35902a..114b53f07ed 100644 --- a/env.sh +++ b/env.sh @@ -12,6 +12,7 @@ export PATH="$OMICRON_WS/out/cockroachdb/bin:$PATH" export PATH="$OMICRON_WS/out/clickhouse:$PATH" export PATH="$OMICRON_WS/out/dendrite-stub/bin:$PATH" export PATH="$OMICRON_WS/out/mgd/root/opt/oxide/mgd/bin:$PATH" +export PATH="$OMICRON_WS/out/mg-ddm/root/opt/oxide/mg-ddm/bin:$PATH" # if xtrace was set previously, do not unset it case $OLD_SHELL_OPTS in diff --git a/internal-dns/types/src/config.rs b/internal-dns/types/src/config.rs index d5bef144343..5b4f736e2c5 100644 --- a/internal-dns/types/src/config.rs +++ b/internal-dns/types/src/config.rs @@ -163,6 +163,20 @@ pub struct DnsConfigBuilder { service_instances_sleds: BTreeMap>, } +/// Ports for the per-switch services published in internal DNS by +/// [`DnsConfigBuilder::host_zone_switch`]. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct HostSwitchZonePorts { + /// Dendrite (`dpd`) admin API port. + pub dendrite: u16, + /// Management Gateway Service (`mgs`) port. + pub mgs: u16, + /// Maghemite `mgd` admin API port. + pub mgd: u16, + /// Maghemite `ddmd` admin API port. + pub ddm: u16, +} + /// Describes a host of type "sled" in the control plane DNS zone #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Sled(SledUuid); @@ -396,10 +410,14 @@ impl DnsConfigBuilder { &mut self, sled_id: SledUuid, switch_zone_ip: Ipv6Addr, - dendrite_port: u16, - mgs_port: u16, - mgd_port: u16, + ports: HostSwitchZonePorts, ) -> anyhow::Result<()> { + let HostSwitchZonePorts { + dendrite: dendrite_port, + mgs: mgs_port, + mgd: mgd_port, + ddm: ddm_port, + } = ports; let zone = self.host_dendrite(sled_id, switch_zone_ip)?; self.service_backend_zone(ServiceName::Dendrite, &zone, dendrite_port)?; self.service_backend_zone( @@ -407,7 +425,8 @@ impl DnsConfigBuilder { &zone, mgs_port, )?; - self.service_backend_zone(ServiceName::Mgd, &zone, mgd_port) + self.service_backend_zone(ServiceName::Mgd, &zone, mgd_port)?; + self.service_backend_zone(ServiceName::Ddm, &zone, ddm_port) } /// Higher-level shorthand for adding a Nexus zone with both its internal @@ -731,7 +750,9 @@ impl DnsConfigBuilder { #[cfg(test)] mod test { - use super::{DnsConfigBuilder, Host, ServiceName}; + use super::{ + DnsConfigBuilder, DnsRecord, Host, HostSwitchZonePorts, ServiceName, + }; use crate::{config::Zone, names::DNS_ZONE}; use omicron_common::api::external::Generation; use omicron_uuid_kinds::{OmicronZoneUuid, SledUuid}; @@ -779,6 +800,8 @@ mod test { "_oximeter-reader._tcp", ); assert_eq!(ServiceName::Dendrite.dns_name(), "_dendrite._tcp",); + assert_eq!(ServiceName::Mgd.dns_name(), "_mgd._tcp",); + assert_eq!(ServiceName::Ddm.dns_name(), "_ddm._tcp",); assert_eq!( ServiceName::CruciblePantry.dns_name(), "_crucible-pantry._tcp", @@ -796,6 +819,71 @@ mod test { ); } + #[test] + fn host_zone_switch_publishes_all_services() { + let sled_uuid: SledUuid = + "001de000-51ed-4000-8000-000000000001".parse().unwrap(); + let switch_zone_ip = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1); + + // Use distinct port numbers so an arg-order swap in `host_zone_switch` + // surfaces as a port mismatch on the affected service. + let dendrite_port = 11; + let mgs_port = 13; + let mgd_port = 17; + let ddm_port = 19; + + let mut builder = DnsConfigBuilder::new(); + builder + .host_zone_switch( + sled_uuid, + switch_zone_ip, + HostSwitchZonePorts { + dendrite: dendrite_port, + mgs: mgs_port, + mgd: mgd_port, + ddm: ddm_port, + }, + ) + .unwrap(); + + let config = builder.build_full_config_for_initial_generation(); + + let mut by_name: BTreeMap<&str, &[DnsRecord]> = BTreeMap::new(); + for zone in &config.zones { + for (name, records) in &zone.records { + by_name.insert(name.as_str(), records.as_slice()); + } + } + + for (expected_name, expected_port) in [ + ("_dendrite._tcp", dendrite_port), + ("_mgs._tcp", mgs_port), + ("_mgd._tcp", mgd_port), + ("_ddm._tcp", ddm_port), + ] { + let records = by_name.get(expected_name).unwrap_or_else(|| { + panic!( + "expected {expected_name} in published switch-zone \ + services; got {by_name:?}" + ) + }); + let srv_port = records + .iter() + .find_map(|r| match r { + DnsRecord::Srv(s) => Some(s.port), + _ => None, + }) + .unwrap_or_else(|| { + panic!("no SRV record for {expected_name}: {records:?}") + }); + + assert_eq!( + srv_port, expected_port, + "wrong SRV port for {expected_name}" + ); + } + } + #[test] fn display_hosts() { let sled_uuid = SledUuid::nil(); diff --git a/internal-dns/types/src/names.rs b/internal-dns/types/src/names.rs index 73b2439e48e..105d0222f3c 100644 --- a/internal-dns/types/src/names.rs +++ b/internal-dns/types/src/names.rs @@ -75,6 +75,7 @@ pub enum ServiceName { BoundaryNtp, InternalNtp, Mgd, + Ddm, } impl ServiceName { @@ -116,6 +117,7 @@ impl ServiceName { ServiceName::BoundaryNtp => "boundary-ntp", ServiceName::InternalNtp => "internal-ntp", ServiceName::Mgd => "mgd", + ServiceName::Ddm => "ddm", } } @@ -144,7 +146,8 @@ impl ServiceName { | ServiceName::CruciblePantry | ServiceName::BoundaryNtp | ServiceName::InternalNtp - | ServiceName::Mgd => { + | ServiceName::Mgd + | ServiceName::Ddm => { format!("_{}._tcp", self.service_kind()) } ServiceName::SledAgent(id) => { diff --git a/nexus/Cargo.toml b/nexus/Cargo.toml index a46d27ad6d6..00b131abef5 100644 --- a/nexus/Cargo.toml +++ b/nexus/Cargo.toml @@ -97,7 +97,7 @@ qorb.workspace = true rand.workspace = true range-requests.workspace = true ref-cast.workspace = true -rdb-types.workspace = true +mg-api-types.workspace = true regex.workspace = true reqwest = { workspace = true, features = ["http2", "json"] } ring.workspace = true diff --git a/nexus/reconfigurator/execution/src/dns.rs b/nexus/reconfigurator/execution/src/dns.rs index 685c7c85e6f..0a85c4dd114 100644 --- a/nexus/reconfigurator/execution/src/dns.rs +++ b/nexus/reconfigurator/execution/src/dns.rs @@ -988,9 +988,8 @@ mod test { // the previous pass (i.e., that corresponds to an Omicron zone). // // There are some ServiceNames missing here because they are not part of - // our representative config (e.g., ClickhouseKeeper) or they don't - // currently have DNS record at all (e.g., SledAgent, Maghemite, Mgd, - // Tfport). + // our representative config (e.g., ClickhouseKeeper) or because they + // do not currently have a DNS record at all (e.g., SledAgent). let mut srv_kinds_expected = BTreeSet::from([ ServiceName::Clickhouse, ServiceName::ClickhouseNative, @@ -1001,6 +1000,8 @@ mod test { ServiceName::NexusLockstep, ServiceName::Oximeter, ServiceName::Dendrite, + ServiceName::Mgd, + ServiceName::Ddm, ServiceName::CruciblePantry, ServiceName::BoundaryNtp, ServiceName::InternalNtp, diff --git a/nexus/reconfigurator/execution/src/test_utils.rs b/nexus/reconfigurator/execution/src/test_utils.rs index cd46adacd0b..fdb17289225 100644 --- a/nexus/reconfigurator/execution/src/test_utils.rs +++ b/nexus/reconfigurator/execution/src/test_utils.rs @@ -113,10 +113,12 @@ pub fn overridables_for_test( let dendrite_port = cptestctx.dendrite.read().unwrap().get(&switch_slot).unwrap().port; let mgd_port = cptestctx.mgd.get(&switch_slot).unwrap().port; + let ddm_port = cptestctx.ddm.get(&switch_slot).unwrap().port; overrides.override_switch_zone_ip(sled_id, ip); overrides.override_dendrite_port(sled_id, dendrite_port); overrides.override_mgs_port(sled_id, mgs_port); overrides.override_mgd_port(sled_id, mgd_port); + overrides.override_ddm_port(sled_id, ddm_port); } overrides } diff --git a/nexus/reconfigurator/planning/src/example.rs b/nexus/reconfigurator/planning/src/example.rs index a1f865e2934..7dbbf3640dc 100644 --- a/nexus/reconfigurator/planning/src/example.rs +++ b/nexus/reconfigurator/planning/src/example.rs @@ -1854,7 +1854,8 @@ mod tests { | ServiceName::RepoDepot | ServiceName::ManagementGatewayService | ServiceName::Dendrite - | ServiceName::Mgd => { + | ServiceName::Mgd + | ServiceName::Ddm => { out.insert(service, Ok(())); } // InternalNtp is too large to fit in a single DNS packet and diff --git a/nexus/src/app/background/tasks/sync_switch_configuration.rs b/nexus/src/app/background/tasks/sync_switch_configuration.rs index 91dcc66b070..f4abc9e549b 100644 --- a/nexus/src/app/background/tasks/sync_switch_configuration.rs +++ b/nexus/src/app/background/tasks/sync_switch_configuration.rs @@ -30,13 +30,22 @@ use dpd_client::{Client as DpdClient, types as DpdTypes}; use futures::FutureExt; use futures::future::BoxFuture; use mg_admin_client::types::{ - AddStaticRoute4Request, AddStaticRoute6Request, ApplyRequest, - BestpathFanoutRequest, BgpPeerConfig, CheckerSource, - DeleteStaticRoute4Request, DeleteStaticRoute6Request, + ApplyRequest, BgpPeerConfig, UnnumberedBgpPeerConfig, +}; +use mg_api_types::bgp::config::{ + CheckerSource, Ipv4UnicastConfig, Ipv6UnicastConfig, JitterRange, + ShaperSource, +}; +use mg_api_types::bgp::policy::{ ImportExportPolicy4 as MgImportExportPolicy4, - ImportExportPolicy6 as MgImportExportPolicy6, Ipv4UnicastConfig, - Ipv6UnicastConfig, JitterRange, ShaperSource, StaticRoute4, - StaticRoute4List, StaticRoute6, StaticRoute6List, UnnumberedBgpPeerConfig, + ImportExportPolicy6 as MgImportExportPolicy6, +}; +use mg_api_types::rdb::prefix::{Prefix, Prefix4, Prefix6}; +use mg_api_types::rib::BestpathFanoutRequest; +use mg_api_types::static_routes::{ + AddStaticRoute4Request, AddStaticRoute6Request, DeleteStaticRoute4Request, + DeleteStaticRoute6Request, StaticRoute4, StaticRoute4List, StaticRoute6, + StaticRoute6List, }; use nexus_db_queries::{ context::OpContext, @@ -49,7 +58,6 @@ use omicron_common::{ address::{Ipv6Subnet, get_sled_address}, api::external::{DataPageParams, Name}, }; -use rdb_types::{Prefix, Prefix4, Prefix6}; use serde_json::json; use sled_agent_client::types::HostPortConfig; use sled_agent_types::early_networking::BgpConfig as SledBgpConfig; @@ -998,7 +1006,7 @@ impl BackgroundTask for SwitchPortSettingsManager { "switch_slot" => ?switch_slot, "config" => ?config, ); - if let Err(e) = client.bgp_apply_v2(config).await { + if let Err(e) = client.bgp_apply(config).await { error!(log, "error while applying bgp configuration"; "error" => ?e); } diff --git a/nexus/src/app/bgp.rs b/nexus/src/app/bgp.rs index 53cc41996c5..0ca95b2f294 100644 --- a/nexus/src/app/bgp.rs +++ b/nexus/src/app/bgp.rs @@ -177,7 +177,7 @@ impl super::Nexus { for r in &router_info { let asn = r.asn; - let selector = mg_admin_client::types::ExportedSelector { + let selector = mg_api_types::bgp::session::ExportedSelector { afi: None, asn, peer: None, @@ -199,12 +199,12 @@ impl super::Nexus { for (peer_id, exports) in exported { for ex in exports.iter() { let prefix = match ex { - rdb_types::Prefix::V4(v4) => { + mg_api_types::rdb::prefix::Prefix::V4(v4) => { oxnet::IpNet::V4(oxnet::Ipv4Net::new_unchecked( v4.value, v4.length, )) } - rdb_types::Prefix::V6(v6) => { + mg_api_types::rdb::prefix::Prefix::V6(v6) => { oxnet::IpNet::V6(oxnet::Ipv6Net::new_unchecked( v6.value, v6.length, )) diff --git a/nexus/test-utils/src/nexus_test.rs b/nexus/test-utils/src/nexus_test.rs index 693aea88732..48c945e742b 100644 --- a/nexus/test-utils/src/nexus_test.rs +++ b/nexus/test-utils/src/nexus_test.rs @@ -117,6 +117,7 @@ pub struct ControlPlaneTestContext { /// Ports of stopped dendrite instances (for use by start_dendrite) pub stopped_dendrite_ports: RwLock>, pub mgd: HashMap, + pub ddm: HashMap, pub external_dns_zone_name: String, pub external_dns: TransientDnsServer, pub internal_dns: TransientDnsServer, @@ -320,6 +321,9 @@ impl ControlPlaneTestContext { for (_, mut mgd) in self.mgd { mgd.cleanup().await.unwrap(); } + for (_, mut ddm) in self.ddm { + ddm.cleanup().await.unwrap(); + } self.logctx.cleanup_successful(); } } diff --git a/nexus/test-utils/src/starter.rs b/nexus/test-utils/src/starter.rs index 3822be75d1f..bb84aed361c 100644 --- a/nexus/test-utils/src/starter.rs +++ b/nexus/test-utils/src/starter.rs @@ -23,6 +23,7 @@ use futures::future::BoxFuture; use gateway_test_utils::setup::GatewayTestContext; use iddqd::IdOrdMap; use internal_dns_types::config::DnsConfigBuilder; +use internal_dns_types::config::HostSwitchZonePorts; use internal_dns_types::names::DNS_ZONE_EXTERNAL_TESTING; use internal_dns_types::names::ServiceName; use nexus_config::Database; @@ -146,6 +147,7 @@ pub struct ControlPlaneStarter<'a, N: NexusServer> { pub gateway: BTreeMap, pub dendrite: RwLock>, pub mgd: HashMap, + pub ddm: HashMap, // NOTE: Only exists after starting Nexus, until external Nexus is // initialized. @@ -203,6 +205,7 @@ impl<'a, N: NexusServer> ControlPlaneStarter<'a, N> { gateway: BTreeMap::new(), dendrite: RwLock::new(HashMap::new()), mgd: HashMap::new(), + ddm: HashMap::new(), nexus_internal: None, nexus_internal_addr: None, external_dns_zone_name: None, @@ -465,6 +468,17 @@ impl<'a, N: NexusServer> ControlPlaneStarter<'a, N> { self.config.pkg.mgd.insert(switch_slot, config); } + pub async fn start_ddm(&mut self, switch_slot: SwitchSlot) { + let log = &self.logctx.log; + debug!(log, "Starting DDM sim"; "switch_slot" => ?switch_slot); + + let ddm = dev::maghemite::DdmInstance::start().await.unwrap(); + let port = ddm.port; + self.ddm.insert(switch_slot, ddm); + + debug!(log, "DDM sim started"; "port" => port); + } + pub async fn record_switch_dns( &mut self, sled_id: SledUuid, @@ -483,9 +497,18 @@ impl<'a, N: NexusServer> ControlPlaneStarter<'a, N> { .host_zone_switch( sled_id, Ipv6Addr::LOCALHOST, - self.dendrite.read().unwrap().get(&switch_slot).unwrap().port, - self.gateway.get(&switch_slot).unwrap().port, - self.mgd.get(&switch_slot).unwrap().port, + HostSwitchZonePorts { + dendrite: self + .dendrite + .read() + .unwrap() + .get(&switch_slot) + .unwrap() + .port, + mgs: self.gateway.get(&switch_slot).unwrap().port, + mgd: self.mgd.get(&switch_slot).unwrap().port, + ddm: self.ddm.get(&switch_slot).unwrap().port, + }, ) .unwrap() } @@ -1254,6 +1277,7 @@ impl<'a, N: NexusServer> ControlPlaneStarter<'a, N> { dendrite: RwLock::new(self.dendrite.into_inner().unwrap()), stopped_dendrite_ports: RwLock::new(HashMap::new()), mgd: self.mgd, + ddm: self.ddm, external_dns_zone_name: self.external_dns_zone_name.unwrap(), external_dns: self.external_dns.unwrap(), internal_dns: self.internal_dns.unwrap(), @@ -1295,6 +1319,9 @@ impl<'a, N: NexusServer> ControlPlaneStarter<'a, N> { for (_, mut mgd) in self.mgd { mgd.cleanup().await.unwrap(); } + for (_, mut ddm) in self.ddm { + ddm.cleanup().await.unwrap(); + } self.logctx.cleanup_successful(); } @@ -1635,6 +1662,12 @@ pub(crate) async fn setup_with_config_impl( builder.start_mgd(SwitchSlot::Switch0).boxed() }), ), + ( + "start_ddm_switch0", + Box::new(|builder| { + builder.start_ddm(SwitchSlot::Switch0).boxed() + }), + ), ( "record_switch_dns", Box::new(|builder| { @@ -1679,6 +1712,12 @@ pub(crate) async fn setup_with_config_impl( builder.start_mgd(SwitchSlot::Switch1).boxed() }), ), + ( + "start_ddm_switch1", + Box::new(|builder| { + builder.start_ddm(SwitchSlot::Switch1).boxed() + }), + ), ( "record_switch_dns", Box::new(|builder| { diff --git a/nexus/tests/integration_tests/initialization.rs b/nexus/tests/integration_tests/initialization.rs index 350757cf1de..714880feb37 100644 --- a/nexus/tests/integration_tests/initialization.rs +++ b/nexus/tests/integration_tests/initialization.rs @@ -158,6 +158,11 @@ async fn test_nexus_boots_before_dendrite() { starter.start_mgd(SwitchSlot::Switch1).await; info!(log, "Started mgd"); + info!(log, "Starting ddm"); + starter.start_ddm(SwitchSlot::Switch0).await; + starter.start_ddm(SwitchSlot::Switch1).await; + info!(log, "Started ddm"); + info!(log, "Populating internal DNS records"); starter .record_switch_dns( @@ -197,6 +202,8 @@ async fn nexus_schema_test_setup( starter.start_dendrite(SwitchSlot::Switch1).await; starter.start_mgd(SwitchSlot::Switch0).await; starter.start_mgd(SwitchSlot::Switch1).await; + starter.start_ddm(SwitchSlot::Switch0).await; + starter.start_ddm(SwitchSlot::Switch1).await; starter.populate_internal_dns().await; } diff --git a/nexus/types/src/deployment/execution/dns.rs b/nexus/types/src/deployment/execution/dns.rs index 009377fd8d9..c901dcc92f7 100644 --- a/nexus/types/src/deployment/execution/dns.rs +++ b/nexus/types/src/deployment/execution/dns.rs @@ -155,9 +155,7 @@ pub fn blueprint_internal_dns_config( dns_builder.host_zone_switch( scrimlet.id(), switch_zone_ip, - overrides.dendrite_port(scrimlet.id()), - overrides.mgs_port(scrimlet.id()), - overrides.mgd_port(scrimlet.id()), + overrides.host_switch_zone_ports(scrimlet.id()), )?; } diff --git a/nexus/types/src/deployment/execution/overridables.rs b/nexus/types/src/deployment/execution/overridables.rs index 881a7c49bdd..bf46374d1dc 100644 --- a/nexus/types/src/deployment/execution/overridables.rs +++ b/nexus/types/src/deployment/execution/overridables.rs @@ -2,6 +2,8 @@ // 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 internal_dns_types::config::HostSwitchZonePorts; +use omicron_common::address::DDMD_PORT; use omicron_common::address::DENDRITE_PORT; use omicron_common::address::Ipv6Subnet; use omicron_common::address::MGD_PORT; @@ -29,6 +31,8 @@ pub struct Overridables { pub mgs_ports: BTreeMap, /// map: sled id -> TCP port on which that sled's MGD is listening pub mgd_ports: BTreeMap, + /// map: sled id -> TCP port on which that sled's DDM is listening + pub ddm_ports: BTreeMap, /// map: sled id -> IP address of the sled's switch zone pub switch_zone_ips: BTreeMap, } @@ -67,6 +71,32 @@ impl Overridables { self.mgd_ports.get(&sled_id).copied().unwrap_or(MGD_PORT) } + /// Specify the TCP port on which this sled's DDM is listening + pub fn override_ddm_port(&mut self, sled_id: SledUuid, port: u16) { + self.ddm_ports.insert(sled_id, port); + } + + /// Returns the TCP port on which this sled's DDM is listening + pub fn ddm_port(&self, sled_id: SledUuid) -> u16 { + self.ddm_ports.get(&sled_id).copied().unwrap_or(DDMD_PORT) + } + + /// Returns the per-switch-zone service ports for this sled. + /// + /// Bundles the four switch-zone admin ports into a single + /// [`HostSwitchZonePorts`] so callers cannot swap fields by accident. + pub fn host_switch_zone_ports( + &self, + sled_id: SledUuid, + ) -> HostSwitchZonePorts { + HostSwitchZonePorts { + dendrite: self.dendrite_port(sled_id), + mgs: self.mgs_port(sled_id), + mgd: self.mgd_port(sled_id), + ddm: self.ddm_port(sled_id), + } + } + /// Specify the IP address of this switch zone pub fn override_switch_zone_ip( &mut self, diff --git a/nexus/types/versions/Cargo.toml b/nexus/types/versions/Cargo.toml index 6c0a2274c6e..ddffa6b880c 100644 --- a/nexus/types/versions/Cargo.toml +++ b/nexus/types/versions/Cargo.toml @@ -16,6 +16,7 @@ daft.workspace = true dropshot.workspace = true http.workspace = true mg-admin-client.workspace = true +mg-api-types.workspace = true omicron-common.workspace = true omicron-passwords.workspace = true omicron-uuid-kinds.workspace = true diff --git a/nexus/types/versions/src/impls/networking.rs b/nexus/types/versions/src/impls/networking.rs index 0831b35c920..ddbcec8479f 100644 --- a/nexus/types/versions/src/impls/networking.rs +++ b/nexus/types/versions/src/impls/networking.rs @@ -21,11 +21,11 @@ impl From for latest::networking::AddressLotBlockCreate { } } -impl From +impl From for latest::networking::BgpPeerState { - fn from(s: mg_admin_client::types::FsmStateKind) -> Self { - use mg_admin_client::types::FsmStateKind; + fn from(s: mg_api_types::bgp::session::FsmStateKind) -> Self { + use mg_api_types::bgp::session::FsmStateKind; match s { FsmStateKind::Idle => Self::Idle, FsmStateKind::Connect => Self::Connect, diff --git a/package-manifest.toml b/package-manifest.toml index f9fa03596a4..6fba18d2db0 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -667,10 +667,10 @@ service_name = "propolis-server" only_for_targets.image = "standard" source.type = "prebuilt" source.repo = "propolis" -source.commit = "6615e4f072c58f4d10e29007f328c536c464445d" +source.commit = "75518ad2c26db9278895ab1262c28daf13bfdffd" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/propolis/image//propolis-server.sha256.txt -source.sha256 = "530cc160985843a95614ee5726caaf64a820c81b70399045cc3a509eeeceff12" +source.sha256 = "5dd6af4c615e471cde8df42c0a9152e879e552ad248910d8e74c007b6bc028c7" output.type = "zone" [package.mg-ddm-gz] @@ -683,10 +683,10 @@ source.repo = "maghemite" # `tools/maghemite_openapi_version`. Failing to do so will cause a failure when # building `ddm-admin-client` (which will instruct you to update # `tools/maghemite_openapi_version`). -source.commit = "5050964daba98b5ecf91ea2a5a9be9418f1853f9" +source.commit = "864e0e150a90fd838199ceb38c2ad8a2be92a270" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm-gz.sha256.txt -source.sha256 = "d647dc105bdc54264a22c26d8abf6b11ea989306c1e6adec419490585eb5fd30" +source.sha256 = "23040c51416be48707127aa110c98223e8bed38aa68ee12a9705ca5fe11f3dc3" output.type = "tarball" [package.mg-ddm] @@ -699,10 +699,10 @@ source.repo = "maghemite" # `tools/maghemite_openapi_version`. Failing to do so will cause a failure when # building `ddm-admin-client` (which will instruct you to update # `tools/maghemite_openapi_version`). -source.commit = "5050964daba98b5ecf91ea2a5a9be9418f1853f9" +source.commit = "864e0e150a90fd838199ceb38c2ad8a2be92a270" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "58b433c95f351c12c0eba9574d0a7e9ecccec49014274848a67516cd7f08880f" +source.sha256 = "2b62a31a39367882879b13ecb50c24582b29587bbf46c3eb6889c5d516d37a4a" output.type = "zone" output.intermediate_only = true @@ -714,10 +714,10 @@ source.repo = "maghemite" # `tools/maghemite_openapi_version`. Failing to do so will cause a failure when # building `ddm-admin-client` (which will instruct you to update # `tools/maghemite_openapi_version`). -source.commit = "5050964daba98b5ecf91ea2a5a9be9418f1853f9" +source.commit = "864e0e150a90fd838199ceb38c2ad8a2be92a270" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mgd.sha256.txt -source.sha256 = "ed23649aba3e7a8624f7c46ddbe5b87a05138ca6082b31890f9ed0cb74f20ca5" +source.sha256 = "895c99a2bc8106ffeceef9dd0997d71e4e040b8473c1a3c032991d6a01fbf13f" output.type = "zone" output.intermediate_only = true @@ -725,8 +725,8 @@ output.intermediate_only = true service_name = "lldp" source.type = "prebuilt" source.repo = "lldp" -source.commit = "61479b6922f9112fbe1e722414d2b8055212cb12" -source.sha256 = "8f988c0b0fa3ad4121ab0e825298601035e56c5c054bdc3a1dfb4d6c8fd5b300" +source.commit = "0d199cebf8fe3b24b9d943bdc46a00c227e5a345" +source.sha256 = "4078931e1cccec31e51386c14d08641110d042686074c649d4bbcf8e90658bdb" output.type = "zone" output.intermediate_only = true @@ -833,8 +833,8 @@ setup_hint = "Run `cargo xtask download transceiver-control` to download the nec service_name = "thundermuffin" source.type = "prebuilt" source.repo = "thundermuffin" -source.commit = "a4a6108d7c9aac2464a0b6898e88132a8f701a13" -source.sha256 = "dc55a2accd33a347df4cbdc0026cbaccea2c004940c3fec8cadcdd633d440dfa" +source.commit = "e7ce5975d53f91dbd5696afa959698d8924766ba" +source.sha256 = "7ac866e0495c05410800272483f80ac7231ea6b533906d535b70024e86d0156b" output.type = "zone" output.intermediate_only = true diff --git a/sled-agent/early-networking/Cargo.toml b/sled-agent/early-networking/Cargo.toml index 0ae4cc1428c..8fb7b9e21f7 100644 --- a/sled-agent/early-networking/Cargo.toml +++ b/sled-agent/early-networking/Cargo.toml @@ -19,11 +19,11 @@ http.workspace = true internal-dns-resolver.workspace = true internal-dns-types.workspace = true mg-admin-client.workspace = true +mg-api-types.workspace = true omicron-common.workspace = true omicron-ddm-admin-client.workspace = true omicron-workspace-hack.workspace = true oxnet.workspace = true -rdb-types.workspace = true sled-agent-types.workspace = true slog.workspace = true slog-error-chain.workspace = true diff --git a/sled-agent/early-networking/src/lib.rs b/sled-agent/early-networking/src/lib.rs index b4e9e6f768b..edf0bf400a0 100644 --- a/sled-agent/early-networking/src/lib.rs +++ b/sled-agent/early-networking/src/lib.rs @@ -16,18 +16,23 @@ use internal_dns_resolver::{ResolveError, Resolver as DnsResolver}; use internal_dns_types::names::ServiceName; use mg_admin_client::Client as MgdClient; use mg_admin_client::types::{ - AddStaticRoute4Request, AddStaticRoute6Request, ApplyRequest, - BestpathFanoutRequest, CheckerSource, - ImportExportPolicy4 as MgImportExportPolicy4, - ImportExportPolicy6 as MgImportExportPolicy6, JitterRange, ShaperSource, - StaticRoute4, StaticRoute4List, StaticRoute6, StaticRoute6List, + ApplyRequest, BfdPeerConfig as MgBfdPeerConfig, + BgpPeerConfig as MgBgpPeerConfig, + UnnumberedBgpPeerConfig as MgUnnumberedBgpPeerConfig, }; -use mg_admin_client::types::{ - BfdPeerConfig as MgBfdPeerConfig, Ipv4UnicastConfig, +use mg_api_types::bgp::config::{ + CheckerSource, Ipv4UnicastConfig, Ipv6UnicastConfig, JitterRange, + ShaperSource, }; -use mg_admin_client::types::{ - BgpPeerConfig as MgBgpPeerConfig, Ipv6UnicastConfig, - UnnumberedBgpPeerConfig as MgUnnumberedBgpPeerConfig, +use mg_api_types::bgp::policy::{ + ImportExportPolicy4 as MgImportExportPolicy4, + ImportExportPolicy6 as MgImportExportPolicy6, +}; +use mg_api_types::rdb::prefix::{Prefix, Prefix4, Prefix6}; +use mg_api_types::rib::BestpathFanoutRequest; +use mg_api_types::static_routes::{ + AddStaticRoute4Request, AddStaticRoute6Request, StaticRoute4, + StaticRoute4List, StaticRoute6, StaticRoute6List, }; use omicron_common::OMICRON_DPD_TAG; use omicron_common::address::DENDRITE_PORT; @@ -37,7 +42,6 @@ use omicron_common::backoff::{ }; use omicron_ddm_admin_client::DdmError; use oxnet::IpNet; -use rdb_types::{Prefix, Prefix4, Prefix6}; use sled_agent_types::early_networking::{ BfdMode, BgpConfig, BgpPeerConfig, ImportExportPolicy, LinkFec, LinkSpeed, PortConfig, RouterPeerType, SwitchSlot, UplinkAddress, @@ -712,7 +716,7 @@ impl<'a> EarlyNetworkSetup<'a> { fanout: config.max_paths.as_nonzero_u8(), }; - if let Err(e) = mgd.bgp_apply_v2(&request).await { + if let Err(e) = mgd.bgp_apply(&request).await { error!( self.log, "BGP peer configuration failed"; diff --git a/sled-agent/rack-setup/src/plan/service.rs b/sled-agent/rack-setup/src/plan/service.rs index 48de2b1d3e9..6ec735e8f62 100644 --- a/sled-agent/rack-setup/src/plan/service.rs +++ b/sled-agent/rack-setup/src/plan/service.rs @@ -13,7 +13,7 @@ use iddqd::errors::DuplicateItem; use iddqd::id_upcast; use illumos_utils::zpool::ZpoolName; use internal_dns_types::config::{ - DnsConfigBuilder, DnsConfigParams, Host, Zone, + DnsConfigBuilder, DnsConfigParams, Host, HostSwitchZonePorts, Zone, }; use internal_dns_types::names::ServiceName; use nexus_types::deployment::LastAllocatedSubnetIpOffset; @@ -29,10 +29,10 @@ use nexus_types::deployment::{ }; use nexus_types::external_api::sled::SledState; use omicron_common::address::{ - CP_SERVICES_RESERVED_ADDRESSES, DENDRITE_PORT, DNS_HTTP_PORT, DNS_PORT, - Ipv6Subnet, MGD_PORT, MGS_PORT, NEXUS_INTERNAL_PORT, NEXUS_LOCKSTEP_PORT, - NTP_PORT, NUM_SOURCE_NAT_PORTS, REPO_DEPOT_PORT, ReservedRackSubnet, - SLED_PREFIX, SLED_RESERVED_ADDRESSES, get_sled_address, + CP_SERVICES_RESERVED_ADDRESSES, DDMD_PORT, DENDRITE_PORT, DNS_HTTP_PORT, + DNS_PORT, Ipv6Subnet, MGD_PORT, MGS_PORT, NEXUS_INTERNAL_PORT, + NEXUS_LOCKSTEP_PORT, NTP_PORT, NUM_SOURCE_NAT_PORTS, REPO_DEPOT_PORT, + ReservedRackSubnet, SLED_PREFIX, SLED_RESERVED_ADDRESSES, get_sled_address, get_switch_zone_address, }; use omicron_common::api::external::{Generation, MacAddr, Vni}; @@ -338,9 +338,12 @@ impl ServicePlan { .host_zone_switch( sled.sled_id, address, - DENDRITE_PORT, - MGS_PORT, - MGD_PORT, + HostSwitchZonePorts { + dendrite: DENDRITE_PORT, + mgs: MGS_PORT, + mgd: MGD_PORT, + ddm: DDMD_PORT, + }, ) .unwrap(); } diff --git a/test-utils/src/dev/maghemite.rs b/test-utils/src/dev/maghemite.rs index eaae1af8cd4..a7091d38508 100644 --- a/test-utils/src/dev/maghemite.rs +++ b/test-utils/src/dev/maghemite.rs @@ -135,11 +135,123 @@ fn redirect_file( .with_context(|| format!("open \"{}\"", out_path.display())) } +/// Per-OS configuration for asking the kernel which TCP port a pid is +/// listening on. +struct PortProbe { + /// Command to invoke (`pfiles` on illumos, `ss` on Linux). + command: &'static str, + /// Arguments to pass to `command`. + args: Vec, + /// Substring that must appear on a line for it to belong to the target + /// pid. `None` when the command is already pid-scoped (e.g. `pfiles + /// `). + pid_marker: Option, + /// Pattern that extracts the listening port into capture group 1. + port_re: regex::Regex, +} + +impl PortProbe { + #[cfg(target_os = "illumos")] + fn for_pid(pid: u32) -> Self { + // `pfiles ` lines look like: + // sockname: AF_INET6 ::1 port: 41065 + Self { + command: "pfiles", + args: vec![pid.to_string()], + pid_marker: None, + port_re: regex::Regex::new( + r"sockname:\s+AF_INET6\s+::1?\s+port:\s+(\d+)", + ) + .unwrap(), + } + } + + #[cfg(target_os = "linux")] + fn for_pid(pid: u32) -> Self { + // `ss -tlnpH` lines look like: + // LISTEN 0 128 [::1]:41065 [::]:* users:(("ddmd",pid=12345,fd=8)) + Self { + command: "ss", + args: vec!["-tlnpH".to_string()], + pid_marker: Some(format!("pid={pid}")), + port_re: regex::Regex::new(r"\[::1?\]:(\d+)").unwrap(), + } + } + + #[cfg(target_os = "macos")] + fn for_pid(pid: u32) -> Self { + // `lsof` is part of base macOS, so this compiles and runs without + // any extra install. `lsof -nP -p -iTCP -sTCP:LISTEN` lines + // look like: + // ddmd 12345 user 10u IPv6 0x... 0t0 TCP [::1]:41065 (LISTEN) + Self { + command: "lsof", + args: vec![ + "-nP".to_string(), + "-p".to_string(), + pid.to_string(), + "-iTCP".to_string(), + "-sTCP:LISTEN".to_string(), + ], + pid_marker: None, + port_re: regex::Regex::new(r"\[::1?\]:(\d+)").unwrap(), + } + } + + async fn probe(&self) -> Result, anyhow::Error> { + let output = tokio::process::Command::new(self.command) + .args(&self.args) + .output() + .await + .with_context(|| format!("running {}", self.command))?; + if !output.status.success() { + // The probe command can transiently fail (process exiting, + // permissions, etc.); leave it to the caller to retry. + return Ok(None); + } + let text = std::str::from_utf8(&output.stdout) + .with_context(|| format!("{} output not utf8", self.command))?; + Ok(text + .lines() + .filter(|line| { + self.pid_marker.as_deref().is_none_or(|m| line.contains(m)) + }) + .find_map(|line| { + self.port_re + .captures(line)? + .get(1)? + .as_str() + .parse::() + .ok() + })) + } +} + +/// Ask the kernel which TCP port `pid` is listening on. Retries until either +/// the port is found or [`DDMD_TIMEOUT`] elapses, since `ddmd` may not have +/// finished binding when we first probe. +async fn find_listening_port(pid: u32) -> Result { + let probe = PortProbe::for_pid(pid); + let deadline = Instant::now() + DDMD_TIMEOUT; + loop { + if let Some(port) = probe.probe().await? { + return Ok(port); + } + if Instant::now() >= deadline { + anyhow::bail!( + "kernel reports no listening TCP port for pid {pid} after \ + {DDMD_TIMEOUT:?}" + ); + } + sleep(Duration::from_millis(100)).await; + } +} + async fn discover_port(logfile: String) -> Result { let timeout = Instant::now() + MGD_TIMEOUT; tokio::time::timeout_at(timeout, find_mgd_port_in_log(logfile)) .await - .context("time out while discovering mgd port number")? + .context("time out while discovering port number")? } async fn find_mgd_port_in_log(logfile: String) -> Result { @@ -169,6 +281,126 @@ async fn find_mgd_port_in_log(logfile: String) -> Result { } } +/// Specifies the amount of time we will wait for `ddmd` to bind its admin +/// port, confirmed by asking the kernel which TCP port `ddmd`'s pid is +/// listening on. +const DDMD_TIMEOUT: Duration = Duration::from_secs(5); + +/// Test fixture that spawns and supervises a legit `ddmd` subprocess. +/// +/// Owns a `tokio::process::Child` and a tempdir; discovers the bound admin +/// port by scraping dropshot's startup `local_addr` records; kills the child +/// on `cleanup`/`Drop`. Mirrors `MgdInstance`. +/// +/// `ddmd` runs in sled global zones and switch zones in production. Spawned +/// here with `--api-only`, which serves only the admin API and skips the +/// discovery / exchange / routing daemons that need real network interfaces +/// and illumos-only kernel facilities. Only switch-zone instances +/// are registered in internal DNS as `ServiceName::Ddm`; sled-global-zone +/// instances are accessed locally by their own host (RSS, sled-agent's +/// prefix advertisement, etc.) and don't need DNS publication. +pub struct DdmInstance { + /// Port number the ddmd instance is listening on. + pub port: u16, + /// Arguments provided to the `ddmd` cli command. + pub args: Vec, + /// Child process spawned by running `ddmd`. + pub child: Option, + /// Temporary directory where logging output and other files generated by + /// `ddmd` are stored. + pub data_dir: Option, +} + +impl DdmInstance { + /// Start a `ddmd` instance with `--api-only`, bound to an auto-assigned + /// admin port on localhost. + /// + /// `MgdInstance` discovers its admin port by scraping `local_addr` from + /// `mgd`'s startup logs. That approach does not work for `ddmd`: the + /// dropshot endpoint-registration records that carry `local_addr` are + /// emitted at debug level, and `ddmd`'s slog drain is currently focused + /// on errors, so those lines never reach stdout. + /// + /// Instead, this fixture asks the kernel directly via `pfiles` (illumos), + /// `ss` (Linux), or `lsof` (macOS), which reports the listening TCP port + /// for `ddmd`'s pid regardless of what `ddmd` chose to log. + /// + /// Tracked upstream as oxidecomputer/maghemite#740. Once unified logging + /// levels land, this fixture can revert to the simpler log-scrape pattern + /// that `MgdInstance` uses. + pub async fn start() -> Result { + let temp_dir = TempDir::new()?; + + let args = vec![ + "--admin-addr".to_string(), + "::1".into(), + "--admin-port".into(), + "0".into(), + "--api-only".into(), + "--data-dir".into(), + temp_dir.path().display().to_string(), + ]; + + let child = tokio::process::Command::new("ddmd") + .args(&args) + .stdin(Stdio::null()) + .stdout(Stdio::from(redirect_file(temp_dir.path(), "ddmd_stdout")?)) + .stderr(Stdio::from(redirect_file(temp_dir.path(), "ddmd_stderr")?)) + .spawn() + .with_context(|| { + format!("failed to spawn `ddmd` (with args: {:?})", &args) + })?; + + let pid = + child.id().context("ddmd child has no pid (already exited?)")?; + let temp_dir = temp_dir.keep(); + + let port = find_listening_port(pid).await.with_context(|| { + format!( + "failed to discover ddmd listening port for pid {pid} \ + (see {}/ddmd_stdout, ddmd_stderr)", + temp_dir.display() + ) + })?; + + Ok(Self { port, args, child: Some(child), data_dir: Some(temp_dir) }) + } + + pub async fn cleanup(&mut self) -> Result<(), anyhow::Error> { + if let Some(mut child) = self.child.take() { + child.start_kill().context("Sending SIGKILL to child")?; + child.wait().await.context("waiting for child")?; + } + if let Some(dir) = self.data_dir.take() { + std::fs::remove_dir_all(&dir).with_context(|| { + format!("cleaning up temporary directory {}", dir.display()) + })?; + } + Ok(()) + } +} + +impl Drop for DdmInstance { + fn drop(&mut self) { + if self.child.is_some() || self.data_dir.is_some() { + eprintln!( + "WARN: dropped DdmInstance without cleaning it up first \ + (there may still be a child process running and a \ + temporary directory leaked)" + ); + if let Some(child) = self.child.as_mut() { + let _ = child.start_kill(); + } + if let Some(path) = self.data_dir.take() { + eprintln!( + "WARN: ddmd temporary directory leaked: {}", + path.display() + ); + } + } + } +} + #[cfg(test)] mod tests { use super::find_mgd_port_in_log; @@ -189,6 +421,16 @@ mod tests { .expect("Cannot find 'mgd' on PATH. Refer to README.md for installation instructions"); } + #[tokio::test] + async fn test_ddmd_in_path() { + tokio::process::Command::new("ddmd") + .stdin(Stdio::null()) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .spawn() + .expect("Cannot find 'ddmd' on PATH. Refer to README.md for installation instructions"); + } + #[tokio::test] async fn test_discover_local_listening_port() { // Write some data to a fake log file diff --git a/tools/install_builder_prerequisites.sh b/tools/install_builder_prerequisites.sh index 0f1df7d2528..d79a923ca1f 100755 --- a/tools/install_builder_prerequisites.sh +++ b/tools/install_builder_prerequisites.sh @@ -230,6 +230,7 @@ retry xtask download \ console \ dendrite-stub \ maghemite-mgd \ + maghemite-ddmd \ transceiver-control # Validate the PATH: diff --git a/tools/maghemite_ddm_openapi_version b/tools/maghemite_ddm_openapi_version index 608b7a5cb93..c64950eee94 100644 --- a/tools/maghemite_ddm_openapi_version +++ b/tools/maghemite_ddm_openapi_version @@ -1 +1 @@ -COMMIT="5050964daba98b5ecf91ea2a5a9be9418f1853f9" +COMMIT="864e0e150a90fd838199ceb38c2ad8a2be92a270" diff --git a/tools/maghemite_mg_openapi_version b/tools/maghemite_mg_openapi_version index 608b7a5cb93..c64950eee94 100644 --- a/tools/maghemite_mg_openapi_version +++ b/tools/maghemite_mg_openapi_version @@ -1 +1 @@ -COMMIT="5050964daba98b5ecf91ea2a5a9be9418f1853f9" +COMMIT="864e0e150a90fd838199ceb38c2ad8a2be92a270" diff --git a/tools/maghemite_mgd_checksums b/tools/maghemite_mgd_checksums index f1ccc3277bf..b6b70a78e16 100644 --- a/tools/maghemite_mgd_checksums +++ b/tools/maghemite_mgd_checksums @@ -1,2 +1,2 @@ -CIDL_SHA256="ed23649aba3e7a8624f7c46ddbe5b87a05138ca6082b31890f9ed0cb74f20ca5" -MGD_LINUX_SHA256="5163a351f9d49ee610010eb6519b59ef5dba44612cb84cac78d734c5b3472baa" \ No newline at end of file +CIDL_SHA256="895c99a2bc8106ffeceef9dd0997d71e4e040b8473c1a3c032991d6a01fbf13f" +MGD_LINUX_SHA256="b62e295a91632961118d189369f4549568bdcdb06957636e001c8fd59ebff033" \ No newline at end of file diff --git a/tools/update_maghemite.sh b/tools/update_maghemite.sh index 0051397b51d..0a482cb4440 100755 --- a/tools/update_maghemite.sh +++ b/tools/update_maghemite.sh @@ -54,6 +54,12 @@ function update_mgd { SHA_LINUX=$(get_sha "$REPO" "$TARGET_COMMIT" "mgd" "linux") OUTPUT_LINUX=$(printf "MGD_LINUX_SHA256=\"%s\"\n" "$SHA_LINUX") + SHA_MG_DDM=$(get_sha "$REPO" "$TARGET_COMMIT" "mg-ddm" "image") + OUTPUT_MG_DDM=$(printf "MG_DDM_SHA256=\"%s\"\n" "$SHA_MG_DDM") + + SHA_DDMD_LINUX=$(get_sha "$REPO" "$TARGET_COMMIT" "ddmd" "linux") + OUTPUT_DDMD_LINUX=$(printf "DDMD_LINUX_SHA256=\"%s\"\n" "$SHA_DDMD_LINUX") + if [ -n "$DRY_RUN" ]; then MGD_PATH="/dev/null" else @@ -61,7 +67,7 @@ function update_mgd { fi echo "Updating Maghemite mgd from: $TARGET_COMMIT" set -x - printf "$OUTPUT\n$OUTPUT_LINUX" > $MGD_PATH + printf "$OUTPUT\n$OUTPUT_LINUX\n$OUTPUT_MG_DDM\n$OUTPUT_DDMD_LINUX" > $MGD_PATH set +x } diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index 110c9d9f337..6eaaf4a1bb8 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -33,15 +33,15 @@ bytes = { version = "1.11.1", features = ["serde"] } camino = { version = "1.2.2", default-features = false, features = ["serde1"] } chrono = { version = "0.4.44", features = ["serde"] } cipher = { version = "0.4.4", default-features = false, features = ["block-padding", "zeroize"] } -clap = { version = "4.6.1", features = ["cargo", "derive", "env", "wrap_help"] } -clap_builder = { version = "4.6.0", default-features = false, features = ["cargo", "color", "env", "std", "suggestions", "usage", "wrap_help"] } +clap = { version = "4.6.1", features = ["cargo", "derive", "env", "unstable-styles", "wrap_help"] } +clap_builder = { version = "4.6.0", default-features = false, features = ["cargo", "env", "std", "suggestions", "unstable-styles", "usage", "wrap_help"] } const-oid = { version = "0.9.6", default-features = false, features = ["db", "std"] } crossbeam-epoch = { version = "0.9.18" } crossbeam-utils = { version = "0.8.21" } crossterm = { version = "0.28.1", features = ["event-stream", "serde"] } crypto-common = { version = "0.1.7", default-features = false, features = ["getrandom", "std"] } curve25519-dalek = { version = "4.1.3", features = ["digest", "legacy_compatibility", "rand_core"] } -daft = { version = "0.1.5", features = ["derive", "newtype-uuid1", "oxnet01", "uuid1"] } +daft = { version = "0.1.7", features = ["derive", "newtype-uuid1", "oxnet01", "uuid1"] } data-encoding = { version = "2.10.0" } der = { version = "0.7.10", default-features = false, features = ["derive", "flagset", "oid", "pem", "std"] } digest = { version = "0.10.7", features = ["mac", "oid", "std"] } @@ -71,13 +71,12 @@ hex = { version = "0.4.3", features = ["serde"] } hickory-proto = { version = "0.25.2", features = ["serde", "text-parsing"] } hmac = { version = "0.12.1", default-features = false, features = ["reset"] } hyper = { version = "1.8.1", features = ["full"] } -iddqd = { version = "0.3.18", features = ["daft", "proptest", "schemars08"] } +iddqd = { version = "0.4.1", features = ["daft", "proptest", "schemars08"] } idna = { version = "1.1.0" } indexmap = { version = "2.14.0", features = ["serde"] } inout = { version = "0.1.4", default-features = false, features = ["std"] } ipnet = { version = "2.11.0", features = ["serde"] } ipnetwork = { version = "0.21.1", features = ["schemars", "serde"] } -itertools = { version = "0.13.0" } lalrpop-util = { version = "0.19.12" } lazy_static = { version = "1.5.0", default-features = false, features = ["spin_no_std"] } libc = { version = "0.2.185", features = ["extra_traits"] } @@ -115,7 +114,6 @@ regex-syntax = { version = "0.8.10" } reqwest-594e8ee84c453af0 = { package = "reqwest", version = "0.13.2", features = ["blocking", "cookies", "json", "query", "stream"] } reqwest-5ef9efb8ec2df382 = { package = "reqwest", version = "0.12.28", features = ["blocking", "json", "rustls-tls", "stream"] } rsa = { version = "0.9.10", features = ["serde", "sha2"] } -rustc-hash = { version = "2.1.1" } rustls = { version = "0.23.37", features = ["ring"] } rustls-webpki = { version = "0.103.9", default-features = false, features = ["aws-lc-rs", "ring", "std"] } schemars = { version = "0.8.22", features = ["bytes", "chrono", "semver", "url", "uuid1"] } @@ -180,15 +178,15 @@ camino = { version = "1.2.2", default-features = false, features = ["serde1"] } cc = { version = "1.2.56", default-features = false, features = ["parallel"] } chrono = { version = "0.4.44", features = ["serde"] } cipher = { version = "0.4.4", default-features = false, features = ["block-padding", "zeroize"] } -clap = { version = "4.6.1", features = ["cargo", "derive", "env", "wrap_help"] } -clap_builder = { version = "4.6.0", default-features = false, features = ["cargo", "color", "env", "std", "suggestions", "usage", "wrap_help"] } +clap = { version = "4.6.1", features = ["cargo", "derive", "env", "unstable-styles", "wrap_help"] } +clap_builder = { version = "4.6.0", default-features = false, features = ["cargo", "env", "std", "suggestions", "unstable-styles", "usage", "wrap_help"] } const-oid = { version = "0.9.6", default-features = false, features = ["db", "std"] } crossbeam-epoch = { version = "0.9.18" } crossbeam-utils = { version = "0.8.21" } crossterm = { version = "0.28.1", features = ["event-stream", "serde"] } crypto-common = { version = "0.1.7", default-features = false, features = ["getrandom", "std"] } curve25519-dalek = { version = "4.1.3", features = ["digest", "legacy_compatibility", "rand_core"] } -daft = { version = "0.1.5", features = ["derive", "newtype-uuid1", "oxnet01", "uuid1"] } +daft = { version = "0.1.7", features = ["derive", "newtype-uuid1", "oxnet01", "uuid1"] } data-encoding = { version = "2.10.0" } der = { version = "0.7.10", default-features = false, features = ["derive", "flagset", "oid", "pem", "std"] } digest = { version = "0.10.7", features = ["mac", "oid", "std"] } @@ -219,13 +217,12 @@ hex = { version = "0.4.3", features = ["serde"] } hickory-proto = { version = "0.25.2", features = ["serde", "text-parsing"] } hmac = { version = "0.12.1", default-features = false, features = ["reset"] } hyper = { version = "1.8.1", features = ["full"] } -iddqd = { version = "0.3.18", features = ["daft", "proptest", "schemars08"] } +iddqd = { version = "0.4.1", features = ["daft", "proptest", "schemars08"] } idna = { version = "1.1.0" } indexmap = { version = "2.14.0", features = ["serde"] } inout = { version = "0.1.4", default-features = false, features = ["std"] } ipnet = { version = "2.11.0", features = ["serde"] } ipnetwork = { version = "0.21.1", features = ["schemars", "serde"] } -itertools = { version = "0.13.0" } lalrpop-util = { version = "0.19.12" } lazy_static = { version = "1.5.0", default-features = false, features = ["spin_no_std"] } libc = { version = "0.2.185", features = ["extra_traits"] } @@ -263,7 +260,6 @@ regex-syntax = { version = "0.8.10" } reqwest-594e8ee84c453af0 = { package = "reqwest", version = "0.13.2", features = ["blocking", "cookies", "json", "query", "stream"] } reqwest-5ef9efb8ec2df382 = { package = "reqwest", version = "0.12.28", features = ["blocking", "json", "rustls-tls", "stream"] } rsa = { version = "0.9.10", features = ["serde", "sha2"] } -rustc-hash = { version = "2.1.1" } rustls = { version = "0.23.37", features = ["ring"] } rustls-webpki = { version = "0.103.9", default-features = false, features = ["aws-lc-rs", "ring", "std"] } schemars = { version = "0.8.22", features = ["bytes", "chrono", "semver", "url", "uuid1"] } From e328074106e163afbb0cbfe32a793cc1bb0582d8 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Sat, 23 May 2026 04:05:28 +0000 Subject: [PATCH 5/5] [thundermuffin] bump to 473a90f8 --- package-manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 3b9e31c56e5..f1080f0820c 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -833,8 +833,8 @@ setup_hint = "Run `cargo xtask download transceiver-control` to download the nec service_name = "thundermuffin" source.type = "prebuilt" source.repo = "thundermuffin" -source.commit = "e7ce5975d53f91dbd5696afa959698d8924766ba" -source.sha256 = "7ac866e0495c05410800272483f80ac7231ea6b533906d535b70024e86d0156b" +source.commit = "473a90f8081e99f1b77f2625d97ab1f7817b3468" +source.sha256 = "757600f364dcffa2ffccf6a95918b99b4dbd71c8ec60746a776143f3e086b519" output.type = "zone" output.intermediate_only = true