From 77421dedf5877b3da64f101b16cb13bc18768d05 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Thu, 11 Apr 2024 18:50:22 -0500 Subject: [PATCH 01/26] begin work on v2p mapping rpw --- nexus/src/app/background/mod.rs | 1 + nexus/src/app/background/v2p_mappings.rs | 65 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 nexus/src/app/background/v2p_mappings.rs diff --git a/nexus/src/app/background/mod.rs b/nexus/src/app/background/mod.rs index 2b8db422b4..e6d74cef5f 100644 --- a/nexus/src/app/background/mod.rs +++ b/nexus/src/app/background/mod.rs @@ -22,5 +22,6 @@ mod region_replacement; mod status; mod sync_service_zone_nat; mod sync_switch_configuration; +mod v2p_mappings; pub use init::BackgroundTasks; diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs new file mode 100644 index 0000000000..881ee27b5f --- /dev/null +++ b/nexus/src/app/background/v2p_mappings.rs @@ -0,0 +1,65 @@ +use std::{collections::HashMap, sync::Arc}; + +use futures::future::BoxFuture; +use futures::FutureExt; +use nexus_db_queries::{context::OpContext, db::DataStore}; +use nexus_networking::{sled_client, sled_client_from_address}; +use nexus_types::{external_api::views::Sled, identity::Asset}; +use omicron_common::api::external::DataPageParams; +use serde_json::json; + +use super::common::BackgroundTask; + +pub struct V2PManager { + datastore: Arc, +} + +impl V2PManager { + pub fn new(datastore: Arc) -> Self { + Self { datastore } + } +} + +impl BackgroundTask for V2PManager { + fn activate<'a>( + &'a mut self, + opctx: &'a OpContext, + ) -> BoxFuture<'a, serde_json::Value> { + async move { + // Get ids of active / available sleds + let log = opctx.log.clone(); + let sleds = match self + .datastore + .sled_list(opctx, &DataPageParams::max_page()) + .await + { + Ok(v) => v, + Err(e) => { + let msg = format!("failed enumerate sleds: {:#}", e); + error!(&log, "{msg}"); + return json!({"error": msg}); + } + }; + + // Map ids of sleds to sled clients, skip client on failure + let sled_clients: Vec<_> = sleds + .into_iter() + .map(|sled| { + let client = sled_client_from_address( + sled.id(), + sled.address(), + &log, + ); + (sled, client) + }) + .collect(); + + // sled_client_from_address(sled_id, address, log) + + // Get all active instance vnics + + // for each sled client, send set of expected v2p mappings + json!({}) + } + } +} From 889d00f8966577fce7309d09b36c53a9982eb5a7 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 12 Apr 2024 14:12:16 -0500 Subject: [PATCH 02/26] more scaffolding --- nexus/src/app/background/v2p_mappings.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs index 881ee27b5f..fc7fb97233 100644 --- a/nexus/src/app/background/v2p_mappings.rs +++ b/nexus/src/app/background/v2p_mappings.rs @@ -1,10 +1,10 @@ -use std::{collections::HashMap, sync::Arc}; +use std::sync::Arc; use futures::future::BoxFuture; use futures::FutureExt; use nexus_db_queries::{context::OpContext, db::DataStore}; -use nexus_networking::{sled_client, sled_client_from_address}; -use nexus_types::{external_api::views::Sled, identity::Asset}; +use nexus_networking::sled_client_from_address; +use nexus_types::identity::Asset; use omicron_common::api::external::DataPageParams; use serde_json::json; @@ -54,12 +54,11 @@ impl BackgroundTask for V2PManager { }) .collect(); - // sled_client_from_address(sled_id, address, log) - // Get all active instance vnics // for each sled client, send set of expected v2p mappings json!({}) } + .boxed() } } From 946a81fa1331b5c229a06a2b71daeaa3d71649f3 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Thu, 18 Apr 2024 18:17:36 +0000 Subject: [PATCH 03/26] basic rpw for opte v2p mappings --- Cargo.lock | 14 +- Cargo.toml | 8 +- clients/sled-agent-client/src/lib.rs | 12 ++ dev-tools/omdb/tests/env.out | 12 ++ dev-tools/omdb/tests/successes.out | 11 ++ illumos-utils/src/opte/port_manager.rs | 43 ++++++ nexus/db-model/src/lib.rs | 2 + nexus/db-model/src/schema.rs | 11 ++ nexus/db-model/src/schema_versions.rs | 3 +- nexus/db-model/src/v2p_mapping.rs | 16 ++ nexus/db-queries/src/db/datastore/mod.rs | 1 + .../src/db/datastore/network_interface.rs | 56 +++++++ .../src/db/datastore/v2p_mapping.rs | 42 +++++ nexus/src/app/background/init.rs | 19 +++ nexus/src/app/background/v2p_mappings.rs | 144 ++++++++++++++++-- openapi/sled-agent.json | 28 ++++ .../tests/output/self-stat-schema.json | 4 +- .../crdb/add-view-for-v2p-mappings/up01.sql | 18 +++ .../crdb/add-view-for-v2p-mappings/up02.sql | 3 + .../crdb/add-view-for-v2p-mappings/up03.sql | 2 + .../crdb/add-view-for-v2p-mappings/up04.sql | 2 + schema/crdb/dbinit.sql | 32 +++- sled-agent/src/http_entrypoints.rs | 17 +++ sled-agent/src/sled_agent.rs | 6 + smf/sled-agent/non-gimlet/config-rss.toml | 14 +- 25 files changed, 484 insertions(+), 36 deletions(-) create mode 100644 nexus/db-model/src/v2p_mapping.rs create mode 100644 nexus/db-queries/src/db/datastore/v2p_mapping.rs create mode 100644 schema/crdb/add-view-for-v2p-mappings/up01.sql create mode 100644 schema/crdb/add-view-for-v2p-mappings/up02.sql create mode 100644 schema/crdb/add-view-for-v2p-mappings/up03.sql create mode 100644 schema/crdb/add-view-for-v2p-mappings/up04.sql diff --git a/Cargo.lock b/Cargo.lock index dfb03b36f4..67ac059fcb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1774,7 +1774,7 @@ dependencies = [ [[package]] name = "derror-macro" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=7ee353a470ea59529ee1b34729681da887aa88ce#7ee353a470ea59529ee1b34729681da887aa88ce" +source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" dependencies = [ "darling", "proc-macro2", @@ -3491,7 +3491,7 @@ dependencies = [ [[package]] name = "illumos-sys-hdrs" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=7ee353a470ea59529ee1b34729681da887aa88ce#7ee353a470ea59529ee1b34729681da887aa88ce" +source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" [[package]] name = "illumos-utils" @@ -3896,7 +3896,7 @@ dependencies = [ [[package]] name = "kstat-macro" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=7ee353a470ea59529ee1b34729681da887aa88ce#7ee353a470ea59529ee1b34729681da887aa88ce" +source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" dependencies = [ "quote", "syn 2.0.58", @@ -5961,7 +5961,7 @@ dependencies = [ [[package]] name = "opte" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=7ee353a470ea59529ee1b34729681da887aa88ce#7ee353a470ea59529ee1b34729681da887aa88ce" +source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" dependencies = [ "cfg-if", "derror-macro", @@ -5979,7 +5979,7 @@ dependencies = [ [[package]] name = "opte-api" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=7ee353a470ea59529ee1b34729681da887aa88ce#7ee353a470ea59529ee1b34729681da887aa88ce" +source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" dependencies = [ "illumos-sys-hdrs", "ipnetwork", @@ -5991,7 +5991,7 @@ dependencies = [ [[package]] name = "opte-ioctl" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=7ee353a470ea59529ee1b34729681da887aa88ce#7ee353a470ea59529ee1b34729681da887aa88ce" +source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" dependencies = [ "libc", "libnet 0.1.0 (git+https://github.com/oxidecomputer/netadm-sys)", @@ -6065,7 +6065,7 @@ dependencies = [ [[package]] name = "oxide-vpc" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=7ee353a470ea59529ee1b34729681da887aa88ce#7ee353a470ea59529ee1b34729681da887aa88ce" +source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" dependencies = [ "cfg-if", "illumos-sys-hdrs", diff --git a/Cargo.toml b/Cargo.toml index 12d9fe96e8..81b6e89268 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -305,14 +305,18 @@ omicron-sled-agent = { path = "sled-agent" } omicron-test-utils = { path = "test-utils" } omicron-zone-package = "0.11.0" oxide-client = { path = "clients/oxide-client" } -oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce", features = [ "api", "std" ] } +# TODO: levon - point back to main +# oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce", features = [ "api", "std" ] } +oxide-vpc = { git = "https://github.com/oxidecomputer/opte", branch = "add-apis-for-rpw", features = ["api", "std"] } once_cell = "1.19.0" openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" } openapiv3 = "2.0.0" # must match samael's crate! openssl = "0.10" openssl-sys = "0.9" -opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce" } +# TODO: levon - point back to main +# opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce" } +opte-ioctl = { git = "https://github.com/oxidecomputer/opte", branch = "add-apis-for-rpw" } oso = "0.27" owo-colors = "4.0.0" oximeter = { path = "oximeter/oximeter" } diff --git a/clients/sled-agent-client/src/lib.rs b/clients/sled-agent-client/src/lib.rs index d500bdca3a..a9cabe897f 100644 --- a/clients/sled-agent-client/src/lib.rs +++ b/clients/sled-agent-client/src/lib.rs @@ -14,6 +14,7 @@ use std::net::IpAddr; use std::net::SocketAddr; use types::{ BfdPeerConfig, BgpConfig, BgpPeerConfig, PortConfigV1, RouteConfig, + SetVirtualNetworkInterfaceHost, }; use uuid::Uuid; @@ -716,3 +717,14 @@ impl Hash for BfdPeerConfig { self.switch.hash(state); } } + +impl Eq for SetVirtualNetworkInterfaceHost {} + +impl Hash for SetVirtualNetworkInterfaceHost { + fn hash(&self, state: &mut H) { + self.physical_host_ip.hash(state); + self.virtual_ip.hash(state); + self.virtual_mac.hash(state); + self.vni.hash(state); + } +} diff --git a/dev-tools/omdb/tests/env.out b/dev-tools/omdb/tests/env.out index 0e0a198f34..6a80df3fbc 100644 --- a/dev-tools/omdb/tests/env.out +++ b/dev-tools/omdb/tests/env.out @@ -100,6 +100,10 @@ task: "switch_port_config_manager" manages switch port settings for rack switches +task: "v2p_manager" + manages opte v2p mappings for vpc networking + + --------------------------------------------- stderr: note: using Nexus URL http://127.0.0.1:REDACTED_PORT @@ -198,6 +202,10 @@ task: "switch_port_config_manager" manages switch port settings for rack switches +task: "v2p_manager" + manages opte v2p mappings for vpc networking + + --------------------------------------------- stderr: note: Nexus URL not specified. Will pick one from DNS. @@ -283,6 +291,10 @@ task: "switch_port_config_manager" manages switch port settings for rack switches +task: "v2p_manager" + manages opte v2p mappings for vpc networking + + --------------------------------------------- stderr: note: Nexus URL not specified. Will pick one from DNS. diff --git a/dev-tools/omdb/tests/successes.out b/dev-tools/omdb/tests/successes.out index ff19bbb9a7..7272942799 100644 --- a/dev-tools/omdb/tests/successes.out +++ b/dev-tools/omdb/tests/successes.out @@ -305,6 +305,10 @@ task: "switch_port_config_manager" manages switch port settings for rack switches +task: "v2p_manager" + manages opte v2p mappings for vpc networking + + --------------------------------------------- stderr: note: using Nexus URL http://127.0.0.1:REDACTED_PORT/ @@ -460,6 +464,13 @@ task: "switch_port_config_manager" started at (s ago) and ran for ms warning: unknown background task: "switch_port_config_manager" (don't know how to interpret details: Object {}) +task: "v2p_manager" + configured period: every 30s + currently executing: no + last completed activation: iter 2, triggered by an explicit signal + started at (s ago) and ran for ms +warning: unknown background task: "v2p_manager" (don't know how to interpret details: Object {}) + --------------------------------------------- stderr: note: using Nexus URL http://127.0.0.1:REDACTED_PORT/ diff --git a/illumos-utils/src/opte/port_manager.rs b/illumos-utils/src/opte/port_manager.rs index 2b2f622070..93c70f7d1e 100644 --- a/illumos-utils/src/opte/port_manager.rs +++ b/illumos-utils/src/opte/port_manager.rs @@ -570,6 +570,49 @@ impl PortManager { Ok(()) } + #[cfg(target_os = "illumos")] + pub fn list_virtual_nics( + &self, + ) -> Result, Error> { + use macaddr::MacAddr6; + use opte_ioctl::OpteHdl; + + let hdl = OpteHdl::open(OpteHdl::XDE_CTL)?; + let v2p = + hdl.dump_v2p(&oxide_vpc::api::DumpVirt2PhysReq { unused: 99 })?; + let mut mappings: Vec<_> = vec![]; + + for mapping in v2p.mappings { + for entry in mapping.ip4 { + mappings.push(SetVirtualNetworkInterfaceHost { + virtual_ip: IpAddr::V4(entry.0.into()), + virtual_mac: MacAddr6::from(entry.1.ether.bytes()).into(), + physical_host_ip: entry.1.ip.into(), + vni: mapping + .vni + .as_u32() + .try_into() + .expect("opte VNI should be 24 bits"), + }); + } + + for entry in mapping.ip6 { + mappings.push(SetVirtualNetworkInterfaceHost { + virtual_ip: IpAddr::V6(entry.0.into()), + virtual_mac: MacAddr6::from(entry.1.ether.bytes()).into(), + physical_host_ip: entry.1.ip.into(), + vni: mapping + .vni + .as_u32() + .try_into() + .expect("opte VNI should be 24 bits"), + }); + } + } + + Ok(mappings) + } + #[cfg(target_os = "illumos")] pub fn set_virtual_nic_host( &self, diff --git a/nexus/db-model/src/lib.rs b/nexus/db-model/src/lib.rs index a2e9565d46..63eb8f56d3 100644 --- a/nexus/db-model/src/lib.rs +++ b/nexus/db-model/src/lib.rs @@ -54,6 +54,7 @@ mod project; mod semver_version; mod switch_interface; mod switch_port; +mod v2p_mapping; // These actually represent subqueries, not real table. // However, they must be defined in the same crate as our tables // for join-based marker trait generation. @@ -188,6 +189,7 @@ pub use typed_uuid::to_db_typed_uuid; pub use upstairs_repair::*; pub use user_builtin::*; pub use utilization::*; +pub use v2p_mapping::*; pub use virtual_provisioning_collection::*; pub use virtual_provisioning_resource::*; pub use vmm::*; diff --git a/nexus/db-model/src/schema.rs b/nexus/db-model/src/schema.rs index 64ddca2c34..046e5f2058 100644 --- a/nexus/db-model/src/schema.rs +++ b/nexus/db-model/src/schema.rs @@ -240,6 +240,17 @@ table! { } } +table! { + v2p_mapping_view (nic_id) { + nic_id -> Uuid, + sled_id -> Uuid, + sled_ip -> Inet, + vni -> Int8, + mac -> Int8, + ip -> Inet, + } +} + table! { bgp_announce_set (id) { id -> Uuid, diff --git a/nexus/db-model/src/schema_versions.rs b/nexus/db-model/src/schema_versions.rs index 362333c442..856684e9f6 100644 --- a/nexus/db-model/src/schema_versions.rs +++ b/nexus/db-model/src/schema_versions.rs @@ -17,7 +17,7 @@ use std::collections::BTreeMap; /// /// This must be updated when you change the database schema. Refer to /// schema/crdb/README.adoc in the root of this repository for details. -pub const SCHEMA_VERSION: SemverVersion = SemverVersion::new(51, 0, 0); +pub const SCHEMA_VERSION: SemverVersion = SemverVersion::new(52, 0, 0); /// List of all past database schema versions, in *reverse* order /// @@ -29,6 +29,7 @@ static KNOWN_VERSIONS: Lazy> = Lazy::new(|| { // | leaving the first copy as an example for the next person. // v // KnownVersion::new(next_int, "unique-dirname-with-the-sql-files"), + KnownVersion::new(52, "add-view-for-v2p-mappings"), KnownVersion::new(51, "blueprint-disposition-column"), KnownVersion::new(50, "add-lookup-disk-by-volume-id-index"), KnownVersion::new(49, "physical-disk-state-and-policy"), diff --git a/nexus/db-model/src/v2p_mapping.rs b/nexus/db-model/src/v2p_mapping.rs new file mode 100644 index 0000000000..005cf5e3d5 --- /dev/null +++ b/nexus/db-model/src/v2p_mapping.rs @@ -0,0 +1,16 @@ +use crate::schema::v2p_mapping_view; +use crate::{MacAddr, SqlU32}; +use ipnetwork::IpNetwork; +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +#[derive(Queryable, Selectable, Clone, Debug, Serialize, Deserialize)] +#[diesel(table_name = v2p_mapping_view)] +pub struct V2PMappingView { + pub nic_id: Uuid, + pub sled_id: Uuid, + pub sled_ip: IpNetwork, + pub vni: SqlU32, + pub mac: MacAddr, + pub ip: IpNetwork, +} diff --git a/nexus/db-queries/src/db/datastore/mod.rs b/nexus/db-queries/src/db/datastore/mod.rs index c753ac5436..32bd8718e3 100644 --- a/nexus/db-queries/src/db/datastore/mod.rs +++ b/nexus/db-queries/src/db/datastore/mod.rs @@ -94,6 +94,7 @@ mod switch_port; pub(crate) mod test_utils; mod update; mod utilization; +mod v2p_mapping; mod virtual_provisioning_collection; mod vmm; mod volume; diff --git a/nexus/db-queries/src/db/datastore/network_interface.rs b/nexus/db-queries/src/db/datastore/network_interface.rs index 795c973407..cd8418e155 100644 --- a/nexus/db-queries/src/db/datastore/network_interface.rs +++ b/nexus/db-queries/src/db/datastore/network_interface.rs @@ -784,6 +784,62 @@ impl DataStore { public_error_from_diesel(e, ErrorHandler::Server) }) } + + /// List all network interfaces associated with all instances, making as + /// many queries as needed to get them all + /// + /// This should generally not be used in API handlers or other + /// latency-sensitive contexts, but it can make sense in saga actions or + /// background tasks. + /// + /// This particular method was add for propagating v2p mappings via RPWs + pub async fn instance_network_interfaces_all_list_batched( + &self, + opctx: &OpContext, + ) -> ListResultVec { + opctx.check_complex_operations_allowed()?; + + let mut all_interfaces = Vec::new(); + let mut paginator = Paginator::new(SQL_BATCH_SIZE); + while let Some(p) = paginator.next() { + let batch = self + .instance_network_interfaces_all_list( + opctx, + &p.current_pagparams(), + ) + .await?; + paginator = p + .found_batch(&batch, &|nic: &InstanceNetworkInterface| { + nic.id() + }); + all_interfaces.extend(batch); + } + Ok(all_interfaces) + } + + /// List one page of all network interfaces associated with instances + pub async fn instance_network_interfaces_all_list( + &self, + opctx: &OpContext, + pagparams: &DataPageParams<'_, Uuid>, + ) -> ListResultVec { + use db::schema::instance_network_interface::dsl; + + // See the comment in `service_create_network_interface`. There's no + // obvious parent for a service network interface (as opposed to + // instance network interfaces, which require ListChildren on the + // instance to list). As a logical proxy, we check for listing children + // of the service IP pool. + let (authz_pool, _pool) = self.ip_pools_service_lookup(opctx).await?; + opctx.authorize(authz::Action::ListChildren, &authz_pool).await?; + + paginated(dsl::instance_network_interface, dsl::id, pagparams) + .filter(dsl::time_deleted.is_null()) + .select(InstanceNetworkInterface::as_select()) + .get_results_async(&*self.pool_connection_authorized(opctx).await?) + .await + .map_err(|e| public_error_from_diesel(e, ErrorHandler::Server)) + } } #[cfg(test)] diff --git a/nexus/db-queries/src/db/datastore/v2p_mapping.rs b/nexus/db-queries/src/db/datastore/v2p_mapping.rs new file mode 100644 index 0000000000..4838416339 --- /dev/null +++ b/nexus/db-queries/src/db/datastore/v2p_mapping.rs @@ -0,0 +1,42 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +use super::DataStore; +use crate::context::OpContext; +use crate::db; +use crate::db::error::{public_error_from_diesel, ErrorHandler}; +use crate::db::model::V2PMappingView; +use crate::db::pagination::paginated; +use crate::transaction_retry::OptionalError; +use async_bb8_diesel::AsyncRunQueryDsl; +use chrono::Utc; +use diesel::{ExpressionMethods, QueryDsl, SelectableHelper}; +use ipnetwork::IpNetwork; +use nexus_db_model::BgpPeerView; +use nexus_types::external_api::params; +use nexus_types::identity::Resource; +use omicron_common::api::external::http_pagination::PaginatedBy; +use omicron_common::api::external::{ + CreateResult, DeleteResult, Error, ListResultVec, LookupResult, NameOrId, + ResourceType, SwitchLocation, +}; +use ref_cast::RefCast; +use uuid::Uuid; + +impl DataStore { + pub async fn v2p_mappings( + &self, + opctx: &OpContext, + ) -> ListResultVec { + use db::schema::v2p_mapping_view::dsl; + + let results = dsl::v2p_mapping_view + .select(V2PMappingView::as_select()) + .load_async(&*self.pool_connection_authorized(opctx).await?) + .await + .map_err(|e| public_error_from_diesel(e, ErrorHandler::Server))?; + + Ok(results) + } +} diff --git a/nexus/src/app/background/init.rs b/nexus/src/app/background/init.rs index e260e9a87b..a4da27013c 100644 --- a/nexus/src/app/background/init.rs +++ b/nexus/src/app/background/init.rs @@ -19,6 +19,7 @@ use super::phantom_disks; use super::region_replacement; use super::sync_service_zone_nat::ServiceZoneNatTracker; use super::sync_switch_configuration::SwitchPortSettingsManager; +use super::v2p_mappings::V2PManager; use crate::app::oximeter::PRODUCER_LEASE_DURATION; use crate::app::sagas::SagaRequest; use nexus_config::BackgroundTaskConfig; @@ -83,6 +84,9 @@ pub struct BackgroundTasks { /// task handle for the switch port settings manager pub task_switch_port_settings_manager: common::TaskHandle, + /// task handle for the opte v2p manager + pub task_v2p_manager: common::TaskHandle, + /// task handle for the task that detects if regions need replacement and /// begins the process pub task_region_replacement: common::TaskHandle, @@ -298,6 +302,20 @@ impl BackgroundTasks { ) }; + let task_v2p_manager = { + driver.register( + "v2p_manager".to_string(), + String::from("manages opte v2p mappings for vpc networking"), + // TODO add custom config? + // should we create a general setting that can be shared across + // multiple tasks? A lot of these have the same values... + config.switch_port_settings_manager.period_secs, + Box::new(V2PManager::new(datastore.clone())), + opctx.child(BTreeMap::new()), + vec![], + ) + }; + // Background task: detect if a region needs replacement and begin the // process let task_region_replacement = { @@ -335,6 +353,7 @@ impl BackgroundTasks { task_blueprint_executor, task_service_zone_nat_tracker, task_switch_port_settings_manager, + task_v2p_manager, task_region_replacement, } } diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs index fc7fb97233..9344f5bb6a 100644 --- a/nexus/src/app/background/v2p_mappings.rs +++ b/nexus/src/app/background/v2p_mappings.rs @@ -1,12 +1,17 @@ -use std::sync::Arc; +use std::{collections::HashSet, sync::Arc}; use futures::future::BoxFuture; use futures::FutureExt; +use nexus_db_model::{Sled, SledState}; use nexus_db_queries::{context::OpContext, db::DataStore}; use nexus_networking::sled_client_from_address; -use nexus_types::identity::Asset; -use omicron_common::api::external::DataPageParams; +use nexus_types::{external_api::views::SledPolicy, identity::Asset}; +use omicron_common::api::external::{DataPageParams, Vni}; use serde_json::json; +use sled_agent_client::types::{ + DeleteVirtualNetworkInterfaceHost, SetVirtualNetworkInterfaceHost, +}; +use uuid::Uuid; use super::common::BackgroundTask; @@ -25,25 +30,38 @@ impl BackgroundTask for V2PManager { &'a mut self, opctx: &'a OpContext, ) -> BoxFuture<'a, serde_json::Value> { + let log = opctx.log.clone(); + async move { - // Get ids of active / available sleds - let log = opctx.log.clone(); - let sleds = match self - .datastore - .sled_list(opctx, &DataPageParams::max_page()) - .await - { + // Get the v2p mappings + let v2p_mappings = match self.datastore.v2p_mappings(opctx).await { Ok(v) => v, Err(e) => { - let msg = format!("failed enumerate sleds: {:#}", e); + let msg = format!("failed to list v2p mappings: {:#}", e); error!(&log, "{msg}"); return json!({"error": msg}); } }; - // Map ids of sleds to sled clients, skip client on failure - let sled_clients: Vec<_> = sleds - .into_iter() + // Get sleds + // we only care about sleds that are active && inservice + let sleds = match self.datastore.sled_list_all_batched(opctx).await + { + Ok(v) => v, + Err(e) => { + let msg = format!("failed to enumerate sleds: {:#}", e); + error!(&log, "{msg}"); + return json!({"error": msg}); + } + } + .into_iter() + .filter(|sled| { + matches!(sled.state(), SledState::Active) + && matches!(sled.policy(), SledPolicy::InService { .. }) + }); + + // Map sled db records to sled-agent clients + let sled_clients: Vec<(Sled, sled_agent_client::Client)> = sleds .map(|sled| { let client = sled_client_from_address( sled.id(), @@ -54,9 +72,103 @@ impl BackgroundTask for V2PManager { }) .collect(); - // Get all active instance vnics + // create a set of updates from the v2p mappings + let desired_v2p: HashSet<_> = v2p_mappings + .into_iter() + .filter_map(|mapping| { + let physical_host_ip = match mapping.sled_ip.ip() { + std::net::IpAddr::V4(v) => { + // sled ip should never be ipv4 + error!( + &log, + "sled ip should be ipv6 but is ipv4: {v}" + ); + return None; + } + std::net::IpAddr::V6(v) => v, + }; + + let vni = match mapping.vni.0.try_into() { + Ok(v) => v, + Err(e) => { + // if we're here, that means a VNI stored in the DB as SqlU32 is + // an invalid VNI + error!( + &log, + "unable to parse Vni from SqlU32"; + "error" => ?e + ); + return None; + } + }; - // for each sled client, send set of expected v2p mappings + // TODO: after looking at the sled-agent side of things, we may not need nic_id? + // the nic_id path parameter is not used in sled_agent + let _nic_id = mapping.nic_id; + + let mapping = SetVirtualNetworkInterfaceHost { + virtual_ip: mapping.ip.ip(), + virtual_mac: *mapping.mac, + physical_host_ip, + vni, + }; + Some(mapping) + }) + .collect(); + + for (sled, client) in sled_clients { + // Get the current mappings on each sled + // Ignore vopte interfaces that are used for services + let found_v2p: HashSet = match client.list_v2p().await { + Ok(v) => v.into_inner(), + Err(e) => { + error!( + &log, + "unable to list opte v2p mappings for sled"; + "sled" => sled.serial_number(), + "error" => ?e + ); + continue; + } + }.into_iter().filter(|vnic| vnic.vni != Vni::SERVICES_VNI).collect(); + + info!(&log, "found opte v2p mappings"; "sled" => sled.serial_number(), "interfaces" => ?found_v2p); + + let v2p_to_add: Vec<_> = desired_v2p.difference(&found_v2p).collect(); + + let v2p_to_del: Vec<_> = found_v2p + .difference(&desired_v2p) + .map(|mapping| DeleteVirtualNetworkInterfaceHost{ + virtual_ip: mapping.virtual_ip, + vni: mapping.vni, + }).collect(); + + info!(&log, "v2p mappings to delete"; "sled" => sled.serial_number(), "mappings" => ?v2p_to_del); + for mapping in v2p_to_del { + if let Err(e) = client.del_v2p(&Uuid::default(), &mapping).await { + error!( + &log, + "failed to delete v2p mapping from sled"; + "sled" => sled.serial_number(), + "mappng" => ?mapping, + "error" => ?e, + ); + } + } + + info!(&log, "v2p mappings to add"; "sled" => sled.serial_number(), "mappings" => ?v2p_to_add); + for mapping in v2p_to_add { + if let Err(e) = client.set_v2p(&Uuid::default(), mapping).await { + error!( + &log, + "failed to add v2p mapping to sled"; + "sled" => sled.serial_number(), + "mappng" => ?mapping, + "error" => ?e, + ); + } + } + } json!({}) } .boxed() diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json index 07a42b461f..a95cf17f09 100644 --- a/openapi/sled-agent.json +++ b/openapi/sled-agent.json @@ -849,6 +849,34 @@ } } }, + "/v2p": { + "get": { + "summary": "List v2p mappings present on sled", + "operationId": "list_v2p", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SetVirtualNetworkInterfaceHost", + "type": "array", + "items": { + "$ref": "#/components/schemas/SetVirtualNetworkInterfaceHost" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, "/v2p/{interface_id}": { "put": { "summary": "Create a mapping from a virtual NIC to a physical host", diff --git a/oximeter/collector/tests/output/self-stat-schema.json b/oximeter/collector/tests/output/self-stat-schema.json index 8017d61880..9c4e88bab4 100644 --- a/oximeter/collector/tests/output/self-stat-schema.json +++ b/oximeter/collector/tests/output/self-stat-schema.json @@ -39,7 +39,7 @@ } ], "datum_type": "cumulative_u64", - "created": "2024-02-05T23:03:00.842290108Z" + "created": "2024-04-18T16:48:10.687105235Z" }, "oximeter_collector:failed_collections": { "timeseries_name": "oximeter_collector:failed_collections", @@ -86,6 +86,6 @@ } ], "datum_type": "cumulative_u64", - "created": "2024-02-05T23:03:00.842943988Z" + "created": "2024-04-18T16:48:10.689588995Z" } } \ No newline at end of file diff --git a/schema/crdb/add-view-for-v2p-mappings/up01.sql b/schema/crdb/add-view-for-v2p-mappings/up01.sql new file mode 100644 index 0000000000..b9cbc4d729 --- /dev/null +++ b/schema/crdb/add-view-for-v2p-mappings/up01.sql @@ -0,0 +1,18 @@ +CREATE VIEW IF NOT EXISTS omicron.public.v2p_mapping_view +AS +SELECT + n.id as nic_id, + s.id as sled_id, + s.ip as sled_ip, + v.vni, + n.mac, + n.ip +FROM omicron.public.vmm vmm +JOIN omicron.public.sled s ON vmm.sled_id = s.id +JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id +JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id +JOIN omicron.public.vpc v ON v.id = n.vpc_id +WHERE vmm.time_deleted IS NULL +AND n.kind = 'instance' +AND s.sled_policy = 'in_service' +AND s.sled_state = 'active'; diff --git a/schema/crdb/add-view-for-v2p-mappings/up02.sql b/schema/crdb/add-view-for-v2p-mappings/up02.sql new file mode 100644 index 0000000000..5ab1075fbe --- /dev/null +++ b/schema/crdb/add-view-for-v2p-mappings/up02.sql @@ -0,0 +1,3 @@ +CREATE INDEX IF NOT EXISTS network_interface_by_parent +ON omicron.public.network_interface (parent_id) +STORING (name, kind, vpc_id, subnet_id, mac, ip, slot); diff --git a/schema/crdb/add-view-for-v2p-mappings/up03.sql b/schema/crdb/add-view-for-v2p-mappings/up03.sql new file mode 100644 index 0000000000..86cef026a1 --- /dev/null +++ b/schema/crdb/add-view-for-v2p-mappings/up03.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS sled_by_policy_and_state +ON omicron.public.sled (sled_policy, sled_state, id) STORING (ip); diff --git a/schema/crdb/add-view-for-v2p-mappings/up04.sql b/schema/crdb/add-view-for-v2p-mappings/up04.sql new file mode 100644 index 0000000000..809146b809 --- /dev/null +++ b/schema/crdb/add-view-for-v2p-mappings/up04.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS active_vmm +on omicron.public.vmm (time_deleted, sled_id, instance_id); diff --git a/schema/crdb/dbinit.sql b/schema/crdb/dbinit.sql index 1fb1c6f3f3..c8cbc9e132 100644 --- a/schema/crdb/dbinit.sql +++ b/schema/crdb/dbinit.sql @@ -3726,6 +3726,36 @@ ON omicron.public.switch_port (port_settings_id, port_name) STORING (switch_loca CREATE INDEX IF NOT EXISTS switch_port_name ON omicron.public.switch_port (port_name); +-- view for v2p mapping rpw +CREATE VIEW IF NOT EXISTS omicron.public.v2p_mapping_view +AS +SELECT + n.id as nic_id, + s.id as sled_id, + s.ip as sled_ip, + v.vni, + n.mac, + n.ip +FROM omicron.public.vmm vmm +JOIN omicron.public.sled s ON vmm.sled_id = s.id +JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id +JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id +JOIN omicron.public.vpc v ON v.id = n.vpc_id +WHERE vmm.time_deleted IS NULL +AND n.kind = 'instance' +AND s.sled_policy = 'in_service' +AND s.sled_state = 'active'; + +CREATE INDEX IF NOT EXISTS network_interface_by_parent +ON omicron.public.network_interface (parent_id) +STORING (name, kind, vpc_id, subnet_id, mac, ip, slot); + +CREATE INDEX IF NOT EXISTS sled_by_policy_and_state +ON omicron.public.sled (sled_policy, sled_state, id) STORING (ip); + +CREATE INDEX IF NOT EXISTS active_vmm +on omicron.public.vmm (time_deleted, sled_id, instance_id); + /* * Metadata for the schema itself. This version number isn't great, as there's * nothing to ensure it gets bumped when it should be, but it's a start. @@ -3760,7 +3790,7 @@ INSERT INTO omicron.public.db_metadata ( version, target_version ) VALUES - ( TRUE, NOW(), NOW(), '51.0.0', NULL) + ( TRUE, NOW(), NOW(), '52.0.0', NULL) ON CONFLICT DO NOTHING; COMMIT; diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index 23a1bde4d8..cf63c5424a 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -73,6 +73,7 @@ pub fn api() -> SledApiDescription { api.register(zone_bundle_cleanup_context_update)?; api.register(zone_bundle_cleanup)?; api.register(sled_role_get)?; + api.register(list_v2p)?; api.register(set_v2p)?; api.register(del_v2p)?; api.register(timesync_get)?; @@ -689,6 +690,22 @@ async fn del_v2p( Ok(HttpResponseUpdatedNoContent()) } +/// List v2p mappings present on sled +// Used by nexus background task +#[endpoint { + method = GET, + path = "/v2p/", +}] +async fn list_v2p( + rqctx: RequestContext, +) -> Result>, HttpError> { + let sa = rqctx.context(); + + let vnics = sa.list_virtual_nics().await.map_err(Error::from)?; + + Ok(HttpResponseOk(vnics)) +} + #[endpoint { method = GET, path = "/timesync", diff --git a/sled-agent/src/sled_agent.rs b/sled-agent/src/sled_agent.rs index fe266e6539..0ac649aa62 100644 --- a/sled-agent/src/sled_agent.rs +++ b/sled-agent/src/sled_agent.rs @@ -1053,6 +1053,12 @@ impl SledAgent { .map_err(Error::from) } + pub async fn list_virtual_nics( + &self, + ) -> Result, Error> { + self.inner.port_manager.list_virtual_nics().map_err(Error::from) + } + pub async fn set_virtual_nic_host( &self, mapping: &SetVirtualNetworkInterfaceHost, diff --git a/smf/sled-agent/non-gimlet/config-rss.toml b/smf/sled-agent/non-gimlet/config-rss.toml index d0b4f94d9f..479c7e2a4a 100644 --- a/smf/sled-agent/non-gimlet/config-rss.toml +++ b/smf/sled-agent/non-gimlet/config-rss.toml @@ -33,7 +33,7 @@ external_dns_zone_name = "oxide.test" # the DNS domain delegated to the rack by the customer. Each of these addresses # must be contained in one of the "internal services" IP Pool ranges listed # below. -external_dns_ips = [ "192.168.1.20", "192.168.1.21" ] +external_dns_ips = [ "10.85.0.20", "10.85.0.21" ] # Initial TLS certificates for the external API # @@ -69,8 +69,8 @@ external_certificates = [] # # For more on this and what to put here, see docs/how-to-run.adoc. [[internal_services_ip_pool_ranges]] -first = "192.168.1.20" -last = "192.168.1.29" +first = "10.85.0.10" +last = "10.85.0.29" # TODO - this configuration is subject to change going forward. Ultimately these # parameters should be provided to the control plane via wicket, but we need to @@ -91,8 +91,8 @@ rack_subnet = "fd00:1122:3344:0100::/56" # A range of IP addresses used by Boundary Services on the external network. In # a real system, these would be addresses of the uplink ports on the Sidecar. # With softnpu, only one address is used. -infra_ip_first = "192.168.1.30" -infra_ip_last = "192.168.1.30" +infra_ip_first = "10.85.0.30" +infra_ip_last = "10.85.0.30" # Configurations for BGP routers to run on the scrimlets. bgp = [] @@ -100,9 +100,9 @@ bgp = [] # You can configure multiple uplinks by repeating the following stanza [[rack_network_config.ports]] # Routes associated with this port. -routes = [{nexthop = "192.168.1.199", destination = "0.0.0.0/0"}] +routes = [{nexthop = "10.85.0.1", destination = "0.0.0.0/0"}] # Addresses associated with this port. -addresses = ["192.168.1.30/24"] +addresses = ["10.85.0.30/24"] # Name of the uplink port. This should always be "qsfp0" when using softnpu. port = "qsfp0" # The speed of this port. From 8a7ffd8017f2013141fd763c842da487d0183b6d Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 19 Apr 2024 01:18:42 +0000 Subject: [PATCH 04/26] fix tests --- .../db-queries/src/db/datastore/v2p_mapping.rs | 17 ++--------------- nexus/src/app/background/v2p_mappings.rs | 2 +- schema/crdb/add-view-for-v2p-mappings/up01.sql | 2 +- schema/crdb/dbinit.sql | 2 +- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/nexus/db-queries/src/db/datastore/v2p_mapping.rs b/nexus/db-queries/src/db/datastore/v2p_mapping.rs index 4838416339..40a9c58537 100644 --- a/nexus/db-queries/src/db/datastore/v2p_mapping.rs +++ b/nexus/db-queries/src/db/datastore/v2p_mapping.rs @@ -7,22 +7,9 @@ use crate::context::OpContext; use crate::db; use crate::db::error::{public_error_from_diesel, ErrorHandler}; use crate::db::model::V2PMappingView; -use crate::db::pagination::paginated; -use crate::transaction_retry::OptionalError; use async_bb8_diesel::AsyncRunQueryDsl; -use chrono::Utc; -use diesel::{ExpressionMethods, QueryDsl, SelectableHelper}; -use ipnetwork::IpNetwork; -use nexus_db_model::BgpPeerView; -use nexus_types::external_api::params; -use nexus_types::identity::Resource; -use omicron_common::api::external::http_pagination::PaginatedBy; -use omicron_common::api::external::{ - CreateResult, DeleteResult, Error, ListResultVec, LookupResult, NameOrId, - ResourceType, SwitchLocation, -}; -use ref_cast::RefCast; -use uuid::Uuid; +use diesel::{QueryDsl, SelectableHelper}; +use omicron_common::api::external::ListResultVec; impl DataStore { pub async fn v2p_mappings( diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs index 9344f5bb6a..0e1ff4a419 100644 --- a/nexus/src/app/background/v2p_mappings.rs +++ b/nexus/src/app/background/v2p_mappings.rs @@ -6,7 +6,7 @@ use nexus_db_model::{Sled, SledState}; use nexus_db_queries::{context::OpContext, db::DataStore}; use nexus_networking::sled_client_from_address; use nexus_types::{external_api::views::SledPolicy, identity::Asset}; -use omicron_common::api::external::{DataPageParams, Vni}; +use omicron_common::api::external::Vni; use serde_json::json; use sled_agent_client::types::{ DeleteVirtualNetworkInterfaceHost, SetVirtualNetworkInterfaceHost, diff --git a/schema/crdb/add-view-for-v2p-mappings/up01.sql b/schema/crdb/add-view-for-v2p-mappings/up01.sql index b9cbc4d729..f676e9cff4 100644 --- a/schema/crdb/add-view-for-v2p-mappings/up01.sql +++ b/schema/crdb/add-view-for-v2p-mappings/up01.sql @@ -13,6 +13,6 @@ JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id JOIN omicron.public.vpc v ON v.id = n.vpc_id WHERE vmm.time_deleted IS NULL -AND n.kind = 'instance' +AND n.kind != 'service' AND s.sled_policy = 'in_service' AND s.sled_state = 'active'; diff --git a/schema/crdb/dbinit.sql b/schema/crdb/dbinit.sql index c8cbc9e132..23e83f26bd 100644 --- a/schema/crdb/dbinit.sql +++ b/schema/crdb/dbinit.sql @@ -3742,7 +3742,7 @@ JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id JOIN omicron.public.vpc v ON v.id = n.vpc_id WHERE vmm.time_deleted IS NULL -AND n.kind = 'instance' +AND n.kind != 'service' AND s.sled_policy = 'in_service' AND s.sled_state = 'active'; From ca42e1e6ab4dd2edc739dc4f61195668bf61e7a6 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 19 Apr 2024 20:14:45 +0000 Subject: [PATCH 05/26] add noop for sim sled-agent --- illumos-utils/src/opte/port_manager.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/illumos-utils/src/opte/port_manager.rs b/illumos-utils/src/opte/port_manager.rs index 93c70f7d1e..f2708041e0 100644 --- a/illumos-utils/src/opte/port_manager.rs +++ b/illumos-utils/src/opte/port_manager.rs @@ -613,6 +613,17 @@ impl PortManager { Ok(mappings) } + #[cfg(not(target_os = "illumos"))] + pub fn list_virtual_nics( + &self, + ) -> Result, Error> { + info!( + self.inner.log, + "Listing virtual nics (ignored)"; + ); + Ok(vec![]) + } + #[cfg(target_os = "illumos")] pub fn set_virtual_nic_host( &self, From 9daef1f15563b9495caded3b49c5704da49b1494 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Tue, 23 Apr 2024 21:24:41 +0000 Subject: [PATCH 06/26] add probes to v2p mapping view --- .../crdb/add-view-for-v2p-mappings/up01.sql | 56 +++++++++++++------ schema/crdb/dbinit.sql | 55 ++++++++++++------ 2 files changed, 79 insertions(+), 32 deletions(-) diff --git a/schema/crdb/add-view-for-v2p-mappings/up01.sql b/schema/crdb/add-view-for-v2p-mappings/up01.sql index f676e9cff4..4f1f818f21 100644 --- a/schema/crdb/add-view-for-v2p-mappings/up01.sql +++ b/schema/crdb/add-view-for-v2p-mappings/up01.sql @@ -1,18 +1,42 @@ +-- view for v2p mapping rpw CREATE VIEW IF NOT EXISTS omicron.public.v2p_mapping_view AS -SELECT - n.id as nic_id, - s.id as sled_id, - s.ip as sled_ip, - v.vni, - n.mac, - n.ip -FROM omicron.public.vmm vmm -JOIN omicron.public.sled s ON vmm.sled_id = s.id -JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id -JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id -JOIN omicron.public.vpc v ON v.id = n.vpc_id -WHERE vmm.time_deleted IS NULL -AND n.kind != 'service' -AND s.sled_policy = 'in_service' -AND s.sled_state = 'active'; +WITH VmV2pMappings AS ( + SELECT + n.id as nic_id, + s.id as sled_id, + s.ip as sled_ip, + v.vni, + n.mac, + n.ip + FROM omicron.public.vmm vmm + JOIN omicron.public.sled s ON vmm.sled_id = s.id + JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id + JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id + JOIN omicron.public.vpc v ON v.id = n.vpc_id + WHERE vmm.time_deleted IS NULL + AND n.kind != 'service' + AND s.sled_policy = 'in_service' + AND s.sled_state = 'active' +), +ProbeV2pMapping AS ( + SELECT + n.id as nic_id, + s.id as sled_id, + s.ip as sled_ip, + v.vni, + n.mac, + n.ip + FROM omicron.public.network_interface n + JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id + JOIN omicron.public.vpc v ON v.id = n.vpc_id + JOIN omicron.public.probe p ON n.parent_id = p.id + JOIN omicron.public.sled s ON p.sled = s.id + WHERE p.time_deleted IS NULL + AND n.kind != 'service' + AND s.sled_policy = 'in_service' + AND s.sled_state = 'active' +) +SELECT nic_id, sled_id, sled_ip, vni, mac, ip FROM VmV2pMappings +UNION +SELECT nic_id, sled_id, sled_ip, vni, mac, ip FROM ProbeV2pMapping; diff --git a/schema/crdb/dbinit.sql b/schema/crdb/dbinit.sql index 23e83f26bd..fadbc0e560 100644 --- a/schema/crdb/dbinit.sql +++ b/schema/crdb/dbinit.sql @@ -3729,22 +3729,45 @@ CREATE INDEX IF NOT EXISTS switch_port_name ON omicron.public.switch_port (port_ -- view for v2p mapping rpw CREATE VIEW IF NOT EXISTS omicron.public.v2p_mapping_view AS -SELECT - n.id as nic_id, - s.id as sled_id, - s.ip as sled_ip, - v.vni, - n.mac, - n.ip -FROM omicron.public.vmm vmm -JOIN omicron.public.sled s ON vmm.sled_id = s.id -JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id -JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id -JOIN omicron.public.vpc v ON v.id = n.vpc_id -WHERE vmm.time_deleted IS NULL -AND n.kind != 'service' -AND s.sled_policy = 'in_service' -AND s.sled_state = 'active'; +WITH VmV2pMappings AS ( + SELECT + n.id as nic_id, + s.id as sled_id, + s.ip as sled_ip, + v.vni, + n.mac, + n.ip + FROM omicron.public.vmm vmm + JOIN omicron.public.sled s ON vmm.sled_id = s.id + JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id + JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id + JOIN omicron.public.vpc v ON v.id = n.vpc_id + WHERE vmm.time_deleted IS NULL + AND n.kind != 'service' + AND s.sled_policy = 'in_service' + AND s.sled_state = 'active' +), +ProbeV2pMapping AS ( + SELECT + n.id as nic_id, + s.id as sled_id, + s.ip as sled_ip, + v.vni, + n.mac, + n.ip + FROM omicron.public.network_interface n + JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id + JOIN omicron.public.vpc v ON v.id = n.vpc_id + JOIN omicron.public.probe p ON n.parent_id = p.id + JOIN omicron.public.sled s ON p.sled = s.id + WHERE p.time_deleted IS NULL + AND n.kind != 'service' + AND s.sled_policy = 'in_service' + AND s.sled_state = 'active' +) +SELECT nic_id, sled_id, sled_ip, vni, mac, ip FROM VmV2pMappings +UNION +SELECT nic_id, sled_id, sled_ip, vni, mac, ip FROM ProbeV2pMapping; CREATE INDEX IF NOT EXISTS network_interface_by_parent ON omicron.public.network_interface (parent_id) From 548bfce9d540a68a0f6cc01a22c3c2932deb5066 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Wed, 24 Apr 2024 18:48:04 +0000 Subject: [PATCH 07/26] adjust column type in schema --- nexus/db-model/src/schema.rs | 2 +- nexus/db-model/src/v2p_mapping.rs | 4 ++-- nexus/src/app/background/v2p_mappings.rs | 14 +------------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/nexus/db-model/src/schema.rs b/nexus/db-model/src/schema.rs index 046e5f2058..1362902083 100644 --- a/nexus/db-model/src/schema.rs +++ b/nexus/db-model/src/schema.rs @@ -245,7 +245,7 @@ table! { nic_id -> Uuid, sled_id -> Uuid, sled_ip -> Inet, - vni -> Int8, + vni -> Int4, mac -> Int8, ip -> Inet, } diff --git a/nexus/db-model/src/v2p_mapping.rs b/nexus/db-model/src/v2p_mapping.rs index 005cf5e3d5..43831f7503 100644 --- a/nexus/db-model/src/v2p_mapping.rs +++ b/nexus/db-model/src/v2p_mapping.rs @@ -1,5 +1,5 @@ use crate::schema::v2p_mapping_view; -use crate::{MacAddr, SqlU32}; +use crate::{MacAddr, Vni}; use ipnetwork::IpNetwork; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -10,7 +10,7 @@ pub struct V2PMappingView { pub nic_id: Uuid, pub sled_id: Uuid, pub sled_ip: IpNetwork, - pub vni: SqlU32, + pub vni: Vni, pub mac: MacAddr, pub ip: IpNetwork, } diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs index 0e1ff4a419..b0ace7e8e5 100644 --- a/nexus/src/app/background/v2p_mappings.rs +++ b/nexus/src/app/background/v2p_mappings.rs @@ -88,19 +88,7 @@ impl BackgroundTask for V2PManager { std::net::IpAddr::V6(v) => v, }; - let vni = match mapping.vni.0.try_into() { - Ok(v) => v, - Err(e) => { - // if we're here, that means a VNI stored in the DB as SqlU32 is - // an invalid VNI - error!( - &log, - "unable to parse Vni from SqlU32"; - "error" => ?e - ); - return None; - } - }; + let vni = mapping.vni.0; // TODO: after looking at the sled-agent side of things, we may not need nic_id? // the nic_id path parameter is not used in sled_agent From df9dea546e5f1f89852424cac2c443bf747d55ca Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 26 Apr 2024 23:12:24 +0000 Subject: [PATCH 08/26] WIP: convert nexus v2p management to rpw activation --- Cargo.lock | 1454 ++++++++--------- Cargo.toml | 8 +- clients/sled-agent-client/src/lib.rs | 6 +- illumos-utils/src/opte/params.rs | 14 +- illumos-utils/src/opte/port_manager.rs | 40 +- nexus/src/app/background/v2p_mappings.rs | 24 +- nexus/src/app/instance_network.rs | 234 +-- nexus/src/app/sagas/instance_start.rs | 40 +- openapi/sled-agent.json | 109 +- .../tests/output/self-stat-schema.json | 4 +- package-manifest.toml | 12 +- sled-agent/src/http_entrypoints.rs | 23 +- sled-agent/src/sim/http_entrypoints.rs | 7 +- sled-agent/src/sim/sled_agent.rs | 10 +- sled-agent/src/sled_agent.rs | 10 +- test-utils/src/dev/maghemite.rs | 2 +- tools/maghemite_mg_openapi_version | 2 +- tools/maghemite_mgd_checksums | 4 +- tools/opte_version | 2 +- 19 files changed, 826 insertions(+), 1179 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 67ac059fcb..2fa9c7fdb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -54,12 +54,12 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.14", "once_cell", "version_check", "zerocopy 0.7.32", @@ -67,18 +67,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -101,20 +101,11 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -132,20 +123,20 @@ checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -174,7 +165,7 @@ dependencies = [ "omicron-workspace-hack", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -188,9 +179,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "argon2" @@ -247,7 +238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" dependencies = [ "anstyle", - "bstr 1.9.0", + "bstr 1.9.1", "doc-comment", "predicates", "predicates-core", @@ -275,13 +266,13 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -303,34 +294,34 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "atomic-polyfill" -version = "0.1.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" dependencies = [ "critical-section", ] [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atomicwrites" @@ -367,14 +358,14 @@ dependencies = [ "quote", "serde", "serde_tokenstream 0.2.0", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backoff" @@ -383,7 +374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom 0.2.12", + "getrandom 0.2.14", "instant", "pin-project-lite", "rand 0.8.5", @@ -392,16 +383,16 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.1", + "object 0.32.2", "rustc-demangle", ] @@ -509,24 +500,24 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.2" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c69fae65a523209d34240b60abe0c42d33d1045d445c0839d8a4894a736e2d" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cexpr", "clang-sys", + "itertools 0.12.1", "lazy_static", "lazycell", "log", - "peeking_take_while", "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.58", + "syn 2.0.60", "which", ] @@ -559,9 +550,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] @@ -609,26 +600,26 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec", - "constant_time_eq 0.2.6", + "constant_time_eq", ] [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", - "constant_time_eq 0.3.0", + "constant_time_eq", "memmap2", "rayon", ] @@ -726,12 +717,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "serde", ] @@ -747,15 +738,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytecount" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" +checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "byteorder" @@ -836,9 +827,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -899,12 +890,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cexpr" @@ -917,11 +905,11 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.6" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ - "smallvec 1.13.1", + "smallvec 1.13.2", "target-lexicon", ] @@ -963,9 +951,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -973,7 +961,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -1016,30 +1004,15 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", "libloading", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap 0.11.0", - "unicode-width", - "vec_map", -] - [[package]] name = "clap" version = "4.5.4" @@ -1059,7 +1032,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim 0.11.1", "terminal_size", ] @@ -1072,7 +1045,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1083,9 +1056,9 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clipboard-win" -version = "5.0.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c57002a5d9be777c1ef967e33674dac9ebd310d8893e4e3437b14d5f0f6372cc" +checksum = "79f4473f5144e20d9aceaf2972478f06ddf687831eafeeb434fbaf0acc4144ad" dependencies = [ "error-code", ] @@ -1164,12 +1137,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "constant_time_eq" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" - [[package]] name = "constant_time_eq" version = "0.3.0" @@ -1222,9 +1189,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1232,9 +1199,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "corncobs" @@ -1265,30 +1232,30 @@ dependencies = [ [[package]] name = "crc" -version = "3.0.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] [[package]] name = "crc-any" -version = "2.4.3" +version = "2.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774646b687f63643eb0f4bf13dc263cb581c8c9e57973b6ddf78bda3994d88df" +checksum = "c01a5e1f881f6fb6099a7bdf949e946719fd4f1fefa56264890574febf0eb6d0" [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -1314,7 +1281,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.4", + "clap", "criterion-plot", "futures", "is-terminal", @@ -1351,21 +1318,19 @@ checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] @@ -1391,7 +1356,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossterm_winapi", "futures-core", "libc", @@ -1471,9 +1436,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -1534,9 +1499,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", @@ -1552,13 +1517,13 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1582,7 +1547,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1593,24 +1558,24 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "datatest-stable" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d08bd225143f03456cf3dc42ecd1254c623c0f6e47f2033c32a0a1236876a13" +checksum = "3cb7ab9130d87ff4c281e2ac877103ee8b4e31cc6028f879ae362ec74b11961d" dependencies = [ "camino", + "fancy-regex", "libtest-mimic", - "regex", "walkdir", ] @@ -1627,7 +1592,7 @@ dependencies = [ "quote", "serde", "serde_tokenstream 0.2.0", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1652,9 +1617,9 @@ checksum = "ffe7ed1d93f4553003e20b629abe9085e1e81b1429520f897f8f8860bc6dfc21" [[package]] name = "defmt" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2d011b2fee29fb7d659b83c43fce9a2cb4df453e16d441a51448e448f3f98" +checksum = "3939552907426de152b3c2c6f51ed53f98f448babd26f28694c95f5906194595" dependencies = [ "bitflags 1.3.2", "defmt-macros", @@ -1662,31 +1627,31 @@ dependencies = [ [[package]] name = "defmt-macros" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54f0216f6c5acb5ae1a47050a6645024e6edafc2ee32d421955eccfef12ef92e" +checksum = "18bdc7a7b92ac413e19e95240e75d3a73a8d8e78aa24a594c22cbb4d44b4bbda" dependencies = [ "defmt-parser", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "defmt-parser" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269924c02afd7f94bc4cecbfa5c379f6ffcf9766b3408fe63d22c728654eccd0" +checksum = "ff4a5fefe330e8d7f31b16a318f9ce81000d8e35e69b93eae154d16d2278f70f" dependencies = [ "thiserror", ] [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "der_derive", @@ -1703,7 +1668,7 @@ checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1724,7 +1689,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1745,7 +1710,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1755,7 +1720,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1774,12 +1739,12 @@ dependencies = [ [[package]] name = "derror-macro" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" +source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1805,11 +1770,11 @@ checksum = "a7993efb860416547839c115490d4951c6d0f8ec04a3594d9dd99d50ed7ec170" [[package]] name = "diesel" -version = "2.1.5" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fc05c17098f21b89bc7d98fe1dd3cce2c11c2ad8e145f2a44fe08ed28eb559" +checksum = "ff236accb9a5069572099f0b350a92e9560e8e63a9b8d546162f4a5e03026bb2" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "chrono", "diesel_derives", @@ -1836,14 +1801,14 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.2" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8337737574f55a468005a83499da720f20c65586241ffea339db9ecdfd2b44" +checksum = "14701062d6bed917b5c7103bdffaee1e4609279e240488ad24e7bd979ca6866c" dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1852,7 +1817,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1957,7 +1922,7 @@ dependencies = [ "camino", "camino-tempfile", "chrono", - "clap 4.5.4", + "clap", "dns-service-client", "dropshot", "expectorate", @@ -2016,7 +1981,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e6b21a1211455e82b1245d6e1b024f30606afbb734c114515d40d0e0b34ce81" dependencies = [ "thiserror", - "zerocopy 0.3.0", + "zerocopy 0.3.2", ] [[package]] @@ -2067,12 +2032,12 @@ dependencies = [ [[package]] name = "dropshot" -version = "0.9.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot?branch=main#29ae98d1f909c6832661408a4c03f929e8afa6e9" +version = "0.10.1-dev" +source = "git+https://github.com/oxidecomputer/dropshot?branch=main#17e8fee4c5753c617b27510e57048710ffd421cd" dependencies = [ "async-stream", "async-trait", - "base64 0.21.7", + "base64 0.22.0", "bytes", "camino", "chrono", @@ -2080,7 +2045,7 @@ dependencies = [ "dropshot_endpoint", "form_urlencoded", "futures", - "hostname", + "hostname 0.4.0", "http 0.2.12", "hyper 0.14.28", "indexmap 2.2.6", @@ -2088,8 +2053,7 @@ dependencies = [ "openapiv3", "paste", "percent-encoding", - "proc-macro2", - "rustls 0.22.2", + "rustls 0.22.4", "rustls-pemfile 2.1.2", "schemars", "serde", @@ -2105,7 +2069,7 @@ dependencies = [ "tokio", "tokio-rustls 0.25.0", "toml 0.8.12", - "usdt 0.3.5", + "usdt 0.5.0", "uuid 1.8.0", "version_check", "waitgroup", @@ -2113,14 +2077,14 @@ dependencies = [ [[package]] name = "dropshot_endpoint" -version = "0.9.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot?branch=main#29ae98d1f909c6832661408a4c03f929e8afa6e9" +version = "0.10.1-dev" +source = "git+https://github.com/oxidecomputer/dropshot?branch=main#17e8fee4c5753c617b27510e57048710ffd421cd" dependencies = [ "proc-macro2", "quote", "serde", "serde_tokenstream 0.2.0", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -2161,7 +2125,7 @@ dependencies = [ "digest", "elliptic-curve", "rfc6979", - "signature 2.1.0", + "signature 2.2.0", "spki", ] @@ -2176,33 +2140,34 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.1.0", + "signature 2.2.0", ] [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", - "ed25519 2.2.2", + "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2", + "subtle", "zeroize", ] [[package]] name = "either" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "elliptic-curve" @@ -2248,9 +2213,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -2264,7 +2229,7 @@ dependencies = [ "async-trait", "base64 0.22.0", "chrono", - "clap 4.5.4", + "clap", "colored", "dhcproto", "http 0.2.12", @@ -2323,9 +2288,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "is-terminal", "log", @@ -2359,9 +2324,9 @@ dependencies = [ [[package]] name = "error-code" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "281e452d3bad4005426416cdba5ccfd4f5c1280e10099e21db27f7c1c28347fc" +checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" [[package]] name = "escape8259" @@ -2389,11 +2354,22 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fancy-regex" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" +dependencies = [ + "bit-set", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fatfs" @@ -2430,9 +2406,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.1" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" +checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" [[package]] name = "filetime" @@ -2446,6 +2422,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + [[package]] name = "fixedbitset" version = "0.4.2" @@ -2454,9 +2436,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flagset" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda653ca797810c02f7ca4b804b40b8b95ae046eb989d356bce17919a8c25499" +checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" [[package]] name = "flate2" @@ -2522,7 +2504,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -2633,7 +2615,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -2650,9 +2632,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" @@ -2686,7 +2668,7 @@ name = "gateway-cli" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.5.4", + "clap", "futures", "gateway-client", "gateway-messages", @@ -2733,7 +2715,7 @@ dependencies = [ "serde_repr", "smoltcp 0.9.1", "static_assertions", - "strum_macros 0.25.2", + "strum_macros 0.25.3", "uuid 1.8.0", "zerocopy 0.6.6", ] @@ -2828,9 +2810,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "js-sys", @@ -2841,9 +2823,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -2851,9 +2833,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -2863,15 +2845,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", - "bstr 1.9.0", - "fnv", + "bstr 1.9.1", "log", - "regex", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -2918,7 +2900,7 @@ dependencies = [ "semver 1.0.22", "serde", "serde_json", - "smallvec 1.13.1", + "smallvec 1.13.2", "static_assertions", "target-spec", ] @@ -2950,9 +2932,9 @@ dependencies = [ [[package]] name = "half" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -3027,9 +3009,9 @@ dependencies = [ [[package]] name = "heapless" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" dependencies = [ "atomic-polyfill", "hash32 0.2.1", @@ -3080,9 +3062,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -3125,11 +3107,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3143,6 +3125,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "hostname" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" +dependencies = [ + "cfg-if", + "libc", + "windows", +] + [[package]] name = "http" version = "0.2.12" @@ -3156,9 +3149,9 @@ dependencies = [ [[package]] name = "http" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -3167,9 +3160,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http 0.2.12", @@ -3183,7 +3176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http 1.0.0", + "http 1.1.0", ] [[package]] @@ -3229,7 +3222,7 @@ dependencies = [ [[package]] name = "hubpack" version = "0.1.0" -source = "git+https://github.com/cbiffle/hubpack?rev=df08cc3a6e1f97381cd0472ae348e310f0119e25#df08cc3a6e1f97381cd0472ae348e310f0119e25" +source = "git+https://github.com/cbiffle/hubpack.git?rev=df08cc3a6e1f97381cd0472ae348e310f0119e25#df08cc3a6e1f97381cd0472ae348e310f0119e25" dependencies = [ "hubpack_derive 0.1.0", "serde", @@ -3248,7 +3241,7 @@ dependencies = [ [[package]] name = "hubpack_derive" version = "0.1.0" -source = "git+https://github.com/cbiffle/hubpack?rev=df08cc3a6e1f97381cd0472ae348e310f0119e25#df08cc3a6e1f97381cd0472ae348e310f0119e25" +source = "git+https://github.com/cbiffle/hubpack.git?rev=df08cc3a6e1f97381cd0472ae348e310f0119e25#df08cc3a6e1f97381cd0472ae348e310f0119e25" dependencies = [ "proc-macro2", "quote", @@ -3268,16 +3261,17 @@ dependencies = [ [[package]] name = "hubtools" -version = "0.4.1" -source = "git+https://github.com/oxidecomputer/hubtools.git?branch=main#73cd5a84689d59ecce9da66ad4389c540d315168" +version = "0.4.6" +source = "git+https://github.com/oxidecomputer/hubtools.git?branch=main#943c4bbe6b50d1ab635d085d6204895fb4154e79" dependencies = [ + "hex", "lpc55_areas", "lpc55_sign", "object 0.30.4", "path-slash", "rsa", "thiserror", - "tlvc 0.3.1 (git+https://github.com/oxidecomputer/tlvc.git)", + "tlvc 0.3.1 (git+https://github.com/oxidecomputer/tlvc)", "tlvc-text", "toml 0.7.8", "x509-cert", @@ -3303,7 +3297,7 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body 0.4.5", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -3317,18 +3311,19 @@ dependencies = [ [[package]] name = "hyper" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.0.0", + "http 1.1.0", "http-body 1.0.0", "httparse", "itoa", "pin-project-lite", + "smallvec 1.13.2", "tokio", "want", ] @@ -3342,7 +3337,7 @@ dependencies = [ "futures-util", "http 0.2.12", "hyper 0.14.28", - "rustls 0.21.9", + "rustls 0.21.11", "tokio", "tokio-rustls 0.24.1", ] @@ -3354,11 +3349,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", - "http 1.0.0", - "hyper 1.1.0", + "http 1.1.0", + "hyper 1.3.1", "hyper-util", "log", - "rustls 0.22.2", + "rustls 0.22.4", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -3400,16 +3395,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdea9aac0dbe5a9240d68cfd9501e2db94222c6dc06843e06640b9e07f0fdc67" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.0.0", + "http 1.1.0", "http-body 1.0.0", - "hyper 1.1.0", + "hyper 1.3.1", "pin-project-lite", "socket2 0.5.6", "tokio", @@ -3420,16 +3415,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -3491,7 +3486,7 @@ dependencies = [ [[package]] name = "illumos-sys-hdrs" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" +source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" [[package]] name = "illumos-utils" @@ -3584,9 +3579,9 @@ checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" [[package]] name = "indoc" -version = "2.0.3" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c785eefb63ebd0e33416dfcb8d6da0bf27ce752843a45632a67bf10d4d4b5c4" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "inout" @@ -3608,7 +3603,7 @@ dependencies = [ "bytes", "camino", "cancel-safe-futures", - "clap 4.5.4", + "clap", "display-error-chain", "futures", "hex", @@ -3669,7 +3664,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "clap 4.5.4", + "clap", "dropshot", "expectorate", "hyper 0.14.28", @@ -3750,7 +3745,7 @@ name = "internal-dns-cli" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.5.4", + "clap", "dropshot", "internal-dns", "omicron-common", @@ -3812,13 +3807,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.2", - "rustix", - "windows-sys 0.48.0", + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -3855,24 +3850,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -3896,10 +3891,10 @@ dependencies = [ [[package]] name = "kstat-macro" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" +source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" dependencies = [ "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -3991,7 +3986,7 @@ dependencies = [ "anstyle", "anyhow", "camino", - "clap 4.5.4", + "clap", "colored", "futures", "libc", @@ -4020,24 +4015,24 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "winapi", + "windows-targets 0.52.5", ] [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libnet" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/netadm-sys?branch=main#d44d9e084f39e844f8083d4d9b39a331061ebbcc" +source = "git+https://github.com/oxidecomputer/netadm-sys?branch=main#1d75565d35765c57dcf1c1a34b56cf5024086fba" dependencies = [ "anyhow", "cfg-if", @@ -4048,7 +4043,7 @@ dependencies = [ "nvpair", "nvpair-sys", "rusty-doors", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tracing", ] @@ -4056,7 +4051,7 @@ dependencies = [ [[package]] name = "libnet" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/netadm-sys#f114bd0d543d886cd453932e9f0967de57289bc2" +source = "git+https://github.com/oxidecomputer/netadm-sys#1d75565d35765c57dcf1c1a34b56cf5024086fba" dependencies = [ "anyhow", "cfg-if", @@ -4067,7 +4062,7 @@ dependencies = [ "nvpair", "nvpair-sys", "rusty-doors", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tracing", ] @@ -4086,6 +4081,16 @@ name = "libnvme-sys" version = "0.0.0" source = "git+https://github.com/oxidecomputer/libnvme?rev=6fffcc81d2c423ed2d2e6c5c2827485554c4ecbe#6fffcc81d2c423ed2d2e6c5c2827485554c4ecbe" +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + [[package]] name = "libsw" version = "3.3.1" @@ -4101,7 +4106,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fefdf21230d6143476a28adbee3d930e2b68a3d56443c777cae3fe9340eebff9" dependencies = [ - "clap 4.5.4", + "clap", "escape8259", "termcolor", "threadpool", @@ -4138,9 +4143,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -4154,25 +4159,25 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lpc55_areas" -version = "0.2.4" -source = "git+https://github.com/oxidecomputer/lpc55_support#96f064eaae5e95930efaab6c29fd1b2e22225dac" +version = "0.2.5" +source = "git+https://github.com/oxidecomputer/lpc55_support#131520fc913ecce9b80557e854751953f743a7d2" dependencies = [ "bitfield", - "clap 4.5.4", + "clap", "packed_struct", "serde", ] [[package]] name = "lpc55_sign" -version = "0.3.3" -source = "git+https://github.com/oxidecomputer/lpc55_support#96f064eaae5e95930efaab6c29fd1b2e22225dac" +version = "0.3.4" +source = "git+https://github.com/oxidecomputer/lpc55_support#131520fc913ecce9b80557e854751953f743a7d2" dependencies = [ "byteorder", "const-oid", "crc-any", "der", - "env_logger 0.10.0", + "env_logger 0.10.2", "hex", "log", "lpc55_areas", @@ -4190,9 +4195,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ "hashbrown 0.14.3", ] @@ -4247,10 +4252,11 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest", ] @@ -4262,9 +4268,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memmap" @@ -4278,9 +4284,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.7.1" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -4334,9 +4340,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -4377,7 +4383,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -4389,7 +4395,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.0.0", + "http 1.1.0", "httparse", "log", "memchr", @@ -4413,7 +4419,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -4442,9 +4448,9 @@ checksum = "ca2b420f638f07fe83056b55ea190bb815f609ec5a35e7017884a10f78839c9e" [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "newline-converter" @@ -4457,9 +4463,9 @@ dependencies = [ [[package]] name = "newtype-uuid" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5ff2b31594942586c1520da8f1e5c705729ec67b3c2ad0fe459f0b576e4d9a" +checksum = "3526cb7c660872e401beaf3297f95f548ce3b4b4bdd8121b7c0713771d7c4a6e" dependencies = [ "schemars", "serde", @@ -4620,7 +4626,7 @@ dependencies = [ "rcgen", "ref-cast", "regex", - "rustls 0.22.2", + "rustls 0.22.4", "samael", "schemars", "semver 1.0.22", @@ -4690,7 +4696,7 @@ dependencies = [ "omicron-workspace-hack", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -4878,7 +4884,7 @@ version = "0.1.0" dependencies = [ "omicron-workspace-hack", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -4919,7 +4925,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" dependencies = [ - "smallvec 1.13.1", + "smallvec 1.13.2", ] [[package]] @@ -4941,7 +4947,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "cfg_aliases", "libc", @@ -4980,9 +4986,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" dependencies = [ "num-complex", "num-integer", @@ -5017,15 +5023,15 @@ dependencies = [ "num-traits", "rand 0.8.5", "serde", - "smallvec 1.13.1", + "smallvec 1.13.2", "zeroize", ] [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ "num-traits", ] @@ -5038,13 +5044,13 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-derive" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5094,7 +5100,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.9", "libc", ] @@ -5121,9 +5127,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] @@ -5163,9 +5169,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -5274,7 +5280,7 @@ dependencies = [ "anyhow", "camino", "camino-tempfile", - "clap 4.5.4", + "clap", "dropshot", "expectorate", "futures", @@ -5308,7 +5314,7 @@ dependencies = [ "anyhow", "base64 0.22.0", "camino", - "clap 4.5.4", + "clap", "dropshot", "expectorate", "futures", @@ -5359,7 +5365,7 @@ dependencies = [ "camino-tempfile", "cancel-safe-futures", "chrono", - "clap 4.5.4", + "clap", "criterion", "crucible-agent-client", "crucible-pantry-client", @@ -5434,7 +5440,7 @@ dependencies = [ "regex", "reqwest", "ring 0.17.8", - "rustls 0.22.2", + "rustls 0.22.4", "rustls-pemfile 2.1.2", "samael", "schemars", @@ -5476,7 +5482,7 @@ dependencies = [ "camino", "camino-tempfile", "chrono", - "clap 4.5.4", + "clap", "crossterm", "crucible-agent-client", "csv", @@ -5517,7 +5523,7 @@ dependencies = [ "strum", "subprocess", "tabled", - "textwrap 0.16.1", + "textwrap", "tokio", "unicode-width", "uuid 1.8.0", @@ -5529,7 +5535,7 @@ version = "0.1.0" dependencies = [ "anyhow", "camino", - "clap 4.5.4", + "clap", "expectorate", "futures", "hex", @@ -5596,7 +5602,7 @@ dependencies = [ "cancel-safe-futures", "cfg-if", "chrono", - "clap 4.5.4", + "clap", "crucible-agent-client", "derive_more", "display-error-chain", @@ -5702,7 +5708,7 @@ dependencies = [ "regex", "reqwest", "ring 0.17.8", - "rustls 0.22.2", + "rustls 0.22.4", "slog", "subprocess", "tar", @@ -5735,14 +5741,14 @@ dependencies = [ "bit-set", "bit-vec", "bitflags 1.3.2", - "bitflags 2.4.2", + "bitflags 2.5.0", "bstr 0.2.17", - "bstr 1.9.0", + "bstr 1.9.1", "byteorder", "bytes", "chrono", "cipher", - "clap 4.5.4", + "clap", "clap_builder", "console", "const-oid", @@ -5767,7 +5773,7 @@ dependencies = [ "futures-util", "gateway-messages", "generic-array", - "getrandom 0.2.12", + "getrandom 0.2.14", "group", "hashbrown 0.14.3", "hex", @@ -5801,8 +5807,8 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "regex", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", "reqwest", "ring 0.17.8", "rustix", @@ -5817,7 +5823,7 @@ dependencies = [ "string_cache", "subtle", "syn 1.0.109", - "syn 2.0.58", + "syn 2.0.60", "time", "time-macros", "tokio", @@ -5827,7 +5833,7 @@ dependencies = [ "toml 0.7.8", "toml_datetime", "toml_edit 0.19.15", - "toml_edit 0.22.9", + "toml_edit 0.22.12", "tracing", "trust-dns-proto", "unicode-bidi", @@ -5887,9 +5893,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openapi-lint" @@ -5920,7 +5926,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -5937,7 +5943,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5961,7 +5967,7 @@ dependencies = [ [[package]] name = "opte" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" +source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" dependencies = [ "cfg-if", "derror-macro", @@ -5979,7 +5985,7 @@ dependencies = [ [[package]] name = "opte-api" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" +source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" dependencies = [ "illumos-sys-hdrs", "ipnetwork", @@ -5991,7 +5997,7 @@ dependencies = [ [[package]] name = "opte-ioctl" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" +source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" dependencies = [ "libc", "libnet 0.1.0 (git+https://github.com/oxidecomputer/netadm-sys)", @@ -6065,7 +6071,7 @@ dependencies = [ [[package]] name = "oxide-vpc" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?branch=add-apis-for-rpw#866b7a5e0dbb1e028dd0020e756a35d8cec828e1" +source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" dependencies = [ "cfg-if", "illumos-sys-hdrs", @@ -6121,7 +6127,7 @@ dependencies = [ "anyhow", "camino", "chrono", - "clap 4.5.4", + "clap", "dropshot", "expectorate", "futures", @@ -6165,7 +6171,7 @@ dependencies = [ "bytes", "camino", "chrono", - "clap 4.5.4", + "clap", "crossterm", "dropshot", "expectorate", @@ -6229,7 +6235,7 @@ dependencies = [ "omicron-workspace-hack", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -6238,7 +6244,7 @@ version = "0.1.0" dependencies = [ "anyhow", "chrono", - "clap 4.5.4", + "clap", "dropshot", "nexus-client", "omicron-common", @@ -6260,7 +6266,7 @@ dependencies = [ "anyhow", "camino", "chrono", - "clap 4.5.4", + "clap", "omicron-workspace-hack", "sigpipe", "uuid 1.8.0", @@ -6343,7 +6349,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -6356,20 +6362,20 @@ dependencies = [ "instant", "libc", "redox_syscall 0.2.16", - "smallvec 1.13.1", + "smallvec 1.13.2", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "smallvec 1.13.1", + "redox_syscall 0.4.1", + "smallvec 1.13.2", "windows-targets 0.48.5", ] @@ -6381,7 +6387,7 @@ checksum = "06af5f9333eb47bd9ba8462d612e37a8328a5cb80b13f0af4de4c3b89f52dee5" dependencies = [ "parse-display-derive", "regex", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -6393,9 +6399,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", "structmeta 0.3.0", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -6480,12 +6486,6 @@ dependencies = [ "digest", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "peg" version = "0.8.2" @@ -6540,9 +6540,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ "memchr", "thiserror", @@ -6551,9 +6551,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" +checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" dependencies = [ "pest", "pest_generator", @@ -6561,22 +6561,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" +checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "pest_meta" -version = "2.7.6" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" +checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", @@ -6624,29 +6624,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -6677,9 +6677,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plain" @@ -6689,9 +6689,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "platforms" -version = "3.0.2" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "plotters" @@ -6750,9 +6750,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -6767,9 +6767,9 @@ source = "git+https://github.com/oxidecomputer/poptrie?branch=multipath#ca52bef3 [[package]] name = "portable-atomic" -version = "1.4.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "portpicker" @@ -6904,12 +6904,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" +checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" dependencies = [ "proc-macro2", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -6957,9 +6957,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -6967,7 +6967,7 @@ dependencies = [ [[package]] name = "progenitor" version = "0.6.0" -source = "git+https://github.com/oxidecomputer/progenitor?branch=main#90d3282f488a17f9c85e25c26845fef2d92af435" +source = "git+https://github.com/oxidecomputer/progenitor?branch=main#b0fdd988378204813b104ab5aadc0d4b92b41381" dependencies = [ "progenitor-client", "progenitor-impl", @@ -6978,7 +6978,7 @@ dependencies = [ [[package]] name = "progenitor-client" version = "0.6.0" -source = "git+https://github.com/oxidecomputer/progenitor?branch=main#90d3282f488a17f9c85e25c26845fef2d92af435" +source = "git+https://github.com/oxidecomputer/progenitor?branch=main#b0fdd988378204813b104ab5aadc0d4b92b41381" dependencies = [ "bytes", "futures-core", @@ -6992,10 +6992,10 @@ dependencies = [ [[package]] name = "progenitor-impl" version = "0.6.0" -source = "git+https://github.com/oxidecomputer/progenitor?branch=main#90d3282f488a17f9c85e25c26845fef2d92af435" +source = "git+https://github.com/oxidecomputer/progenitor?branch=main#b0fdd988378204813b104ab5aadc0d4b92b41381" dependencies = [ "getopts", - "heck 0.4.1", + "heck 0.5.0", "http 0.2.12", "indexmap 2.2.6", "openapiv3", @@ -7005,7 +7005,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "syn 2.0.58", + "syn 2.0.60", "thiserror", "typify", "unicode-ident", @@ -7014,7 +7014,7 @@ dependencies = [ [[package]] name = "progenitor-macro" version = "0.6.0" -source = "git+https://github.com/oxidecomputer/progenitor?branch=main#90d3282f488a17f9c85e25c26845fef2d92af435" +source = "git+https://github.com/oxidecomputer/progenitor?branch=main#b0fdd988378204813b104ab5aadc0d4b92b41381" dependencies = [ "openapiv3", "proc-macro2", @@ -7025,7 +7025,7 @@ dependencies = [ "serde_json", "serde_tokenstream 0.2.0", "serde_yaml", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -7035,7 +7035,7 @@ source = "git+https://github.com/oxidecomputer/propolis?rev=6dceb9ef69c217cb78a2 dependencies = [ "anyhow", "bhyve_api 0.0.0 (git+https://github.com/oxidecomputer/propolis?rev=6dceb9ef69c217cb78a2018bbedafbc19f6ec1af)", - "bitflags 2.4.2", + "bitflags 2.5.0", "bitstruct", "byteorder", "dladm", @@ -7108,7 +7108,7 @@ dependencies = [ "anyhow", "atty", "base64 0.21.7", - "clap 4.5.4", + "clap", "dropshot", "futures", "hyper 0.14.28", @@ -7168,13 +7168,13 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.5.0", "lazy_static", "num-traits", "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", "rusty-fork", "tempfile", "unarray", @@ -7307,7 +7307,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -7339,15 +7339,15 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcb12f8fbf6c62614b0d56eb352af54f6a22410c3b079eb53ee93c7b97dd31d8" +checksum = "a564a852040e82671dc50a37d88f3aa83bbc690dfc6844cfe7a2591620206a80" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cassowary", "compact_str", "crossterm", - "indoc 2.0.3", + "indoc 2.0.5", "itertools 0.12.1", "lru", "paste", @@ -7397,7 +7397,7 @@ dependencies = [ "assert_matches", "camino", "camino-tempfile", - "clap 4.5.4", + "clap", "dns-service-client", "dropshot", "expectorate", @@ -7439,15 +7439,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -7459,12 +7450,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.12", - "redox_syscall 0.2.16", + "getrandom 0.2.14", + "libredox", "thiserror", ] @@ -7482,7 +7473,7 @@ dependencies = [ "serde", "strip-ansi-escapes", "strum", - "strum_macros 0.26.1", + "strum_macros 0.26.2", "thiserror", "unicode-segmentation", "unicode-width", @@ -7490,22 +7481,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -7516,8 +7507,8 @@ checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -7528,13 +7519,13 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -7545,9 +7536,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "regress" @@ -7561,15 +7552,15 @@ dependencies = [ [[package]] name = "relative-path" -version = "1.9.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" +checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", @@ -7580,7 +7571,7 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body 0.4.5", + "http-body 0.4.6", "hyper 0.14.28", "hyper-rustls 0.24.2", "hyper-tls", @@ -7592,8 +7583,8 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.9", - "rustls-pemfile 1.0.3", + "rustls 0.21.11", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", @@ -7619,7 +7610,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" dependencies = [ - "hostname", + "hostname 0.3.1", "quick-error", ] @@ -7671,7 +7662,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.14", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7696,7 +7687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "serde", "serde_derive", ] @@ -7714,23 +7705,21 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.2" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" dependencies = [ - "byteorder", "const-oid", "digest", "num-bigint-dig", "num-integer", - "num-iter", "num-traits", "pkcs1", "pkcs8", "rand_core 0.6.4", "serde", "sha2", - "signature 2.1.0", + "signature 2.2.0", "spki", "subtle", "zeroize", @@ -7761,18 +7750,18 @@ dependencies = [ "regex", "relative-path", "rustc_version 0.4.0", - "syn 2.0.58", + "syn 2.0.60", "unicode-ident", ] [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -7784,7 +7773,7 @@ dependencies = [ "aes", "aes-gcm", "async-trait", - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "chacha20", "ctr", @@ -7812,9 +7801,9 @@ dependencies = [ [[package]] name = "russh-cryptovec" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fdf036c2216b554053d19d4af45c1722d13b00ac494ea19825daf4beac034e" +checksum = "2b077b6dd8d8c085dac62f7fcc5a83df60c7f7a22d49bfba994f2f4dbf60bc74" dependencies = [ "libc", "winapi", @@ -7867,7 +7856,7 @@ checksum = "9d9848531d60c9cbbcf9d166c885316c24bc0e2a9d3eba0956bb6cbbd79bc6e8" dependencies = [ "base64 0.21.7", "blake2b_simd", - "constant_time_eq 0.3.0", + "constant_time_eq", ] [[package]] @@ -7915,11 +7904,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -7928,9 +7917,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", "ring 0.17.8", @@ -7940,14 +7929,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.2" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.1", + "rustls-webpki 0.102.3", "subtle", "zeroize", ] @@ -7967,9 +7956,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.7", ] @@ -7986,9 +7975,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7" +checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" [[package]] name = "rustls-webpki" @@ -8002,9 +7991,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.1" +version = "0.102.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -8013,9 +8002,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "rusty-doors" @@ -8053,7 +8042,7 @@ version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e8936da37efd9b6d4478277f4b2b9bb5cdb37a113e8d63222e58da647e63" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "clipboard-win", "fd-lock", @@ -8071,9 +8060,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "salty" @@ -8124,11 +8113,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -8191,17 +8180,17 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -8229,9 +8218,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -8242,9 +8231,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -8267,9 +8256,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] @@ -8314,13 +8303,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -8345,9 +8334,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", @@ -8375,13 +8364,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.16" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -8413,7 +8402,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -8430,11 +8419,11 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +checksum = "2c85f8e96d1d6857f13768fcbd895fcb06225510022a2774ed8b5150581847b0" dependencies = [ - "base64 0.21.7", + "base64 0.22.0", "chrono", "hex", "indexmap 1.9.3", @@ -8448,21 +8437,21 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" +checksum = "c8b3a576c4eb2924262d5951a3b737ccaf16c931e39a2810c36f9a7e25575557" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ "indexmap 2.2.6", "itoa", @@ -8538,9 +8527,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -8565,9 +8554,9 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", "rand_core 0.6.4", @@ -8584,9 +8573,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" +checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" dependencies = [ "bstr 0.2.17", "unicode-segmentation", @@ -8748,7 +8737,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcaaf6e68789d3f0411f1e72bc443214ef252a1038b6e344836e50442541f190" dependencies = [ - "hostname", + "hostname 0.3.1", "slog", "slog-json", "time", @@ -8799,7 +8788,7 @@ source = "git+https://github.com/oxidecomputer/slog-error-chain?branch=main#15f6 dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -8860,15 +8849,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smawk" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "smf" @@ -8888,7 +8877,7 @@ dependencies = [ "bitflags 1.3.2", "byteorder", "cfg-if", - "heapless 0.7.16", + "heapless 0.7.17", "managed", ] @@ -8926,14 +8915,14 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -8955,7 +8944,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "clap 4.5.4", + "clap", "dropshot", "futures", "gateway-messages", @@ -8989,9 +8978,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -9053,17 +9042,17 @@ checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "stability" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd1b177894da2a2d9120208c3386066af06a488255caabc5de8ddca22dbc3ce" +checksum = "2ff9eaf853dec4c8802325d8b6d3dffa86cc707fd7a1a4cdbf416e13b061787a" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] @@ -9116,10 +9105,11 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -9133,12 +9123,6 @@ dependencies = [ "vte", ] -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" @@ -9147,9 +9131,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "structmeta" @@ -9160,7 +9144,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.2.0", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -9172,7 +9156,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.3.0", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -9183,7 +9167,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -9194,31 +9178,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", -] - -[[package]] -name = "structopt" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" -dependencies = [ - "clap 2.34.0", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" -dependencies = [ - "heck 0.3.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] @@ -9227,7 +9187,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ - "strum_macros 0.26.1", + "strum_macros 0.26.2", ] [[package]] @@ -9245,28 +9205,28 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "strum_macros" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -9313,9 +9273,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.58" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -9419,9 +9379,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "target-spec" @@ -9460,9 +9420,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -9501,16 +9461,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta 0.2.0", - "syn 2.0.58", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", + "syn 2.0.60", ] [[package]] @@ -9526,22 +9477,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -9566,20 +9517,19 @@ dependencies = [ [[package]] name = "thread-id" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79474f573561cdc4871a0de34a51c92f7f5a56039113fbb5b9c9f96bdb756669" +checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" dependencies = [ "libc", - "redox_syscall 0.2.16", "winapi", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -9596,9 +9546,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -9619,9 +9569,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -9661,6 +9611,27 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tls_codec" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e78c9c330f8c85b2bae7c8368f2739157db9991235123aa1b15ef9502bfb6a" +dependencies = [ + "tls_codec_derive", + "zeroize", +] + +[[package]] +name = "tls_codec_derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "tlvc" version = "0.3.1" @@ -9674,7 +9645,7 @@ dependencies = [ [[package]] name = "tlvc" version = "0.3.1" -source = "git+https://github.com/oxidecomputer/tlvc.git#e644a21a7ca973ed31499106ea926bd63ebccc6f" +source = "git+https://github.com/oxidecomputer/tlvc#e644a21a7ca973ed31499106ea926bd63ebccc6f" dependencies = [ "byteorder", "crc", @@ -9684,24 +9655,22 @@ dependencies = [ [[package]] name = "tlvc-text" version = "0.3.0" -source = "git+https://github.com/oxidecomputer/tlvc.git#e644a21a7ca973ed31499106ea926bd63ebccc6f" +source = "git+https://github.com/oxidecomputer/tlvc#e644a21a7ca973ed31499106ea926bd63ebccc6f" dependencies = [ "ron 0.8.1", "serde", - "tlvc 0.3.1 (git+https://github.com/oxidecomputer/tlvc.git)", + "tlvc 0.3.1 (git+https://github.com/oxidecomputer/tlvc)", "zerocopy 0.6.6", ] [[package]] name = "tofino" version = "0.1.0" -source = "git+http://github.com/oxidecomputer/tofino?branch=main#8283f8021068f055484b653f0cc6b4d5c0979dc1" +source = "git+http://github.com/oxidecomputer/tofino?branch=main#1b66b89c3727d2191082df057b068ec52560e334" dependencies = [ "anyhow", "cc", - "chrono", "illumos-devinfo", - "structopt", ] [[package]] @@ -9731,7 +9700,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -9776,7 +9745,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.11", "tokio", ] @@ -9786,7 +9755,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.2", + "rustls 0.22.4", "rustls-pki-types", "tokio", ] @@ -9870,7 +9839,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.9", + "toml_edit 0.22.12", ] [[package]] @@ -9892,20 +9861,20 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.5.15", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.1", + "winnow 0.6.6", ] [[package]] @@ -10009,7 +9978,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -10058,7 +10027,7 @@ dependencies = [ "ipnet", "lazy_static", "rand 0.8.5", - "smallvec 1.13.1", + "smallvec 1.13.2", "thiserror", "tinyvec", "tokio", @@ -10079,7 +10048,7 @@ dependencies = [ "lru-cache", "parking_lot 0.12.1", "resolv-conf", - "smallvec 1.13.1", + "smallvec 1.13.2", "thiserror", "tokio", "tracing", @@ -10110,9 +10079,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" @@ -10137,7 +10106,7 @@ dependencies = [ "assert_cmd", "camino", "chrono", - "clap 4.5.4", + "clap", "console", "datatest-stable", "fs-err", @@ -10230,7 +10199,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.0.0", + "http 1.1.0", "httparse", "log", "rand 0.8.5", @@ -10242,9 +10211,9 @@ dependencies = [ [[package]] name = "typed-path" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a90726108dab678edab76459751e1cc7c597c3484a6384d6423191255fa641b" +checksum = "668404597c2c687647f6f8934f97c280fd500db28557f52b07c56b92d3dc500a" [[package]] name = "typed-rng" @@ -10260,14 +10229,14 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typify" version = "0.0.16" -source = "git+https://github.com/oxidecomputer/typify#c5ebe0a2bf08ad8a743be5b593b1a8526a3fff4a" +source = "git+https://github.com/oxidecomputer/typify#3dc9e213e0488901df42ac3c72e29eb5f05fe38e" dependencies = [ "typify-impl", "typify-macro", @@ -10276,16 +10245,16 @@ dependencies = [ [[package]] name = "typify-impl" version = "0.0.16" -source = "git+https://github.com/oxidecomputer/typify#c5ebe0a2bf08ad8a743be5b593b1a8526a3fff4a" +source = "git+https://github.com/oxidecomputer/typify#3dc9e213e0488901df42ac3c72e29eb5f05fe38e" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "log", "proc-macro2", "quote", "regress", "schemars", "serde_json", - "syn 2.0.58", + "syn 2.0.60", "thiserror", "unicode-ident", ] @@ -10293,7 +10262,7 @@ dependencies = [ [[package]] name = "typify-macro" version = "0.0.16" -source = "git+https://github.com/oxidecomputer/typify#c5ebe0a2bf08ad8a743be5b593b1a8526a3fff4a" +source = "git+https://github.com/oxidecomputer/typify#3dc9e213e0488901df42ac3c72e29eb5f05fe38e" dependencies = [ "proc-macro2", "quote", @@ -10301,7 +10270,7 @@ dependencies = [ "serde", "serde_json", "serde_tokenstream 0.2.0", - "syn 2.0.58", + "syn 2.0.60", "typify-impl", ] @@ -10346,18 +10315,18 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" @@ -10389,9 +10358,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "untrusted" @@ -10414,7 +10383,7 @@ dependencies = [ "camino", "camino-tempfile", "chrono", - "clap 4.5.4", + "clap", "debug-ignore", "display-error-chain", "dropshot", @@ -10445,7 +10414,7 @@ dependencies = [ "camino", "camino-tempfile", "cancel-safe-futures", - "clap 4.5.4", + "clap", "debug-ignore", "derive-where", "either", @@ -10535,7 +10504,7 @@ dependencies = [ "proc-macro2", "quote", "serde_tokenstream 0.2.0", - "syn 2.0.58", + "syn 2.0.60", "usdt-impl 0.5.0", ] @@ -10573,7 +10542,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.58", + "syn 2.0.60", "thiserror", "thread-id", "version_check", @@ -10603,7 +10572,7 @@ dependencies = [ "proc-macro2", "quote", "serde_tokenstream 0.2.0", - "syn 2.0.58", + "syn 2.0.60", "usdt-impl 0.5.0", ] @@ -10631,7 +10600,7 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", "serde", ] @@ -10641,12 +10610,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -10672,9 +10635,9 @@ dependencies = [ [[package]] name = "vsss-rs" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196bbee60607a195bc850e94f0e040bd090e45794ad8df0e9c5a422b9975a00f" +checksum = "14d9b5a415d1bbbf1a9c5982babc0d8054fa10effe9c5b7086cd2fdd36be79d9" dependencies = [ "curve25519-dalek", "elliptic-curve", @@ -10765,9 +10728,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -10775,24 +10738,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -10802,9 +10765,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -10812,22 +10775,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-streams" @@ -10844,9 +10807,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -10854,19 +10817,20 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix", ] [[package]] @@ -10889,7 +10853,7 @@ dependencies = [ "buf-list", "camino", "ciborium", - "clap 4.5.4", + "clap", "crossterm", "futures", "humantime", @@ -10914,11 +10878,11 @@ dependencies = [ "slog-term", "supports-color", "tempfile", - "textwrap 0.16.1", + "textwrap", "tokio", "tokio-util", "toml 0.8.12", - "toml_edit 0.22.9", + "toml_edit 0.22.12", "tui-tree-widget", "unicode-width", "update-engine", @@ -10950,7 +10914,7 @@ dependencies = [ "bytes", "camino", "ciborium", - "clap 4.5.4", + "clap", "crossterm", "omicron-workspace-hack", "reedline", @@ -10975,7 +10939,7 @@ dependencies = [ "bytes", "camino", "camino-tempfile", - "clap 4.5.4", + "clap", "debug-ignore", "display-error-chain", "dpd-client", @@ -11060,9 +11024,9 @@ dependencies = [ [[package]] name = "widestring" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -11082,11 +11046,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -11097,11 +11061,21 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-targets 0.48.5", + "windows-core", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", ] [[package]] @@ -11119,7 +11093,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -11139,17 +11113,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -11160,9 +11135,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -11172,9 +11147,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -11184,9 +11159,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -11196,9 +11177,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -11208,9 +11189,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -11220,9 +11201,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -11232,24 +11213,24 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] [[package]] name = "winnow" -version = "0.6.1" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401" +checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" dependencies = [ "memchr", ] @@ -11275,22 +11256,25 @@ dependencies = [ [[package]] name = "x509-cert" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25eefca1d99701da3a57feb07e5079fc62abba059fc139e98c13bbb250f3ef29" +checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" dependencies = [ "const-oid", "der", "spki", + "tls_codec", ] [[package]] name = "xattr" -version = "1.0.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", + "linux-raw-sys", + "rustix", ] [[package]] @@ -11301,7 +11285,7 @@ dependencies = [ "camino", "cargo_metadata", "cargo_toml", - "clap 4.5.4", + "clap", "fs-err", "macaddr", "serde", @@ -11328,9 +11312,9 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6580539ad917b7c026220c4b3f2c08d52ce54d6ce0dc491e66002e35388fab46" +checksum = "da091bab2bd35db397c46f5b81748b56f28f8fda837087fab9b6b07b6d66e3f1" dependencies = [ "byteorder", "zerocopy-derive 0.2.0", @@ -11375,7 +11359,7 @@ checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -11386,7 +11370,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -11406,7 +11390,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -11449,7 +11433,7 @@ name = "zone-network-setup" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.5.4", + "clap", "dropshot", "illumos-utils", "omicron-common", diff --git a/Cargo.toml b/Cargo.toml index 81b6e89268..059597cdcf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -305,18 +305,14 @@ omicron-sled-agent = { path = "sled-agent" } omicron-test-utils = { path = "test-utils" } omicron-zone-package = "0.11.0" oxide-client = { path = "clients/oxide-client" } -# TODO: levon - point back to main -# oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce", features = [ "api", "std" ] } -oxide-vpc = { git = "https://github.com/oxidecomputer/opte", branch = "add-apis-for-rpw", features = ["api", "std"] } +oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "4cc823b50d3e4a629cdfaab2b3d3382514174ba9", features = [ "api", "std" ] } once_cell = "1.19.0" openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" } openapiv3 = "2.0.0" # must match samael's crate! openssl = "0.10" openssl-sys = "0.9" -# TODO: levon - point back to main -# opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "7ee353a470ea59529ee1b34729681da887aa88ce" } -opte-ioctl = { git = "https://github.com/oxidecomputer/opte", branch = "add-apis-for-rpw" } +opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "4cc823b50d3e4a629cdfaab2b3d3382514174ba9" } oso = "0.27" owo-colors = "4.0.0" oximeter = { path = "oximeter/oximeter" } diff --git a/clients/sled-agent-client/src/lib.rs b/clients/sled-agent-client/src/lib.rs index a9cabe897f..de5c5294e1 100644 --- a/clients/sled-agent-client/src/lib.rs +++ b/clients/sled-agent-client/src/lib.rs @@ -14,7 +14,7 @@ use std::net::IpAddr; use std::net::SocketAddr; use types::{ BfdPeerConfig, BgpConfig, BgpPeerConfig, PortConfigV1, RouteConfig, - SetVirtualNetworkInterfaceHost, + VirtualNetworkInterfaceHost, }; use uuid::Uuid; @@ -718,9 +718,9 @@ impl Hash for BfdPeerConfig { } } -impl Eq for SetVirtualNetworkInterfaceHost {} +impl Eq for VirtualNetworkInterfaceHost {} -impl Hash for SetVirtualNetworkInterfaceHost { +impl Hash for VirtualNetworkInterfaceHost { fn hash(&self, state: &mut H) { self.physical_host_ip.hash(state); self.virtual_ip.hash(state); diff --git a/illumos-utils/src/opte/params.rs b/illumos-utils/src/opte/params.rs index df1f33cb92..d772deefd1 100644 --- a/illumos-utils/src/opte/params.rs +++ b/illumos-utils/src/opte/params.rs @@ -32,25 +32,13 @@ pub struct VpcFirewallRule { /// A mapping from a virtual NIC to a physical host #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] -pub struct SetVirtualNetworkInterfaceHost { +pub struct VirtualNetworkInterfaceHost { pub virtual_ip: IpAddr, pub virtual_mac: external::MacAddr, pub physical_host_ip: Ipv6Addr, pub vni: external::Vni, } -/// The data needed to identify a virtual IP for which a sled maintains an OPTE -/// virtual-to-physical mapping such that that mapping can be deleted. -#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] -pub struct DeleteVirtualNetworkInterfaceHost { - /// The virtual IP whose mapping should be deleted. - pub virtual_ip: IpAddr, - - /// The VNI for the network containing the virtual IP whose mapping should - /// be deleted. - pub vni: external::Vni, -} - /// DHCP configuration for a port /// /// Not present here: Hostname (DHCPv4 option 12; used in DHCPv6 option 39); we diff --git a/illumos-utils/src/opte/port_manager.rs b/illumos-utils/src/opte/port_manager.rs index f2708041e0..4b3e5dfe56 100644 --- a/illumos-utils/src/opte/port_manager.rs +++ b/illumos-utils/src/opte/port_manager.rs @@ -5,8 +5,7 @@ //! Manager for all OPTE ports on a Helios system use crate::opte::opte_firewall_rules; -use crate::opte::params::DeleteVirtualNetworkInterfaceHost; -use crate::opte::params::SetVirtualNetworkInterfaceHost; +use crate::opte::params::VirtualNetworkInterfaceHost; use crate::opte::params::VpcFirewallRule; use crate::opte::Error; use crate::opte::Gateway; @@ -573,7 +572,7 @@ impl PortManager { #[cfg(target_os = "illumos")] pub fn list_virtual_nics( &self, - ) -> Result, Error> { + ) -> Result, Error> { use macaddr::MacAddr6; use opte_ioctl::OpteHdl; @@ -584,7 +583,7 @@ impl PortManager { for mapping in v2p.mappings { for entry in mapping.ip4 { - mappings.push(SetVirtualNetworkInterfaceHost { + mappings.push(VirtualNetworkInterfaceHost { virtual_ip: IpAddr::V4(entry.0.into()), virtual_mac: MacAddr6::from(entry.1.ether.bytes()).into(), physical_host_ip: entry.1.ip.into(), @@ -597,7 +596,7 @@ impl PortManager { } for entry in mapping.ip6 { - mappings.push(SetVirtualNetworkInterfaceHost { + mappings.push(VirtualNetworkInterfaceHost { virtual_ip: IpAddr::V6(entry.0.into()), virtual_mac: MacAddr6::from(entry.1.ether.bytes()).into(), physical_host_ip: entry.1.ip.into(), @@ -616,7 +615,7 @@ impl PortManager { #[cfg(not(target_os = "illumos"))] pub fn list_virtual_nics( &self, - ) -> Result, Error> { + ) -> Result, Error> { info!( self.inner.log, "Listing virtual nics (ignored)"; @@ -627,7 +626,7 @@ impl PortManager { #[cfg(target_os = "illumos")] pub fn set_virtual_nic_host( &self, - mapping: &SetVirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { use opte_ioctl::OpteHdl; @@ -654,7 +653,7 @@ impl PortManager { #[cfg(not(target_os = "illumos"))] pub fn set_virtual_nic_host( &self, - mapping: &SetVirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { info!( self.inner.log, @@ -667,18 +666,35 @@ impl PortManager { #[cfg(target_os = "illumos")] pub fn unset_virtual_nic_host( &self, - _mapping: &DeleteVirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { - // TODO requires https://github.com/oxidecomputer/opte/issues/332 + use opte_ioctl::OpteHdl; + + info!( + self.inner.log, + "Clearing mapping of virtual NIC to physical host"; + "mapping" => ?&mapping, + ); + + let hdl = OpteHdl::open(OpteHdl::XDE_CTL)?; + hdl.clear_v2p(&oxide_vpc::api::ClearVirt2PhysReq { + vip: mapping.virtual_ip.into(), + phys: oxide_vpc::api::PhysNet { + ether: oxide_vpc::api::MacAddr::from( + (*mapping.virtual_mac).into_array(), + ), + ip: mapping.physical_host_ip.into(), + vni: Vni::new(mapping.vni).unwrap(), + }, + })?; - slog::warn!(self.inner.log, "unset_virtual_nic_host unimplmented"); Ok(()) } #[cfg(not(target_os = "illumos"))] pub fn unset_virtual_nic_host( &self, - _mapping: &DeleteVirtualNetworkInterfaceHost, + _mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { info!(self.inner.log, "Ignoring unset of virtual NIC mapping"); Ok(()) diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs index b0ace7e8e5..2613f1972d 100644 --- a/nexus/src/app/background/v2p_mappings.rs +++ b/nexus/src/app/background/v2p_mappings.rs @@ -8,10 +8,7 @@ use nexus_networking::sled_client_from_address; use nexus_types::{external_api::views::SledPolicy, identity::Asset}; use omicron_common::api::external::Vni; use serde_json::json; -use sled_agent_client::types::{ - DeleteVirtualNetworkInterfaceHost, SetVirtualNetworkInterfaceHost, -}; -use uuid::Uuid; +use sled_agent_client::types::VirtualNetworkInterfaceHost; use super::common::BackgroundTask; @@ -90,11 +87,7 @@ impl BackgroundTask for V2PManager { let vni = mapping.vni.0; - // TODO: after looking at the sled-agent side of things, we may not need nic_id? - // the nic_id path parameter is not used in sled_agent - let _nic_id = mapping.nic_id; - - let mapping = SetVirtualNetworkInterfaceHost { + let mapping = VirtualNetworkInterfaceHost { virtual_ip: mapping.ip.ip(), virtual_mac: *mapping.mac, physical_host_ip, @@ -107,7 +100,7 @@ impl BackgroundTask for V2PManager { for (sled, client) in sled_clients { // Get the current mappings on each sled // Ignore vopte interfaces that are used for services - let found_v2p: HashSet = match client.list_v2p().await { + let found_v2p: HashSet = match client.list_v2p().await { Ok(v) => v.into_inner(), Err(e) => { error!( @@ -124,16 +117,11 @@ impl BackgroundTask for V2PManager { let v2p_to_add: Vec<_> = desired_v2p.difference(&found_v2p).collect(); - let v2p_to_del: Vec<_> = found_v2p - .difference(&desired_v2p) - .map(|mapping| DeleteVirtualNetworkInterfaceHost{ - virtual_ip: mapping.virtual_ip, - vni: mapping.vni, - }).collect(); + let v2p_to_del: Vec<_> = found_v2p.difference(&desired_v2p).collect(); info!(&log, "v2p mappings to delete"; "sled" => sled.serial_number(), "mappings" => ?v2p_to_del); for mapping in v2p_to_del { - if let Err(e) = client.del_v2p(&Uuid::default(), &mapping).await { + if let Err(e) = client.del_v2p(&mapping).await { error!( &log, "failed to delete v2p mapping from sled"; @@ -146,7 +134,7 @@ impl BackgroundTask for V2PManager { info!(&log, "v2p mappings to add"; "sled" => sled.serial_number(), "mappings" => ?v2p_to_add); for mapping in v2p_to_add { - if let Err(e) = client.set_v2p(&Uuid::default(), mapping).await { + if let Err(e) = client.set_v2p(mapping).await { error!( &log, "failed to add v2p mapping to sled"; diff --git a/nexus/src/app/instance_network.rs b/nexus/src/app/instance_network.rs index c345809f4d..c91cf60def 100644 --- a/nexus/src/app/instance_network.rs +++ b/nexus/src/app/instance_network.rs @@ -14,18 +14,13 @@ use nexus_db_model::Vni as DbVni; use nexus_db_queries::authz; use nexus_db_queries::context::OpContext; use nexus_db_queries::db; -use nexus_db_queries::db::identity::Asset; use nexus_db_queries::db::lookup::LookupPath; -use omicron_common::api::external::DataPageParams; use omicron_common::api::external::Error; use omicron_common::api::external::Ipv4Net; use omicron_common::api::external::Ipv6Net; use omicron_common::api::internal::nexus; use omicron_common::api::internal::shared::NetworkInterface; use omicron_common::api::internal::shared::SwitchLocation; -use omicron_common::retry_until_known_result; -use sled_agent_client::types::DeleteVirtualNetworkInterfaceHost; -use sled_agent_client::types::SetVirtualNetworkInterfaceHost; use std::collections::HashSet; use std::str::FromStr; use uuid::Uuid; @@ -52,230 +47,6 @@ impl super::Nexus { Ok(boundary_switches) } - /// Ensures that V2P mappings exist that indicate that the instance with ID - /// `instance_id` is resident on the sled with ID `sled_id`. - pub(crate) async fn create_instance_v2p_mappings( - &self, - opctx: &OpContext, - instance_id: Uuid, - sled_id: Uuid, - ) -> Result<(), Error> { - info!(&self.log, "creating V2P mappings for instance"; - "instance_id" => %instance_id, - "sled_id" => %sled_id); - - // For every sled that isn't the sled this instance was allocated to, create - // a virtual to physical mapping for each of this instance's NICs. - // - // For the mappings to be correct, a few invariants must hold: - // - // - mappings must be set whenever an instance's sled changes (eg. - // during instance creation, migration, stop + start) - // - // - an instances' sled must not change while its corresponding mappings - // are being created - // - // - the same mapping creation must be broadcast to all sleds - // - // A more targeted approach would be to see what other instances share - // the VPC this instance is in (or more generally, what instances should - // have connectivity to this one), see what sleds those are allocated - // to, and only create V2P mappings for those sleds. - // - // There's additional work with this approach: - // - // - it means that delete calls are required as well as set calls, - // meaning that now the ordering of those matters (this may also - // necessitate a generation number for V2P mappings) - // - // - V2P mappings have to be bidirectional in order for both instances's - // packets to make a round trip. This isn't a problem with the - // broadcast approach because one of the sides will exist already, but - // it is something to orchestrate with a more targeted approach. - // - // TODO-correctness Default firewall rules currently will block - // instances in different VPCs from connecting to each other. If it ever - // stops doing this, the broadcast approach will create V2P mappings - // that shouldn't exist. - let (.., authz_instance) = LookupPath::new(&opctx, &self.db_datastore) - .instance_id(instance_id) - .lookup_for(authz::Action::Read) - .await?; - - let instance_nics = self - .db_datastore - .derive_guest_network_interface_info(&opctx, &authz_instance) - .await?; - - // Look up the supplied sled's physical host IP. - let physical_host_ip = - *self.sled_lookup(&self.opctx_alloc, &sled_id)?.fetch().await?.1.ip; - - let mut last_sled_id: Option = None; - loop { - let pagparams = DataPageParams { - marker: last_sled_id.as_ref(), - direction: dropshot::PaginationOrder::Ascending, - limit: std::num::NonZeroU32::new(10).unwrap(), - }; - - let sleds_page = - self.sled_list(&self.opctx_alloc, &pagparams).await?; - let mut join_handles = - Vec::with_capacity(sleds_page.len() * instance_nics.len()); - - for sled in &sleds_page { - // set_v2p not required for sled instance was allocated to, OPTE - // currently does that automatically - // - // TODO(#3107): Remove this when XDE stops creating mappings - // implicitly. - if sled.id() == sled_id { - continue; - } - - for nic in &instance_nics { - let client = self.sled_client(&sled.id()).await?; - let nic_id = nic.id; - let mapping = SetVirtualNetworkInterfaceHost { - virtual_ip: nic.ip, - virtual_mac: nic.mac, - physical_host_ip, - vni: nic.vni, - }; - - let log = self.log.clone(); - - // This function is idempotent: calling the set_v2p ioctl with - // the same information is a no-op. - join_handles.push(tokio::spawn(futures::future::lazy( - move |_ctx| async move { - retry_until_known_result(&log, || async { - client.set_v2p(&nic_id, &mapping).await - }) - .await - }, - ))); - } - } - - // Concurrently run each future to completion, but return the last - // error seen. - let mut error = None; - for join_handle in join_handles { - let result = join_handle - .await - .map_err(|e| Error::internal_error(&e.to_string()))? - .await; - - if result.is_err() { - error!(self.log, "{:?}", result); - error = Some(result); - } - } - if let Some(e) = error { - return e.map(|_| ()).map_err(|e| e.into()); - } - - if sleds_page.len() < 10 { - break; - } - - if let Some(last) = sleds_page.last() { - last_sled_id = Some(last.id()); - } - } - - Ok(()) - } - - /// Ensure that the necessary v2p mappings for an instance are deleted - pub(crate) async fn delete_instance_v2p_mappings( - &self, - opctx: &OpContext, - instance_id: Uuid, - ) -> Result<(), Error> { - // For every sled that isn't the sled this instance was allocated to, delete - // the virtual to physical mapping for each of this instance's NICs. If - // there isn't a V2P mapping, del_v2p should be a no-op. - let (.., authz_instance) = LookupPath::new(&opctx, &self.db_datastore) - .instance_id(instance_id) - .lookup_for(authz::Action::Read) - .await?; - - let instance_nics = self - .db_datastore - .derive_guest_network_interface_info(&opctx, &authz_instance) - .await?; - - let mut last_sled_id: Option = None; - - loop { - let pagparams = DataPageParams { - marker: last_sled_id.as_ref(), - direction: dropshot::PaginationOrder::Ascending, - limit: std::num::NonZeroU32::new(10).unwrap(), - }; - - let sleds_page = - self.sled_list(&self.opctx_alloc, &pagparams).await?; - let mut join_handles = - Vec::with_capacity(sleds_page.len() * instance_nics.len()); - - for sled in &sleds_page { - for nic in &instance_nics { - let client = self.sled_client(&sled.id()).await?; - let nic_id = nic.id; - let mapping = DeleteVirtualNetworkInterfaceHost { - virtual_ip: nic.ip, - vni: nic.vni, - }; - - let log = self.log.clone(); - - // This function is idempotent: calling the set_v2p ioctl with - // the same information is a no-op. - join_handles.push(tokio::spawn(futures::future::lazy( - move |_ctx| async move { - retry_until_known_result(&log, || async { - client.del_v2p(&nic_id, &mapping).await - }) - .await - }, - ))); - } - } - - // Concurrently run each future to completion, but return the last - // error seen. - let mut error = None; - for join_handle in join_handles { - let result = join_handle - .await - .map_err(|e| Error::internal_error(&e.to_string()))? - .await; - - if result.is_err() { - error!(self.log, "{:?}", result); - error = Some(result); - } - } - if let Some(e) = error { - return e.map(|_| ()).map_err(|e| e.into()); - } - - if sleds_page.len() < 10 { - break; - } - - if let Some(last) = sleds_page.last() { - last_sled_id = Some(last.id()); - } - } - - Ok(()) - } - /// Ensures that the Dendrite configuration for the supplied instance is /// up-to-date. /// @@ -872,7 +643,7 @@ impl super::Nexus { opctx: &OpContext, authz_instance: &authz::Instance, ) -> Result<(), Error> { - self.delete_instance_v2p_mappings(opctx, authz_instance.id()).await?; + self.background_tasks.activate(&self.background_tasks.task_v2p_manager); self.instance_delete_dpd_config(opctx, authz_instance).await?; @@ -1007,8 +778,7 @@ impl super::Nexus { Err(e) => return Err(e), }; - self.create_instance_v2p_mappings(opctx, instance_id, new_sled_id) - .await?; + self.background_tasks.activate(&self.background_tasks.task_v2p_manager); let (.., sled) = LookupPath::new(opctx, &self.db_datastore) .sled_id(new_sled_id) diff --git a/nexus/src/app/sagas/instance_start.rs b/nexus/src/app/sagas/instance_start.rs index 98fcec13a7..a90e841cb6 100644 --- a/nexus/src/app/sagas/instance_start.rs +++ b/nexus/src/app/sagas/instance_start.rs @@ -447,50 +447,18 @@ async fn sis_dpd_ensure_undo( async fn sis_v2p_ensure( sagactx: NexusActionContext, ) -> Result<(), ActionError> { - let params = sagactx.saga_params::()?; let osagactx = sagactx.user_data(); - let instance_id = params.db_instance.id(); - - info!(osagactx.log(), "start saga: ensuring v2p mappings are configured"; - "instance_id" => %instance_id); - - let opctx = crate::context::op_context_for_saga_action( - &sagactx, - ¶ms.serialized_authn, - ); - - let sled_uuid = sagactx.lookup::("sled_id")?; - osagactx - .nexus() - .create_instance_v2p_mappings(&opctx, instance_id, sled_uuid) - .await - .map_err(ActionError::action_failed)?; - + let nexus = osagactx.nexus(); + nexus.background_tasks.activate(&nexus.background_tasks.task_v2p_manager); Ok(()) } async fn sis_v2p_ensure_undo( sagactx: NexusActionContext, ) -> Result<(), anyhow::Error> { - let params = sagactx.saga_params::()?; let osagactx = sagactx.user_data(); - let instance_id = params.db_instance.id(); - let sled_id = sagactx.lookup::("sled_id")?; - info!(osagactx.log(), "start saga: undoing v2p configuration"; - "instance_id" => %instance_id, - "sled_id" => %sled_id); - - let opctx = crate::context::op_context_for_saga_action( - &sagactx, - ¶ms.serialized_authn, - ); - - osagactx - .nexus() - .delete_instance_v2p_mappings(&opctx, instance_id) - .await - .map_err(ActionError::action_failed)?; - + let nexus = osagactx.nexus(); + nexus.background_tasks.activate(&nexus.background_tasks.task_v2p_manager); Ok(()) } diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json index a95cf17f09..10eb9d57cc 100644 --- a/openapi/sled-agent.json +++ b/openapi/sled-agent.json @@ -859,10 +859,10 @@ "content": { "application/json": { "schema": { - "title": "Array_of_SetVirtualNetworkInterfaceHost", + "title": "Array_of_VirtualNetworkInterfaceHost", "type": "array", "items": { - "$ref": "#/components/schemas/SetVirtualNetworkInterfaceHost" + "$ref": "#/components/schemas/VirtualNetworkInterfaceHost" } } } @@ -875,28 +875,15 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/v2p/{interface_id}": { + }, "put": { "summary": "Create a mapping from a virtual NIC to a physical host", "operationId": "set_v2p", - "parameters": [ - { - "in": "path", - "name": "interface_id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetVirtualNetworkInterfaceHost" + "$ref": "#/components/schemas/VirtualNetworkInterfaceHost" } } }, @@ -917,22 +904,11 @@ "delete": { "summary": "Delete a mapping from a virtual NIC to a physical host", "operationId": "del_v2p", - "parameters": [ - { - "in": "path", - "name": "interface_id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteVirtualNetworkInterfaceHost" + "$ref": "#/components/schemas/VirtualNetworkInterfaceHost" } } }, @@ -3554,29 +3530,6 @@ "histogram_f64" ] }, - "DeleteVirtualNetworkInterfaceHost": { - "description": "The data needed to identify a virtual IP for which a sled maintains an OPTE virtual-to-physical mapping such that that mapping can be deleted.", - "type": "object", - "properties": { - "virtual_ip": { - "description": "The virtual IP whose mapping should be deleted.", - "type": "string", - "format": "ip" - }, - "vni": { - "description": "The VNI for the network containing the virtual IP whose mapping should be deleted.", - "allOf": [ - { - "$ref": "#/components/schemas/Vni" - } - ] - } - }, - "required": [ - "virtual_ip", - "vni" - ] - }, "DhcpConfig": { "description": "DHCP configuration for a port\n\nNot present here: Hostname (DHCPv4 option 12; used in DHCPv6 option 39); we use `InstanceRuntimeState::hostname` for this value.", "type": "object", @@ -6824,32 +6777,6 @@ "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" }, - "SetVirtualNetworkInterfaceHost": { - "description": "A mapping from a virtual NIC to a physical host", - "type": "object", - "properties": { - "physical_host_ip": { - "type": "string", - "format": "ipv6" - }, - "virtual_ip": { - "type": "string", - "format": "ip" - }, - "virtual_mac": { - "$ref": "#/components/schemas/MacAddr" - }, - "vni": { - "$ref": "#/components/schemas/Vni" - } - }, - "required": [ - "physical_host_ip", - "virtual_ip", - "virtual_mac", - "vni" - ] - }, "SledInstanceState": { "description": "A wrapper type containing a sled's total knowledge of the state of a specific VMM and the instance it incarnates.", "type": "object", @@ -7114,6 +7041,32 @@ "version" ] }, + "VirtualNetworkInterfaceHost": { + "description": "A mapping from a virtual NIC to a physical host", + "type": "object", + "properties": { + "physical_host_ip": { + "type": "string", + "format": "ipv6" + }, + "virtual_ip": { + "type": "string", + "format": "ip" + }, + "virtual_mac": { + "$ref": "#/components/schemas/MacAddr" + }, + "vni": { + "$ref": "#/components/schemas/Vni" + } + }, + "required": [ + "physical_host_ip", + "virtual_ip", + "virtual_mac", + "vni" + ] + }, "VmmRuntimeState": { "description": "The dynamic runtime properties of an individual VMM process.", "type": "object", diff --git a/oximeter/collector/tests/output/self-stat-schema.json b/oximeter/collector/tests/output/self-stat-schema.json index 9c4e88bab4..eb3da9f330 100644 --- a/oximeter/collector/tests/output/self-stat-schema.json +++ b/oximeter/collector/tests/output/self-stat-schema.json @@ -39,7 +39,7 @@ } ], "datum_type": "cumulative_u64", - "created": "2024-04-18T16:48:10.687105235Z" + "created": "2024-04-26T20:07:55.880775073Z" }, "oximeter_collector:failed_collections": { "timeseries_name": "oximeter_collector:failed_collections", @@ -86,6 +86,6 @@ } ], "datum_type": "cumulative_u64", - "created": "2024-04-18T16:48:10.689588995Z" + "created": "2024-04-26T20:07:55.883136789Z" } } \ No newline at end of file diff --git a/package-manifest.toml b/package-manifest.toml index 2819010335..9811046fe2 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -535,10 +535,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 = "8207cb9c90cd7144c3f351823bfb2ae3e221ad10" +source.commit = "6fcb80d6f0b6bd1c67f72b3deb31a6762498c7aa" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//maghemite.sha256.txt -source.sha256 = "dc58a0b4b1fe739e535e881e5e0678067fb8661e61cb837841224dd14608d54c" +source.sha256 = "4239166179e389cf303a6ef1f64e3432a1c7e40d8a855296bd2186590ffeeaa9" output.type = "tarball" [package.mg-ddm] @@ -551,10 +551,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 = "8207cb9c90cd7144c3f351823bfb2ae3e221ad10" +source.commit = "6fcb80d6f0b6bd1c67f72b3deb31a6762498c7aa" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "4221a80d6ffb16b0f4d8b67a198a3da517154c3e7d8c1f0eaebb4eda6c36bdeb" +source.sha256 = "947473d4841f969509fccff3cdc0de4324d2d05e6d4eefe1b5c9176592bd1d51" output.type = "zone" output.intermediate_only = true @@ -566,10 +566,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 = "8207cb9c90cd7144c3f351823bfb2ae3e221ad10" +source.commit = "6fcb80d6f0b6bd1c67f72b3deb31a6762498c7aa" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "ee3ef45706641784a8cfb093310bf5603755b59714db92bce058bb7cc1483099" +source.sha256 = "ae1c8fdf86a1e912db2814d80a4dc813a4aa1c09b0400bfa102f5280798e6eab" output.type = "zone" output.intermediate_only = true diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index cf63c5424a..0a66d85fff 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -25,9 +25,7 @@ use dropshot::{ HttpResponseUpdatedNoContent, Path, Query, RequestContext, StreamingBody, TypedBody, }; -use illumos_utils::opte::params::{ - DeleteVirtualNetworkInterfaceHost, SetVirtualNetworkInterfaceHost, -}; +use illumos_utils::opte::params::VirtualNetworkInterfaceHost; use installinator_common::M2Slot; use omicron_common::api::external::Error; use omicron_common::api::internal::nexus::{ @@ -643,24 +641,16 @@ async fn vpc_firewall_rules_put( Ok(HttpResponseUpdatedNoContent()) } -/// Path parameters for V2P mapping related requests (sled agent API) -#[allow(dead_code)] -#[derive(Deserialize, JsonSchema)] -struct V2pPathParam { - interface_id: Uuid, -} - /// Create a mapping from a virtual NIC to a physical host // Keep interface_id to maintain parity with the simulated sled agent, which // requires interface_id on the path. #[endpoint { method = PUT, - path = "/v2p/{interface_id}", + path = "/v2p/", }] async fn set_v2p( rqctx: RequestContext, - _path_params: Path, - body: TypedBody, + body: TypedBody, ) -> Result { let sa = rqctx.context(); let body_args = body.into_inner(); @@ -675,12 +665,11 @@ async fn set_v2p( // requires interface_id on the path. #[endpoint { method = DELETE, - path = "/v2p/{interface_id}", + path = "/v2p/", }] async fn del_v2p( rqctx: RequestContext, - _path_params: Path, - body: TypedBody, + body: TypedBody, ) -> Result { let sa = rqctx.context(); let body_args = body.into_inner(); @@ -698,7 +687,7 @@ async fn del_v2p( }] async fn list_v2p( rqctx: RequestContext, -) -> Result>, HttpError> { +) -> Result>, HttpError> { let sa = rqctx.context(); let vnics = sa.list_virtual_nics().await.map_err(Error::from)?; diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index 7d0d513a14..3149d50cf8 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -21,8 +21,7 @@ use dropshot::HttpResponseUpdatedNoContent; use dropshot::Path; use dropshot::RequestContext; use dropshot::TypedBody; -use illumos_utils::opte::params::DeleteVirtualNetworkInterfaceHost; -use illumos_utils::opte::params::SetVirtualNetworkInterfaceHost; +use illumos_utils::opte::params::VirtualNetworkInterfaceHost; use ipnetwork::Ipv6Network; use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::api::internal::nexus::SledInstanceState; @@ -346,7 +345,7 @@ struct V2pPathParam { async fn set_v2p( rqctx: RequestContext>, path_params: Path, - body: TypedBody, + body: TypedBody, ) -> Result { let sa = rqctx.context(); let interface_id = path_params.into_inner().interface_id; @@ -367,7 +366,7 @@ async fn set_v2p( async fn del_v2p( rqctx: RequestContext>, path_params: Path, - body: TypedBody, + body: TypedBody, ) -> Result { let sa = rqctx.context(); let interface_id = path_params.into_inner().interface_id; diff --git a/sled-agent/src/sim/sled_agent.rs b/sled-agent/src/sim/sled_agent.rs index 455c2988d3..c0a873efde 100644 --- a/sled-agent/src/sim/sled_agent.rs +++ b/sled-agent/src/sim/sled_agent.rs @@ -23,9 +23,7 @@ use anyhow::bail; use anyhow::Context; use dropshot::{HttpError, HttpServer}; use futures::lock::Mutex; -use illumos_utils::opte::params::{ - DeleteVirtualNetworkInterfaceHost, SetVirtualNetworkInterfaceHost, -}; +use illumos_utils::opte::params::VirtualNetworkInterfaceHost; use omicron_common::api::external::{ ByteCount, DiskState, Error, Generation, ResourceType, }; @@ -68,7 +66,7 @@ pub struct SledAgent { nexus_address: SocketAddr, pub nexus_client: Arc, disk_id_to_region_ids: Mutex>>, - pub v2p_mappings: Mutex>>, + pub v2p_mappings: Mutex>>, mock_propolis: Mutex>, PropolisClient)>>, /// lists of external IPs assigned to instances @@ -632,7 +630,7 @@ impl SledAgent { pub async fn set_virtual_nic_host( &self, interface_id: Uuid, - mapping: &SetVirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { let mut v2p_mappings = self.v2p_mappings.lock().await; let vec = v2p_mappings.entry(interface_id).or_default(); @@ -643,7 +641,7 @@ impl SledAgent { pub async fn unset_virtual_nic_host( &self, interface_id: Uuid, - mapping: &DeleteVirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { let mut v2p_mappings = self.v2p_mappings.lock().await; let vec = v2p_mappings.entry(interface_id).or_default(); diff --git a/sled-agent/src/sled_agent.rs b/sled-agent/src/sled_agent.rs index 0ac649aa62..056a04bdab 100644 --- a/sled-agent/src/sled_agent.rs +++ b/sled-agent/src/sled_agent.rs @@ -37,9 +37,7 @@ use derive_more::From; use dropshot::HttpError; use futures::stream::FuturesUnordered; use futures::StreamExt; -use illumos_utils::opte::params::{ - DeleteVirtualNetworkInterfaceHost, SetVirtualNetworkInterfaceHost, -}; +use illumos_utils::opte::params::VirtualNetworkInterfaceHost; use illumos_utils::opte::PortManager; use illumos_utils::zone::PROPOLIS_ZONE_PREFIX; use illumos_utils::zone::ZONE_PREFIX; @@ -1055,13 +1053,13 @@ impl SledAgent { pub async fn list_virtual_nics( &self, - ) -> Result, Error> { + ) -> Result, Error> { self.inner.port_manager.list_virtual_nics().map_err(Error::from) } pub async fn set_virtual_nic_host( &self, - mapping: &SetVirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { self.inner .port_manager @@ -1071,7 +1069,7 @@ impl SledAgent { pub async fn unset_virtual_nic_host( &self, - mapping: &DeleteVirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { self.inner .port_manager diff --git a/test-utils/src/dev/maghemite.rs b/test-utils/src/dev/maghemite.rs index a2ee9b2253..feb7dae150 100644 --- a/test-utils/src/dev/maghemite.rs +++ b/test-utils/src/dev/maghemite.rs @@ -137,7 +137,7 @@ async fn discover_port(logfile: String) -> Result { } async fn find_mgd_port_in_log(logfile: String) -> Result { - let re = regex::Regex::new(r#""local_addr":"\[::\]:?([0-9]+)""#).unwrap(); + let re = regex::Regex::new(r#""local_addr":"\[::1\]:?([0-9]+)""#).unwrap(); let reader = BufReader::new(File::open(logfile).await?); let mut lines = reader.lines(); loop { diff --git a/tools/maghemite_mg_openapi_version b/tools/maghemite_mg_openapi_version index 396a74d26a..14641c8047 100644 --- a/tools/maghemite_mg_openapi_version +++ b/tools/maghemite_mg_openapi_version @@ -1,2 +1,2 @@ -COMMIT="bc244d418368fcc3e66db2a0637501a900be161a" +COMMIT="6fcb80d6f0b6bd1c67f72b3deb31a6762498c7aa" SHA2="a5d2f275c99152711dec1df58fd49d459d3fcb8fbfc7a7f48f432be248d74639" diff --git a/tools/maghemite_mgd_checksums b/tools/maghemite_mgd_checksums index 5a9bd77910..18b9fcfffc 100644 --- a/tools/maghemite_mgd_checksums +++ b/tools/maghemite_mgd_checksums @@ -1,2 +1,2 @@ -CIDL_SHA256="ddc19da8932e0ff4a91dea139369bb5b729748bdf698223bc2717a4abea89ed6" -MGD_LINUX_SHA256="ee41d903d19b4ced4bbf139ed05ba8c060517642bc7d4bcef3790e697fa3f44d" +CIDL_SHA256="ae1c8fdf86a1e912db2814d80a4dc813a4aa1c09b0400bfa102f5280798e6eab" +MGD_LINUX_SHA256="16fab892acdb46f7eb14c295bd73a2312c15c86223e6de7436ea3a2c341873ee" diff --git a/tools/opte_version b/tools/opte_version index e1b3e11499..41d9666b04 100644 --- a/tools/opte_version +++ b/tools/opte_version @@ -1 +1 @@ -0.28.233 +0.29.248 From 7a73bf8f470e1a78b33199b8b1410a665d9fbe87 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Mon, 29 Apr 2024 21:10:11 +0000 Subject: [PATCH 09/26] fixup! WIP: convert nexus v2p management to rpw activation --- illumos-utils/src/opte/params.rs | 4 +- nexus/src/app/sagas/instance_create.rs | 4 +- nexus/src/app/sagas/instance_delete.rs | 2 + nexus/tests/integration_tests/instances.rs | 66 ++++------------------ sled-agent/src/sim/http_entrypoints.rs | 34 ++++++----- sled-agent/src/sim/sled_agent.rs | 29 ++++------ 6 files changed, 47 insertions(+), 92 deletions(-) diff --git a/illumos-utils/src/opte/params.rs b/illumos-utils/src/opte/params.rs index d772deefd1..17c61d680f 100644 --- a/illumos-utils/src/opte/params.rs +++ b/illumos-utils/src/opte/params.rs @@ -31,7 +31,9 @@ pub struct VpcFirewallRule { } /// A mapping from a virtual NIC to a physical host -#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] +#[derive( + Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, +)] pub struct VirtualNetworkInterfaceHost { pub virtual_ip: IpAddr, pub virtual_mac: external::MacAddr, diff --git a/nexus/src/app/sagas/instance_create.rs b/nexus/src/app/sagas/instance_create.rs index 0950754572..5db61fe13a 100644 --- a/nexus/src/app/sagas/instance_create.rs +++ b/nexus/src/app/sagas/instance_create.rs @@ -1283,9 +1283,7 @@ pub mod test { assert!(no_instances_or_disks_on_sled(&sled_agent).await); let v2p_mappings = &*sled_agent.v2p_mappings.lock().await; - for (_nic_id, mappings) in v2p_mappings { - assert!(mappings.is_empty()); - } + assert!(v2p_mappings.is_empty()); } #[nexus_test(server = crate::Server)] diff --git a/nexus/src/app/sagas/instance_delete.rs b/nexus/src/app/sagas/instance_delete.rs index 0e253913b0..52c63c8b8d 100644 --- a/nexus/src/app/sagas/instance_delete.rs +++ b/nexus/src/app/sagas/instance_delete.rs @@ -102,6 +102,7 @@ async fn sid_delete_network_interfaces( sagactx: NexusActionContext, ) -> Result<(), ActionError> { let osagactx = sagactx.user_data(); + let nexus = osagactx.nexus(); let params = sagactx.saga_params::()?; let opctx = crate::context::op_context_for_saga_action( &sagactx, @@ -112,6 +113,7 @@ async fn sid_delete_network_interfaces( .instance_delete_all_network_interfaces(&opctx, ¶ms.authz_instance) .await .map_err(ActionError::action_failed)?; + nexus.background_tasks.activate(&nexus.background_tasks.task_v2p_manager); Ok(()) } diff --git a/nexus/tests/integration_tests/instances.rs b/nexus/tests/integration_tests/instances.rs index d5c4a1e7af..a92fb042cb 100644 --- a/nexus/tests/integration_tests/instances.rs +++ b/nexus/tests/integration_tests/instances.rs @@ -656,14 +656,6 @@ async fn test_instance_start_creates_networking_state( .await .unwrap(); - let instance_state = datastore - .instance_fetch_with_vmm(&opctx, &authz_instance) - .await - .unwrap(); - - let sled_id = - instance_state.sled_id().expect("running instance should have a sled"); - let guest_nics = datastore .derive_guest_network_interface_info(&opctx, &authz_instance) .await @@ -671,13 +663,7 @@ async fn test_instance_start_creates_networking_state( assert_eq!(guest_nics.len(), 1); for agent in &sled_agents { - // TODO(#3107) Remove this bifurcation when Nexus programs all mappings - // itself. - if agent.id != sled_id { - assert_sled_v2p_mappings(agent, &nics[0], guest_nics[0].vni).await; - } else { - assert!(agent.v2p_mappings.lock().await.is_empty()); - } + assert_sled_v2p_mappings(agent, &nics[0], guest_nics[0].vni).await; } } @@ -857,24 +843,7 @@ async fn test_instance_migrate_v2p(cptestctx: &ControlPlaneTestContext) { let mut sled_agents = vec![cptestctx.sled_agent.sled_agent.clone()]; sled_agents.extend(other_sleds.iter().map(|tup| tup.1.sled_agent.clone())); for sled_agent in &sled_agents { - // Starting the instance should have programmed V2P mappings to all the - // sleds except the one where the instance is running. - // - // TODO(#3107): In practice, the instance's sled also has V2P mappings, but - // these are established during VMM setup (i.e. as part of creating the - // instance's OPTE ports) instead of being established by explicit calls - // from Nexus. Simulated sled agent handles the latter calls but does - // not currently update any mappings during simulated instance creation, - // so the check below verifies that no mappings exist on the instance's - // own sled instead of checking for a real mapping. Once Nexus programs - // all mappings explicitly (without skipping the instance's current - // sled) this bifurcation should be removed. - if sled_agent.id != original_sled_id { - assert_sled_v2p_mappings(sled_agent, &nics[0], guest_nics[0].vni) - .await; - } else { - assert!(sled_agent.v2p_mappings.lock().await.is_empty()); - } + assert_sled_v2p_mappings(sled_agent, &nics[0], guest_nics[0].vni).await; } let dst_sled_id = if original_sled_id == cptestctx.sled_agent.sled_agent.id @@ -4535,14 +4504,6 @@ async fn test_instance_v2p_mappings(cptestctx: &ControlPlaneTestContext) { .await .unwrap(); - let instance_state = datastore - .instance_fetch_with_vmm(&opctx, &authz_instance) - .await - .unwrap(); - - let sled_id = - instance_state.sled_id().expect("running instance should have a sled"); - let guest_nics = datastore .derive_guest_network_interface_info(&opctx, &authz_instance) .await @@ -4555,14 +4516,7 @@ async fn test_instance_v2p_mappings(cptestctx: &ControlPlaneTestContext) { sled_agents.push(&cptestctx.sled_agent.sled_agent); for sled_agent in &sled_agents { - // TODO(#3107) Remove this bifurcation when Nexus programs all mappings - // itself. - if sled_agent.id != sled_id { - assert_sled_v2p_mappings(sled_agent, &nics[0], guest_nics[0].vni) - .await; - } else { - assert!(sled_agent.v2p_mappings.lock().await.is_empty()); - } + assert_sled_v2p_mappings(sled_agent, &nics[0], guest_nics[0].vni).await; } // Delete the instance @@ -4678,13 +4632,13 @@ async fn assert_sled_v2p_mappings( vni: Vni, ) { let v2p_mappings = sled_agent.v2p_mappings.lock().await; - assert!(!v2p_mappings.is_empty()); - - let mapping = v2p_mappings.get(&nic.identity.id).unwrap().last().unwrap(); - assert_eq!(mapping.virtual_ip, nic.ip); - assert_eq!(mapping.virtual_mac, nic.mac); - assert_eq!(mapping.physical_host_ip, sled_agent.ip); - assert_eq!(mapping.vni, vni); + let mapping = v2p_mappings.iter().find(|mapping| { + mapping.virtual_ip == nic.ip + && mapping.virtual_mac == nic.mac + && mapping.physical_host_ip == sled_agent.ip + && mapping.vni == vni + }); + assert!(mapping.is_some()) } /// Simulate completion of an ongoing instance state transition. To do this, we diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index 3149d50cf8..7be63db145 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -56,6 +56,7 @@ pub fn api() -> SledApiDescription { api.register(vpc_firewall_rules_put)?; api.register(set_v2p)?; api.register(del_v2p)?; + api.register(list_v2p)?; api.register(uplink_ensure)?; api.register(read_network_bootstore_config)?; api.register(write_network_bootstore_config)?; @@ -331,27 +332,19 @@ async fn vpc_firewall_rules_put( Ok(HttpResponseUpdatedNoContent()) } -/// Path parameters for V2P mapping related requests (sled agent API) -#[derive(Deserialize, JsonSchema)] -struct V2pPathParam { - interface_id: Uuid, -} - /// Create a mapping from a virtual NIC to a physical host #[endpoint { method = PUT, - path = "/v2p/{interface_id}", + path = "/v2p/", }] async fn set_v2p( rqctx: RequestContext>, - path_params: Path, body: TypedBody, ) -> Result { let sa = rqctx.context(); - let interface_id = path_params.into_inner().interface_id; let body_args = body.into_inner(); - sa.set_virtual_nic_host(interface_id, &body_args) + sa.set_virtual_nic_host(&body_args) .await .map_err(|e| HttpError::for_internal_error(e.to_string()))?; @@ -361,24 +354,37 @@ async fn set_v2p( /// Delete a mapping from a virtual NIC to a physical host #[endpoint { method = DELETE, - path = "/v2p/{interface_id}", + path = "/v2p/", }] async fn del_v2p( rqctx: RequestContext>, - path_params: Path, body: TypedBody, ) -> Result { let sa = rqctx.context(); - let interface_id = path_params.into_inner().interface_id; let body_args = body.into_inner(); - sa.unset_virtual_nic_host(interface_id, &body_args) + sa.unset_virtual_nic_host(&body_args) .await .map_err(|e| HttpError::for_internal_error(e.to_string()))?; Ok(HttpResponseUpdatedNoContent()) } +/// List v2p mappings present on sled +#[endpoint { + method = GET, + path = "/v2p/", +}] +async fn list_v2p( + rqctx: RequestContext>, +) -> Result>, HttpError> { + let sa = rqctx.context(); + + let vnics = sa.list_virtual_nics().await.map_err(HttpError::from)?; + + Ok(HttpResponseOk(vnics)) +} + #[endpoint { method = POST, path = "/switch-ports", diff --git a/sled-agent/src/sim/sled_agent.rs b/sled-agent/src/sim/sled_agent.rs index c0a873efde..4851db1b03 100644 --- a/sled-agent/src/sim/sled_agent.rs +++ b/sled-agent/src/sim/sled_agent.rs @@ -66,7 +66,7 @@ pub struct SledAgent { nexus_address: SocketAddr, pub nexus_client: Arc, disk_id_to_region_ids: Mutex>>, - pub v2p_mappings: Mutex>>, + pub v2p_mappings: Mutex>, mock_propolis: Mutex>, PropolisClient)>>, /// lists of external IPs assigned to instances @@ -163,7 +163,7 @@ impl SledAgent { nexus_address, nexus_client, disk_id_to_region_ids: Mutex::new(HashMap::new()), - v2p_mappings: Mutex::new(HashMap::new()), + v2p_mappings: Mutex::new(HashSet::new()), external_ips: Mutex::new(HashMap::new()), mock_propolis: Mutex::new(None), config: config.clone(), @@ -629,36 +629,29 @@ impl SledAgent { pub async fn set_virtual_nic_host( &self, - interface_id: Uuid, mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { let mut v2p_mappings = self.v2p_mappings.lock().await; - let vec = v2p_mappings.entry(interface_id).or_default(); - vec.push(mapping.clone()); + v2p_mappings.insert(mapping.clone()); Ok(()) } pub async fn unset_virtual_nic_host( &self, - interface_id: Uuid, mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { let mut v2p_mappings = self.v2p_mappings.lock().await; - let vec = v2p_mappings.entry(interface_id).or_default(); - vec.retain(|x| { - x.virtual_ip != mapping.virtual_ip || x.vni != mapping.vni - }); - - // If the last entry was removed, remove the entire interface ID so that - // tests don't have to distinguish never-created entries from - // previously-extant-but-now-empty entries. - if vec.is_empty() { - v2p_mappings.remove(&interface_id); - } - + v2p_mappings.remove(mapping); Ok(()) } + pub async fn list_virtual_nics( + &self, + ) -> Result, Error> { + let v2p_mappings = self.v2p_mappings.lock().await; + Ok(Vec::from_iter(v2p_mappings.clone())) + } + pub async fn instance_put_external_ip( &self, instance_id: Uuid, From 4df4fce1181e41bddfcf8964b3930f5696a55908 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Mon, 29 Apr 2024 23:21:40 +0000 Subject: [PATCH 10/26] rework schema for proper exclusion of deleted vnics --- .../crdb/add-view-for-v2p-mappings/up01.sql | 15 +++++----- .../crdb/add-view-for-v2p-mappings/up05.sql | 2 ++ .../crdb/add-view-for-v2p-mappings/up06.sql | 2 ++ .../crdb/add-view-for-v2p-mappings/up07.sql | 2 ++ schema/crdb/dbinit.sql | 28 +++++++++++++------ 5 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 schema/crdb/add-view-for-v2p-mappings/up05.sql create mode 100644 schema/crdb/add-view-for-v2p-mappings/up06.sql create mode 100644 schema/crdb/add-view-for-v2p-mappings/up07.sql diff --git a/schema/crdb/add-view-for-v2p-mappings/up01.sql b/schema/crdb/add-view-for-v2p-mappings/up01.sql index 4f1f818f21..96d5723c00 100644 --- a/schema/crdb/add-view-for-v2p-mappings/up01.sql +++ b/schema/crdb/add-view-for-v2p-mappings/up01.sql @@ -1,4 +1,3 @@ --- view for v2p mapping rpw CREATE VIEW IF NOT EXISTS omicron.public.v2p_mapping_view AS WITH VmV2pMappings AS ( @@ -9,13 +8,13 @@ WITH VmV2pMappings AS ( v.vni, n.mac, n.ip - FROM omicron.public.vmm vmm - JOIN omicron.public.sled s ON vmm.sled_id = s.id - JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id + FROM omicron.public.network_interface n JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id JOIN omicron.public.vpc v ON v.id = n.vpc_id - WHERE vmm.time_deleted IS NULL - AND n.kind != 'service' + JOIN omicron.public.vmm vmm ON n.parent_id = vmm.instance_id + JOIN omicron.public.sled s ON vmm.sled_id = s.id + WHERE n.time_deleted IS NULL + AND n.kind = 'instance' AND s.sled_policy = 'in_service' AND s.sled_state = 'active' ), @@ -32,8 +31,8 @@ ProbeV2pMapping AS ( JOIN omicron.public.vpc v ON v.id = n.vpc_id JOIN omicron.public.probe p ON n.parent_id = p.id JOIN omicron.public.sled s ON p.sled = s.id - WHERE p.time_deleted IS NULL - AND n.kind != 'service' + WHERE n.time_deleted IS NULL + AND n.kind = 'probe' AND s.sled_policy = 'in_service' AND s.sled_state = 'active' ) diff --git a/schema/crdb/add-view-for-v2p-mappings/up05.sql b/schema/crdb/add-view-for-v2p-mappings/up05.sql new file mode 100644 index 0000000000..d21b280a70 --- /dev/null +++ b/schema/crdb/add-view-for-v2p-mappings/up05.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS v2p_mapping_details +ON network_interface (time_deleted, kind, subnet_id, vpc_id, parent_id) STORING (mac, ip); diff --git a/schema/crdb/add-view-for-v2p-mappings/up06.sql b/schema/crdb/add-view-for-v2p-mappings/up06.sql new file mode 100644 index 0000000000..f069955ab7 --- /dev/null +++ b/schema/crdb/add-view-for-v2p-mappings/up06.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS sled_by_policy +ON sled (sled_policy) STORING (ip, sled_state); diff --git a/schema/crdb/add-view-for-v2p-mappings/up07.sql b/schema/crdb/add-view-for-v2p-mappings/up07.sql new file mode 100644 index 0000000000..6e77fbbd64 --- /dev/null +++ b/schema/crdb/add-view-for-v2p-mappings/up07.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS vmm_by_instance_id +ON vmm (instance_id) STORING (sled_id); diff --git a/schema/crdb/dbinit.sql b/schema/crdb/dbinit.sql index fadbc0e560..1f30543f47 100644 --- a/schema/crdb/dbinit.sql +++ b/schema/crdb/dbinit.sql @@ -3726,6 +3726,9 @@ ON omicron.public.switch_port (port_settings_id, port_name) STORING (switch_loca CREATE INDEX IF NOT EXISTS switch_port_name ON omicron.public.switch_port (port_name); +COMMIT; +BEGIN; + -- view for v2p mapping rpw CREATE VIEW IF NOT EXISTS omicron.public.v2p_mapping_view AS @@ -3737,13 +3740,13 @@ WITH VmV2pMappings AS ( v.vni, n.mac, n.ip - FROM omicron.public.vmm vmm - JOIN omicron.public.sled s ON vmm.sled_id = s.id - JOIN omicron.public.network_interface n ON n.parent_id = vmm.instance_id + FROM omicron.public.network_interface n JOIN omicron.public.vpc_subnet vs ON vs.id = n.subnet_id JOIN omicron.public.vpc v ON v.id = n.vpc_id - WHERE vmm.time_deleted IS NULL - AND n.kind != 'service' + JOIN omicron.public.vmm vmm ON n.parent_id = vmm.instance_id + JOIN omicron.public.sled s ON vmm.sled_id = s.id + WHERE n.time_deleted IS NULL + AND n.kind = 'instance' AND s.sled_policy = 'in_service' AND s.sled_state = 'active' ), @@ -3760,8 +3763,8 @@ ProbeV2pMapping AS ( JOIN omicron.public.vpc v ON v.id = n.vpc_id JOIN omicron.public.probe p ON n.parent_id = p.id JOIN omicron.public.sled s ON p.sled = s.id - WHERE p.time_deleted IS NULL - AND n.kind != 'service' + WHERE n.time_deleted IS NULL + AND n.kind = 'probe' AND s.sled_policy = 'in_service' AND s.sled_state = 'active' ) @@ -3777,7 +3780,16 @@ CREATE INDEX IF NOT EXISTS sled_by_policy_and_state ON omicron.public.sled (sled_policy, sled_state, id) STORING (ip); CREATE INDEX IF NOT EXISTS active_vmm -on omicron.public.vmm (time_deleted, sled_id, instance_id); +ON omicron.public.vmm (time_deleted, sled_id, instance_id); + +CREATE INDEX IF NOT EXISTS v2p_mapping_details +ON network_interface (time_deleted, kind, subnet_id, vpc_id, parent_id) STORING (mac, ip); + +CREATE INDEX IF NOT EXISTS sled_by_policy +ON sled (sled_policy) STORING (ip, sled_state); + +CREATE INDEX IF NOT EXISTS vmm_by_instance_id +ON vmm (instance_id) STORING (sled_id); /* * Metadata for the schema itself. This version number isn't great, as there's From 389b6bb70c53889929ef151d749adf1b46168b95 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Tue, 30 Apr 2024 18:05:48 +0000 Subject: [PATCH 11/26] back out accidental dev-env changes --- smf/sled-agent/non-gimlet/config-rss.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/smf/sled-agent/non-gimlet/config-rss.toml b/smf/sled-agent/non-gimlet/config-rss.toml index 479c7e2a4a..d0b4f94d9f 100644 --- a/smf/sled-agent/non-gimlet/config-rss.toml +++ b/smf/sled-agent/non-gimlet/config-rss.toml @@ -33,7 +33,7 @@ external_dns_zone_name = "oxide.test" # the DNS domain delegated to the rack by the customer. Each of these addresses # must be contained in one of the "internal services" IP Pool ranges listed # below. -external_dns_ips = [ "10.85.0.20", "10.85.0.21" ] +external_dns_ips = [ "192.168.1.20", "192.168.1.21" ] # Initial TLS certificates for the external API # @@ -69,8 +69,8 @@ external_certificates = [] # # For more on this and what to put here, see docs/how-to-run.adoc. [[internal_services_ip_pool_ranges]] -first = "10.85.0.10" -last = "10.85.0.29" +first = "192.168.1.20" +last = "192.168.1.29" # TODO - this configuration is subject to change going forward. Ultimately these # parameters should be provided to the control plane via wicket, but we need to @@ -91,8 +91,8 @@ rack_subnet = "fd00:1122:3344:0100::/56" # A range of IP addresses used by Boundary Services on the external network. In # a real system, these would be addresses of the uplink ports on the Sidecar. # With softnpu, only one address is used. -infra_ip_first = "10.85.0.30" -infra_ip_last = "10.85.0.30" +infra_ip_first = "192.168.1.30" +infra_ip_last = "192.168.1.30" # Configurations for BGP routers to run on the scrimlets. bgp = [] @@ -100,9 +100,9 @@ bgp = [] # You can configure multiple uplinks by repeating the following stanza [[rack_network_config.ports]] # Routes associated with this port. -routes = [{nexthop = "10.85.0.1", destination = "0.0.0.0/0"}] +routes = [{nexthop = "192.168.1.199", destination = "0.0.0.0/0"}] # Addresses associated with this port. -addresses = ["10.85.0.30/24"] +addresses = ["192.168.1.30/24"] # Name of the uplink port. This should always be "qsfp0" when using softnpu. port = "qsfp0" # The speed of this port. From 3a92191d6748ef94cc195fb272bbfbc693d17cd3 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Tue, 30 Apr 2024 20:04:48 +0000 Subject: [PATCH 12/26] use full namespace --- schema/crdb/add-view-for-v2p-mappings/up05.sql | 4 +++- schema/crdb/add-view-for-v2p-mappings/up06.sql | 2 +- schema/crdb/add-view-for-v2p-mappings/up07.sql | 2 +- schema/crdb/dbinit.sql | 8 +++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/schema/crdb/add-view-for-v2p-mappings/up05.sql b/schema/crdb/add-view-for-v2p-mappings/up05.sql index d21b280a70..cdabdc6a96 100644 --- a/schema/crdb/add-view-for-v2p-mappings/up05.sql +++ b/schema/crdb/add-view-for-v2p-mappings/up05.sql @@ -1,2 +1,4 @@ CREATE INDEX IF NOT EXISTS v2p_mapping_details -ON network_interface (time_deleted, kind, subnet_id, vpc_id, parent_id) STORING (mac, ip); +ON omicron.public.network_interface ( + time_deleted, kind, subnet_id, vpc_id, parent_id +) STORING (mac, ip); diff --git a/schema/crdb/add-view-for-v2p-mappings/up06.sql b/schema/crdb/add-view-for-v2p-mappings/up06.sql index f069955ab7..afd10ed13f 100644 --- a/schema/crdb/add-view-for-v2p-mappings/up06.sql +++ b/schema/crdb/add-view-for-v2p-mappings/up06.sql @@ -1,2 +1,2 @@ CREATE INDEX IF NOT EXISTS sled_by_policy -ON sled (sled_policy) STORING (ip, sled_state); +ON omicron.public.sled (sled_policy) STORING (ip, sled_state); diff --git a/schema/crdb/add-view-for-v2p-mappings/up07.sql b/schema/crdb/add-view-for-v2p-mappings/up07.sql index 6e77fbbd64..defe411f96 100644 --- a/schema/crdb/add-view-for-v2p-mappings/up07.sql +++ b/schema/crdb/add-view-for-v2p-mappings/up07.sql @@ -1,2 +1,2 @@ CREATE INDEX IF NOT EXISTS vmm_by_instance_id -ON vmm (instance_id) STORING (sled_id); +ON omicron.public.vmm (instance_id) STORING (sled_id); diff --git a/schema/crdb/dbinit.sql b/schema/crdb/dbinit.sql index 1f30543f47..fc8ffcab01 100644 --- a/schema/crdb/dbinit.sql +++ b/schema/crdb/dbinit.sql @@ -3783,13 +3783,15 @@ CREATE INDEX IF NOT EXISTS active_vmm ON omicron.public.vmm (time_deleted, sled_id, instance_id); CREATE INDEX IF NOT EXISTS v2p_mapping_details -ON network_interface (time_deleted, kind, subnet_id, vpc_id, parent_id) STORING (mac, ip); +ON omicron.public.network_interface ( + time_deleted, kind, subnet_id, vpc_id, parent_id +) STORING (mac, ip); CREATE INDEX IF NOT EXISTS sled_by_policy -ON sled (sled_policy) STORING (ip, sled_state); +ON omicron.public.sled (sled_policy) STORING (ip, sled_state); CREATE INDEX IF NOT EXISTS vmm_by_instance_id -ON vmm (instance_id) STORING (sled_id); +ON omicron.public.vmm (instance_id) STORING (sled_id); /* * Metadata for the schema itself. This version number isn't great, as there's From a1ba8bbebf521538fb2e508dfcb968cd0a8fd2cf Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 3 May 2024 20:11:24 +0000 Subject: [PATCH 13/26] pr review fixes --- dev-tools/oxlog/src/bin/oxlog.rs | 2 +- illumos-utils/src/opte/port_manager.rs | 26 ++++++++++--------- .../src/db/datastore/network_interface.rs | 2 +- nexus/src/app/background/v2p_mappings.rs | 17 +++++++++--- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/dev-tools/oxlog/src/bin/oxlog.rs b/dev-tools/oxlog/src/bin/oxlog.rs index ceeb98b3bd..ed1c1a1fc8 100644 --- a/dev-tools/oxlog/src/bin/oxlog.rs +++ b/dev-tools/oxlog/src/bin/oxlog.rs @@ -47,7 +47,7 @@ struct FilterArgs { #[arg(short, long)] archived: bool, - // Print only the extra log files + /// Print only the extra log files #[arg(short, long)] extra: bool, diff --git a/illumos-utils/src/opte/port_manager.rs b/illumos-utils/src/opte/port_manager.rs index 4b3e5dfe56..26c78edd82 100644 --- a/illumos-utils/src/opte/port_manager.rs +++ b/illumos-utils/src/opte/port_manager.rs @@ -582,16 +582,18 @@ impl PortManager { let mut mappings: Vec<_> = vec![]; for mapping in v2p.mappings { + let vni = mapping + .vni + .as_u32() + .try_into() + .expect("opte VNI should be 24 bits"); + for entry in mapping.ip4 { mappings.push(VirtualNetworkInterfaceHost { virtual_ip: IpAddr::V4(entry.0.into()), virtual_mac: MacAddr6::from(entry.1.ether.bytes()).into(), physical_host_ip: entry.1.ip.into(), - vni: mapping - .vni - .as_u32() - .try_into() - .expect("opte VNI should be 24 bits"), + vni, }); } @@ -600,11 +602,7 @@ impl PortManager { virtual_ip: IpAddr::V6(entry.0.into()), virtual_mac: MacAddr6::from(entry.1.ether.bytes()).into(), physical_host_ip: entry.1.ip.into(), - vni: mapping - .vni - .as_u32() - .try_into() - .expect("opte VNI should be 24 bits"), + vni, }); } } @@ -694,9 +692,13 @@ impl PortManager { #[cfg(not(target_os = "illumos"))] pub fn unset_virtual_nic_host( &self, - _mapping: &VirtualNetworkInterfaceHost, + mapping: &VirtualNetworkInterfaceHost, ) -> Result<(), Error> { - info!(self.inner.log, "Ignoring unset of virtual NIC mapping"); + info!( + self.inner.log, + "Ignoring unset of virtual NIC mapping"; + "mapping" => ?&mapping, + ); Ok(()) } } diff --git a/nexus/db-queries/src/db/datastore/network_interface.rs b/nexus/db-queries/src/db/datastore/network_interface.rs index cd8418e155..da1d1bc7e4 100644 --- a/nexus/db-queries/src/db/datastore/network_interface.rs +++ b/nexus/db-queries/src/db/datastore/network_interface.rs @@ -792,7 +792,7 @@ impl DataStore { /// latency-sensitive contexts, but it can make sense in saga actions or /// background tasks. /// - /// This particular method was add for propagating v2p mappings via RPWs + /// This particular method was added for propagating v2p mappings via RPWs pub async fn instance_network_interfaces_all_list_batched( &self, opctx: &OpContext, diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs index 2613f1972d..dcd794a288 100644 --- a/nexus/src/app/background/v2p_mappings.rs +++ b/nexus/src/app/background/v2p_mappings.rs @@ -98,8 +98,13 @@ impl BackgroundTask for V2PManager { .collect(); for (sled, client) in sled_clients { + // // Get the current mappings on each sled - // Ignore vopte interfaces that are used for services + // Ignore vopte interfaces that are used for services. Service zones only need + // an opte interface for external communication. For services zones, intra-sled + // communication is facilitated via zone underlay interfaces / addresses, + // not opte interfaces / v2p mappings. + // let found_v2p: HashSet = match client.list_v2p().await { Ok(v) => v.into_inner(), Err(e) => { @@ -119,6 +124,12 @@ impl BackgroundTask for V2PManager { let v2p_to_del: Vec<_> = found_v2p.difference(&desired_v2p).collect(); + // + // Generally, we delete stale entries before adding new entries in RPWs to prevent stale entries + // from causing a conflict with an incoming entry. In the case of opte it doesn't matter which + // order we perform the next two steps in, since conflicting stale entries are overwritten by the + // incoming entries. + // info!(&log, "v2p mappings to delete"; "sled" => sled.serial_number(), "mappings" => ?v2p_to_del); for mapping in v2p_to_del { if let Err(e) = client.del_v2p(&mapping).await { @@ -126,7 +137,7 @@ impl BackgroundTask for V2PManager { &log, "failed to delete v2p mapping from sled"; "sled" => sled.serial_number(), - "mappng" => ?mapping, + "mapping" => ?mapping, "error" => ?e, ); } @@ -139,7 +150,7 @@ impl BackgroundTask for V2PManager { &log, "failed to add v2p mapping to sled"; "sled" => sled.serial_number(), - "mappng" => ?mapping, + "mapping" => ?mapping, "error" => ?e, ); } From f12eff63c384967dfec9065a2f31ba64efcba95d Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 3 May 2024 20:12:04 +0000 Subject: [PATCH 14/26] bump vdev size so we can not hit crucible errors when deploying to workstations --- tools/virtual_hardware.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtual_hardware.sh b/tools/virtual_hardware.sh index 33b52577b1..294ba81ee4 100755 --- a/tools/virtual_hardware.sh +++ b/tools/virtual_hardware.sh @@ -37,7 +37,7 @@ function ensure_vdevs { echo "Device: [$VDEV]" VDEV_PATH="${VDEV_DIR:-/var/tmp}/$VDEV" if ! [[ -f "$VDEV_PATH" ]]; then - dd if=/dev/zero of="$VDEV_PATH" bs=1 count=0 seek=20G + dd if=/dev/zero of="$VDEV_PATH" bs=1 count=0 seek=60G fi success "vdev $VDEV_PATH exists" done From 9e9ba7f4e7496915d5161aeceb7679b2c1597518 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Mon, 6 May 2024 20:37:34 +0000 Subject: [PATCH 15/26] post-rebase updates --- clients/sled-agent-client/src/lib.rs | 2 +- dev-tools/omdb/tests/successes.out | 2 +- nexus/src/app/background/v2p_mappings.rs | 6 +- nexus/src/app/instance.rs | 4 + nexus/src/app/instance_network.rs | 312 +-------- nexus/tests/integration_tests/instances.rs | 50 +- openapi/sled-agent.json | 636 +----------------- .../tests/output/self-stat-schema.json | 6 +- sled-agent/src/sim/http_entrypoints.rs | 1 - 9 files changed, 64 insertions(+), 955 deletions(-) diff --git a/clients/sled-agent-client/src/lib.rs b/clients/sled-agent-client/src/lib.rs index 0b748b876a..94a5ccadf2 100644 --- a/clients/sled-agent-client/src/lib.rs +++ b/clients/sled-agent-client/src/lib.rs @@ -12,7 +12,6 @@ use std::fmt; use std::hash::Hash; use std::net::IpAddr; use std::net::SocketAddr; -use types::VirtualNetworkInterfaceHost; use uuid::Uuid; progenitor::generate_api!( @@ -36,6 +35,7 @@ progenitor::generate_api!( PortConfigV1 = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] }, RouteConfig = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] }, IpNet = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] }, + VirtualNetworkInterfaceHost = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] }, }, //TODO trade the manual transformations later in this file for the // replace directives below? diff --git a/dev-tools/omdb/tests/successes.out b/dev-tools/omdb/tests/successes.out index 6c31f682ea..ef751785c3 100644 --- a/dev-tools/omdb/tests/successes.out +++ b/dev-tools/omdb/tests/successes.out @@ -462,7 +462,7 @@ warning: unknown background task: "switch_port_config_manager" (don't know how t task: "v2p_manager" configured period: every 30s currently executing: no - last completed activation: iter 2, triggered by an explicit signal + last completed activation: , triggered by an explicit signal started at (s ago) and ran for ms warning: unknown background task: "v2p_manager" (don't know how to interpret details: Object {}) diff --git a/nexus/src/app/background/v2p_mappings.rs b/nexus/src/app/background/v2p_mappings.rs index dcd794a288..a53ac3442f 100644 --- a/nexus/src/app/background/v2p_mappings.rs +++ b/nexus/src/app/background/v2p_mappings.rs @@ -5,7 +5,9 @@ use futures::FutureExt; use nexus_db_model::{Sled, SledState}; use nexus_db_queries::{context::OpContext, db::DataStore}; use nexus_networking::sled_client_from_address; -use nexus_types::{external_api::views::SledPolicy, identity::Asset}; +use nexus_types::{ + deployment::SledFilter, external_api::views::SledPolicy, identity::Asset, +}; use omicron_common::api::external::Vni; use serde_json::json; use sled_agent_client::types::VirtualNetworkInterfaceHost; @@ -42,7 +44,7 @@ impl BackgroundTask for V2PManager { // Get sleds // we only care about sleds that are active && inservice - let sleds = match self.datastore.sled_list_all_batched(opctx).await + let sleds = match self.datastore.sled_list_all_batched(opctx, SledFilter::InService).await { Ok(v) => v, Err(e) => { diff --git a/nexus/src/app/instance.rs b/nexus/src/app/instance.rs index b64757b690..9d133b2d49 100644 --- a/nexus/src/app/instance.rs +++ b/nexus/src/app/instance.rs @@ -4,6 +4,7 @@ //! Virtual Machine Instances +use super::background::BackgroundTasks; use super::MAX_DISKS_PER_INSTANCE; use super::MAX_EPHEMERAL_IPS_PER_INSTANCE; use super::MAX_EXTERNAL_IPS_PER_INSTANCE; @@ -1522,6 +1523,7 @@ impl super::Nexus { &self.log, instance_id, new_runtime_state, + &self.background_tasks, ) .await } @@ -1962,6 +1964,7 @@ pub(crate) async fn notify_instance_updated( log: &slog::Logger, instance_id: &Uuid, new_runtime_state: &nexus::SledInstanceState, + background_tasks: &BackgroundTasks, ) -> Result<(), Error> { let propolis_id = new_runtime_state.propolis_id; @@ -2000,6 +2003,7 @@ pub(crate) async fn notify_instance_updated( &authz_instance, db_instance.runtime(), &new_runtime_state.instance_state, + background_tasks, ) .await?; diff --git a/nexus/src/app/instance_network.rs b/nexus/src/app/instance_network.rs index 257d6c6e5e..c1318a46ea 100644 --- a/nexus/src/app/instance_network.rs +++ b/nexus/src/app/instance_network.rs @@ -17,8 +17,6 @@ use nexus_db_queries::context::OpContext; use nexus_db_queries::db; use nexus_db_queries::db::lookup::LookupPath; use nexus_db_queries::db::DataStore; -use nexus_types::deployment::SledFilter; -use omicron_common::api::external::DataPageParams; use omicron_common::api::external::Error; use omicron_common::api::external::Ipv4Net; use omicron_common::api::external::Ipv6Net; @@ -29,6 +27,8 @@ use std::collections::HashSet; use std::str::FromStr; use uuid::Uuid; +use super::background::BackgroundTasks; + impl super::Nexus { /// Returns the set of switches with uplinks configured and boundary /// services enabled. @@ -39,41 +39,6 @@ impl super::Nexus { boundary_switches(&self.db_datastore, opctx).await } - /// Ensures that V2P mappings exist that indicate that the instance with ID - /// `instance_id` is resident on the sled with ID `sled_id`. - pub(crate) async fn create_instance_v2p_mappings( - &self, - opctx: &OpContext, - instance_id: Uuid, - sled_id: Uuid, - ) -> Result<(), Error> { - create_instance_v2p_mappings( - &self.db_datastore, - &self.log, - opctx, - &self.opctx_alloc, - instance_id, - sled_id, - ) - .await - } - - /// Ensure that the necessary v2p mappings for an instance are deleted - pub(crate) async fn delete_instance_v2p_mappings( - &self, - opctx: &OpContext, - instance_id: Uuid, - ) -> Result<(), Error> { - delete_instance_v2p_mappings( - &self.db_datastore, - &self.log, - opctx, - &self.opctx_alloc, - instance_id, - ) - .await - } - /// Ensures that the Dendrite configuration for the supplied instance is /// up-to-date. /// @@ -235,6 +200,7 @@ impl super::Nexus { opctx, &self.opctx_alloc, probe_id, + &self.background_tasks, ) .await } @@ -299,6 +265,7 @@ pub(crate) async fn ensure_updated_instance_network_config( authz_instance: &authz::Instance, prev_instance_state: &db::model::InstanceRuntimeState, new_instance_state: &nexus::InstanceRuntimeState, + background_tasks: &BackgroundTasks, ) -> Result<(), Error> { let instance_id = authz_instance.id(); @@ -329,6 +296,7 @@ pub(crate) async fn ensure_updated_instance_network_config( opctx, opctx_alloc, authz_instance, + background_tasks, ) .await?; return Ok(()); @@ -408,15 +376,7 @@ pub(crate) async fn ensure_updated_instance_network_config( Err(e) => return Err(e), }; - create_instance_v2p_mappings( - datastore, - log, - opctx, - opctx_alloc, - instance_id, - new_sled_id, - ) - .await?; + background_tasks.activate(&background_tasks.task_v2p_manager); let (.., sled) = LookupPath::new(opctx, datastore).sled_id(new_sled_id).fetch().await?; @@ -736,15 +696,9 @@ async fn clear_instance_networking_state( opctx: &OpContext, opctx_alloc: &OpContext, authz_instance: &authz::Instance, + background_tasks: &BackgroundTasks, ) -> Result<(), Error> { - delete_instance_v2p_mappings( - datastore, - log, - opctx, - opctx_alloc, - authz_instance.id(), - ) - .await?; + background_tasks.activate(&background_tasks.task_v2p_manager); instance_delete_dpd_config( datastore, @@ -767,253 +721,6 @@ async fn clear_instance_networking_state( .await } -/// Ensures that V2P mappings exist that indicate that the instance with ID -/// `instance_id` is resident on the sled with ID `sled_id`. -pub(crate) async fn create_instance_v2p_mappings( - datastore: &DataStore, - log: &slog::Logger, - opctx: &OpContext, - opctx_alloc: &OpContext, - instance_id: Uuid, - sled_id: Uuid, -) -> Result<(), Error> { - info!(log, "creating V2P mappings for instance"; - "instance_id" => %instance_id, - "sled_id" => %sled_id); - - // For every sled that isn't the sled this instance was allocated to, create - // a virtual to physical mapping for each of this instance's NICs. - // - // For the mappings to be correct, a few invariants must hold: - // - // - mappings must be set whenever an instance's sled changes (eg. - // during instance creation, migration, stop + start) - // - // - an instances' sled must not change while its corresponding mappings - // are being created - // - // - the same mapping creation must be broadcast to all sleds - // - // A more targeted approach would be to see what other instances share - // the VPC this instance is in (or more generally, what instances should - // have connectivity to this one), see what sleds those are allocated - // to, and only create V2P mappings for those sleds. - // - // There's additional work with this approach: - // - // - it means that delete calls are required as well as set calls, - // meaning that now the ordering of those matters (this may also - // necessitate a generation number for V2P mappings) - // - // - V2P mappings have to be bidirectional in order for both instances's - // packets to make a round trip. This isn't a problem with the - // broadcast approach because one of the sides will exist already, but - // it is something to orchestrate with a more targeted approach. - // - // TODO-correctness Default firewall rules currently will block - // instances in different VPCs from connecting to each other. If it ever - // stops doing this, the broadcast approach will create V2P mappings - // that shouldn't exist. - let (.., authz_instance) = LookupPath::new(&opctx, &datastore) - .instance_id(instance_id) - .lookup_for(authz::Action::Read) - .await?; - - let instance_nics = datastore - .derive_guest_network_interface_info(&opctx, &authz_instance) - .await?; - - // Look up the supplied sled's physical host IP. - let physical_host_ip = - nexus_networking::sled_lookup(&datastore, &opctx_alloc, sled_id)? - .fetch() - .await? - .1 - .ip - .into(); - - let mut last_sled_id: Option = None; - loop { - let pagparams = DataPageParams { - marker: last_sled_id.as_ref(), - direction: dropshot::PaginationOrder::Ascending, - limit: std::num::NonZeroU32::new(10).unwrap(), - }; - - let sleds_page = datastore - // XXX: InService might not be exactly correct - .sled_list(&opctx_alloc, &pagparams, SledFilter::InService) - .await?; - let mut join_handles = - Vec::with_capacity(sleds_page.len() * instance_nics.len()); - - for sled in &sleds_page { - // set_v2p not required for sled instance was allocated to, OPTE - // currently does that automatically - // - // TODO(#3107): Remove this when XDE stops creating mappings - // implicitly. - if sled.id() == sled_id { - continue; - } - - for nic in &instance_nics { - let client = nexus_networking::sled_client( - datastore, - opctx_alloc, - sled.id(), - log, - ) - .await?; - let nic_id = nic.id; - let mapping = SetVirtualNetworkInterfaceHost { - virtual_ip: nic.ip, - virtual_mac: nic.mac, - physical_host_ip, - vni: nic.vni, - }; - - let log = log.clone(); - - // This function is idempotent: calling the set_v2p ioctl with - // the same information is a no-op. - join_handles.push(tokio::spawn(futures::future::lazy( - move |_ctx| async move { - retry_until_known_result(&log, || async { - client.set_v2p(&nic_id, &mapping).await - }) - .await - }, - ))); - } - } - - // Concurrently run each future to completion, but return the last - // error seen. - let mut error = None; - for join_handle in join_handles { - let result = join_handle - .await - .map_err(|e| Error::internal_error(&e.to_string()))? - .await; - - if result.is_err() { - error!(log, "{:?}", result); - error = Some(result); - } - } - if let Some(e) = error { - return e.map(|_| ()).map_err(|e| e.into()); - } - - if sleds_page.len() < 10 { - break; - } - - if let Some(last) = sleds_page.last() { - last_sled_id = Some(last.id()); - } - } - - Ok(()) -} - -/// Ensure that the necessary v2p mappings for an instance are deleted -pub(crate) async fn delete_instance_v2p_mappings( - datastore: &DataStore, - log: &slog::Logger, - opctx: &OpContext, - opctx_alloc: &OpContext, - instance_id: Uuid, -) -> Result<(), Error> { - // For every sled that isn't the sled this instance was allocated to, delete - // the virtual to physical mapping for each of this instance's NICs. If - // there isn't a V2P mapping, del_v2p should be a no-op. - let (.., authz_instance) = LookupPath::new(&opctx, datastore) - .instance_id(instance_id) - .lookup_for(authz::Action::Read) - .await?; - - let instance_nics = datastore - .derive_guest_network_interface_info(&opctx, &authz_instance) - .await?; - - let mut last_sled_id: Option = None; - - loop { - let pagparams = DataPageParams { - marker: last_sled_id.as_ref(), - direction: dropshot::PaginationOrder::Ascending, - limit: std::num::NonZeroU32::new(10).unwrap(), - }; - - let sleds_page = datastore - // XXX: InService might not be exactly correct - .sled_list(&opctx_alloc, &pagparams, SledFilter::InService) - .await?; - let mut join_handles = - Vec::with_capacity(sleds_page.len() * instance_nics.len()); - - for sled in &sleds_page { - for nic in &instance_nics { - let client = nexus_networking::sled_client( - &datastore, - &opctx_alloc, - sled.id(), - &log, - ) - .await?; - let nic_id = nic.id; - let mapping = DeleteVirtualNetworkInterfaceHost { - virtual_ip: nic.ip, - vni: nic.vni, - }; - - let log = log.clone(); - - // This function is idempotent: calling the set_v2p ioctl with - // the same information is a no-op. - join_handles.push(tokio::spawn(futures::future::lazy( - move |_ctx| async move { - retry_until_known_result(&log, || async { - client.del_v2p(&nic_id, &mapping).await - }) - .await - }, - ))); - } - } - - // Concurrently run each future to completion, but return the last - // error seen. - let mut error = None; - for join_handle in join_handles { - let result = join_handle - .await - .map_err(|e| Error::internal_error(&e.to_string()))? - .await; - - if result.is_err() { - error!(log, "{:?}", result); - error = Some(result); - } - } - if let Some(e) = error { - return e.map(|_| ()).map_err(|e| e.into()); - } - - if sleds_page.len() < 10 { - break; - } - - if let Some(last) = sleds_page.last() { - last_sled_id = Some(last.id()); - } - } - - Ok(()) -} - /// Attempts to delete all of the Dendrite NAT configuration for the /// instance identified by `authz_instance`. /// @@ -1079,6 +786,7 @@ pub(crate) async fn probe_delete_dpd_config( opctx: &OpContext, opctx_alloc: &OpContext, probe_id: Uuid, + background_tasks: &BackgroundTasks, ) -> Result<(), Error> { info!(log, "deleting probe dpd configuration"; "probe_id" => %probe_id); @@ -1135,7 +843,7 @@ pub(crate) async fn probe_delete_dpd_config( } }; - self.background_tasks.activate(&self.background_tasks.task_v2p_manager); + background_tasks.activate(&background_tasks.task_v2p_manager); // Notify dendrite that there are changes for it to reconcile. // In the event of a failure to notify dendrite, we'll log an error // and rely on dendrite's RPW timer to catch it up. diff --git a/nexus/tests/integration_tests/instances.rs b/nexus/tests/integration_tests/instances.rs index 942ff54cd4..e484fc1008 100644 --- a/nexus/tests/integration_tests/instances.rs +++ b/nexus/tests/integration_tests/instances.rs @@ -66,6 +66,7 @@ use omicron_nexus::app::MIN_MEMORY_BYTES_PER_INSTANCE; use omicron_nexus::Nexus; use omicron_nexus::TestInterfaces as _; use omicron_sled_agent::sim::SledAgent; +use omicron_test_utils::dev::poll::wait_for_condition; use sled_agent_client::TestInterfaces as _; use std::convert::TryFrom; use std::net::Ipv4Addr; @@ -4541,8 +4542,21 @@ async fn test_instance_v2p_mappings(cptestctx: &ControlPlaneTestContext) { // Validate that every sled no longer has the V2P mapping for this instance for sled_agent in &sled_agents { - let v2p_mappings = sled_agent.v2p_mappings.lock().await; - assert!(v2p_mappings.is_empty()); + let condition = || async { + let v2p_mappings = sled_agent.v2p_mappings.lock().await; + if v2p_mappings.is_empty() { + Ok(()) + } else { + Err(CondCheckError::Failed("v2p mappings are still present")) + } + }; + wait_for_condition( + condition, + &Duration::from_secs(1), + &Duration::from_secs(3), + ) + .await + .expect("v2p mappings should be empty"); } } @@ -4639,14 +4653,30 @@ async fn assert_sled_v2p_mappings( nic: &InstanceNetworkInterface, vni: Vni, ) { - let v2p_mappings = sled_agent.v2p_mappings.lock().await; - let mapping = v2p_mappings.iter().find(|mapping| { - mapping.virtual_ip == nic.ip - && mapping.virtual_mac == nic.mac - && mapping.physical_host_ip == sled_agent.ip - && mapping.vni == vni - }); - assert!(mapping.is_some()) + let condition = || async { + let v2p_mappings = sled_agent.v2p_mappings.lock().await; + let mapping = v2p_mappings.iter().find(|mapping| { + mapping.virtual_ip == nic.ip + && mapping.virtual_mac == nic.mac + && mapping.physical_host_ip == sled_agent.ip + && mapping.vni == vni + }); + + if mapping.is_some() { + Ok(()) + } else { + Err(CondCheckError::Failed( + "matching v2p mapping should be present", + )) + } + }; + wait_for_condition( + condition, + &Duration::from_secs(1), + &Duration::from_secs(3), + ) + .await + .expect("matching v2p mapping should be present"); } /// Simulate completion of an ongoing instance state transition. To do this, we diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json index 8e0c10a515..db0264e6c6 100644 --- a/openapi/sled-agent.json +++ b/openapi/sled-agent.json @@ -1996,640 +1996,6 @@ "target" ] }, - "Cumulativedouble": { - "description": "A cumulative or counter data type.", - "type": "object", - "properties": { - "start_time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "number", - "format": "double" - } - }, - "required": [ - "start_time", - "value" - ] - }, - "Cumulativefloat": { - "description": "A cumulative or counter data type.", - "type": "object", - "properties": { - "start_time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "number", - "format": "float" - } - }, - "required": [ - "start_time", - "value" - ] - }, - "Cumulativeint64": { - "description": "A cumulative or counter data type.", - "type": "object", - "properties": { - "start_time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "integer", - "format": "int64" - } - }, - "required": [ - "start_time", - "value" - ] - }, - "Cumulativeuint64": { - "description": "A cumulative or counter data type.", - "type": "object", - "properties": { - "start_time": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "integer", - "format": "uint64", - "minimum": 0 - } - }, - "required": [ - "start_time", - "value" - ] - }, - "Datum": { - "description": "A `Datum` is a single sampled data point from a metric.", - "oneOf": [ - { - "type": "object", - "properties": { - "datum": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "bool" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "int8" - }, - "type": { - "type": "string", - "enum": [ - "i8" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "uint8", - "minimum": 0 - }, - "type": { - "type": "string", - "enum": [ - "u8" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "int16" - }, - "type": { - "type": "string", - "enum": [ - "i16" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "uint16", - "minimum": 0 - }, - "type": { - "type": "string", - "enum": [ - "u16" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "int32" - }, - "type": { - "type": "string", - "enum": [ - "i32" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "uint32", - "minimum": 0 - }, - "type": { - "type": "string", - "enum": [ - "u32" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string", - "enum": [ - "i64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "type": { - "type": "string", - "enum": [ - "u64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "number", - "format": "float" - }, - "type": { - "type": "string", - "enum": [ - "f32" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "number", - "format": "double" - }, - "type": { - "type": "string", - "enum": [ - "f64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "string" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0 - } - }, - "type": { - "type": "string", - "enum": [ - "bytes" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Cumulativeint64" - }, - "type": { - "type": "string", - "enum": [ - "cumulative_i64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Cumulativeuint64" - }, - "type": { - "type": "string", - "enum": [ - "cumulative_u64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Cumulativefloat" - }, - "type": { - "type": "string", - "enum": [ - "cumulative_f32" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Cumulativedouble" - }, - "type": { - "type": "string", - "enum": [ - "cumulative_f64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramint8" - }, - "type": { - "type": "string", - "enum": [ - "histogram_i8" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramuint8" - }, - "type": { - "type": "string", - "enum": [ - "histogram_u8" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramint16" - }, - "type": { - "type": "string", - "enum": [ - "histogram_i16" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramuint16" - }, - "type": { - "type": "string", - "enum": [ - "histogram_u16" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramint32" - }, - "type": { - "type": "string", - "enum": [ - "histogram_i32" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramuint32" - }, - "type": { - "type": "string", - "enum": [ - "histogram_u32" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramint64" - }, - "type": { - "type": "string", - "enum": [ - "histogram_i64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramuint64" - }, - "type": { - "type": "string", - "enum": [ - "histogram_u64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramfloat" - }, - "type": { - "type": "string", - "enum": [ - "histogram_f32" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/Histogramdouble" - }, - "type": { - "type": "string", - "enum": [ - "histogram_f64" - ] - } - }, - "required": [ - "datum", - "type" - ] - }, - { - "type": "object", - "properties": { - "datum": { - "$ref": "#/components/schemas/MissingDatum" - }, - "type": { - "type": "string", - "enum": [ - "missing" - ] - } - }, - "required": [ - "datum", - "type" - ] - } - ] - }, - "DatumType": { - "description": "The type of an individual datum of a metric.", - "type": "string", - "enum": [ - "bool", - "i8", - "u8", - "i16", - "u16", - "i32", - "u32", - "i64", - "u64", - "f32", - "f64", - "string", - "bytes", - "cumulative_i64", - "cumulative_u64", - "cumulative_f32", - "cumulative_f64", - "histogram_i8", - "histogram_u8", - "histogram_i16", - "histogram_u16", - "histogram_i32", - "histogram_u32", - "histogram_i64", - "histogram_u64", - "histogram_f32", - "histogram_f64" - ] - }, "DhcpConfig": { "description": "DHCP configuration for a port\n\nNot present here: Hostname (DHCPv4 option 12; used in DHCPv6 option 39); we use `InstanceRuntimeState::hostname` for this value.", "type": "object", @@ -5588,4 +4954,4 @@ } } } -} +} \ No newline at end of file diff --git a/oximeter/collector/tests/output/self-stat-schema.json b/oximeter/collector/tests/output/self-stat-schema.json index 4851960358..cd4bd9e55a 100644 --- a/oximeter/collector/tests/output/self-stat-schema.json +++ b/oximeter/collector/tests/output/self-stat-schema.json @@ -39,7 +39,7 @@ } ], "datum_type": "cumulative_u64", - "created": "2024-05-03T22:37:51.326086935Z" + "created": "2024-05-06T18:20:25.527855554Z" }, "oximeter_collector:failed_collections": { "timeseries_name": "oximeter_collector:failed_collections", @@ -86,6 +86,6 @@ } ], "datum_type": "cumulative_u64", - "created": "2024-05-03T22:37:51.327389025Z" + "created": "2024-05-06T18:20:25.530203483Z" } -} +} \ No newline at end of file diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index fbb71b133f..5b86f3854f 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -21,7 +21,6 @@ use dropshot::Path; use dropshot::RequestContext; use dropshot::TypedBody; use illumos_utils::opte::params::VirtualNetworkInterfaceHost; -use ipnetwork::Ipv6Network; use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::api::internal::nexus::SledInstanceState; use omicron_common::api::internal::nexus::UpdateArtifactId; From 33ba7df9646f0d36ec65e0cde602e6b587dceeb1 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Mon, 6 May 2024 20:48:10 +0000 Subject: [PATCH 16/26] bump opte version in deploy task --- .github/buildomat/jobs/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/buildomat/jobs/deploy.sh b/.github/buildomat/jobs/deploy.sh index 8d3e94cd5e..867e88bb49 100755 --- a/.github/buildomat/jobs/deploy.sh +++ b/.github/buildomat/jobs/deploy.sh @@ -2,7 +2,7 @@ #: #: name = "helios / deploy" #: variety = "basic" -#: target = "lab-2.0-opte-0.28" +#: target = "lab-2.0-opte-0.29" #: output_rules = [ #: "%/var/svc/log/oxide-sled-agent:default.log*", #: "%/zone/oxz_*/root/var/svc/log/oxide-*.log*", From d5503262062249c9dec17468de60581e47a5e679 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Mon, 6 May 2024 21:33:25 +0000 Subject: [PATCH 17/26] feed clippy --- nexus/src/app/instance.rs | 41 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/nexus/src/app/instance.rs b/nexus/src/app/instance.rs index 9d133b2d49..78f24b9bab 100644 --- a/nexus/src/app/instance.rs +++ b/nexus/src/app/instance.rs @@ -4,7 +4,6 @@ //! Virtual Machine Instances -use super::background::BackgroundTasks; use super::MAX_DISKS_PER_INSTANCE; use super::MAX_EPHEMERAL_IPS_PER_INSTANCE; use super::MAX_EXTERNAL_IPS_PER_INSTANCE; @@ -16,6 +15,7 @@ use super::MIN_MEMORY_BYTES_PER_INSTANCE; use crate::app::sagas; use crate::cidata::InstanceCiData; use crate::external_api::params; +use crate::Nexus; use cancel_safe_futures::prelude::*; use futures::future::Fuse; use futures::{FutureExt, SinkExt, StreamExt}; @@ -29,7 +29,6 @@ use nexus_db_queries::db::datastore::InstanceAndActiveVmm; use nexus_db_queries::db::identity::Resource; use nexus_db_queries::db::lookup; use nexus_db_queries::db::lookup::LookupPath; -use nexus_db_queries::db::DataStore; use nexus_types::external_api::views; use omicron_common::api::external::http_pagination::PaginatedBy; use omicron_common::api::external::ByteCount; @@ -1516,14 +1515,11 @@ impl super::Nexus { new_runtime_state: &nexus::SledInstanceState, ) -> Result<(), Error> { notify_instance_updated( - &self.db_datastore, + &self, &self.resolver().await, - &self.opctx_alloc, opctx, - &self.log, instance_id, new_runtime_state, - &self.background_tasks, ) .await } @@ -1957,14 +1953,11 @@ impl super::Nexus { /// Invoked by a sled agent to publish an updated runtime state for an /// Instance. pub(crate) async fn notify_instance_updated( - datastore: &DataStore, + Nexus { db_datastore, opctx_alloc, log, background_tasks, .. }: &Nexus, resolver: &internal_dns::resolver::Resolver, - opctx_alloc: &OpContext, opctx: &OpContext, - log: &slog::Logger, instance_id: &Uuid, new_runtime_state: &nexus::SledInstanceState, - background_tasks: &BackgroundTasks, ) -> Result<(), Error> { let propolis_id = new_runtime_state.propolis_id; @@ -1976,10 +1969,11 @@ pub(crate) async fn notify_instance_updated( // Grab the current state of the instance in the DB to reason about // whether this update is stale or not. - let (.., authz_instance, db_instance) = LookupPath::new(&opctx, &datastore) - .instance_id(*instance_id) - .fetch() - .await?; + let (.., authz_instance, db_instance) = + LookupPath::new(&opctx, &db_datastore) + .instance_id(*instance_id) + .fetch() + .await?; // Update OPTE and Dendrite if the instance's active sled assignment // changed or a migration was retired. If these actions fail, sled agent @@ -1995,7 +1989,7 @@ pub(crate) async fn notify_instance_updated( // In the future, this should be replaced by a call to trigger a // networking state update RPW. super::instance_network::ensure_updated_instance_network_config( - datastore, + db_datastore, log, resolver, opctx, @@ -2018,7 +2012,7 @@ pub(crate) async fn notify_instance_updated( // will try to create its own virtual provisioning charges, which will // race with this operation. if new_runtime_state.instance_state.propolis_id.is_none() { - datastore + db_datastore .virtual_provisioning_collection_delete_instance( opctx, *instance_id, @@ -2042,15 +2036,20 @@ pub(crate) async fn notify_instance_updated( // an instance's state changes. // // Tracked in https://github.com/oxidecomputer/omicron/issues/3742. - super::oximeter::unassign_producer(datastore, log, opctx, instance_id) - .await?; + super::oximeter::unassign_producer( + db_datastore, + log, + opctx, + instance_id, + ) + .await?; } // Write the new instance and VMM states back to CRDB. This needs to be // done before trying to clean up the VMM, since the datastore will only // allow a VMM to be marked as deleted if it is already in a terminal // state. - let result = datastore + let result = db_datastore .instance_and_vmm_update_runtime( instance_id, &db::model::InstanceRuntimeState::from( @@ -2089,9 +2088,9 @@ pub(crate) async fn notify_instance_updated( "instance_id" => %instance_id, "propolis_id" => %propolis_id); - datastore.sled_reservation_delete(opctx, propolis_id).await?; + db_datastore.sled_reservation_delete(opctx, propolis_id).await?; - if !datastore.vmm_mark_deleted(opctx, &propolis_id).await? { + if !db_datastore.vmm_mark_deleted(opctx, &propolis_id).await? { warn!(log, "failed to mark vmm record as deleted"; "instance_id" => %instance_id, "propolis_id" => %propolis_id, From d06ece96a8abb68ae416870b33c96e1e131ae937 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 10 May 2024 23:24:05 +0000 Subject: [PATCH 18/26] pr fixes, bump opte again --- .../src/db/datastore/v2p_mapping.rs | 22 +++++++++++++++++++ package-manifest.toml | 10 ++++----- tools/maghemite_mg_openapi_version | 4 ++-- tools/maghemite_mgd_checksums | 4 ++-- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/nexus/db-queries/src/db/datastore/v2p_mapping.rs b/nexus/db-queries/src/db/datastore/v2p_mapping.rs index 40a9c58537..f53275ba86 100644 --- a/nexus/db-queries/src/db/datastore/v2p_mapping.rs +++ b/nexus/db-queries/src/db/datastore/v2p_mapping.rs @@ -5,8 +5,11 @@ use super::DataStore; use crate::context::OpContext; use crate::db; +use crate::db::datastore::SQL_BATCH_SIZE; use crate::db::error::{public_error_from_diesel, ErrorHandler}; use crate::db::model::V2PMappingView; +use crate::db::pagination::paginated; +use crate::db::pagination::Paginator; use async_bb8_diesel::AsyncRunQueryDsl; use diesel::{QueryDsl, SelectableHelper}; use omicron_common::api::external::ListResultVec; @@ -18,6 +21,25 @@ impl DataStore { ) -> ListResultVec { use db::schema::v2p_mapping_view::dsl; + opctx.check_complex_operations_allowed()?; + + let mut mappings = Vec::new(); + let mut paginator = Paginator::new(SQL_BATCH_SIZE); + while let Some(p) = paginator.next() { + let batch = paginated( + dsl::v2p_mapping_view, + dsl::sled_id, + &p.current_pagparams(), + ) + .select(V2PMappingView::as_select()) + .load_async(&*self.pool_connection_authorized(opctx).await?) + .await + .map_err(|e| public_error_from_diesel(e, ErrorHandler::Server))?; + + paginator = p.found_batch(&batch, &|mapping| mapping.nic_id); + mappings.extend(batch); + } + let results = dsl::v2p_mapping_view .select(V2PMappingView::as_select()) .load_async(&*self.pool_connection_authorized(opctx).await?) diff --git a/package-manifest.toml b/package-manifest.toml index b8c8bfc934..d9054b2f4f 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -533,10 +533,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 = "025389ff39d594bf2b815377e2c1dc4dd23b1f96" +source.commit = "c9378b2762a9d59d83bbbe83e8e02fa64ca81f89" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//maghemite.sha256.txt -source.sha256 = "f2ee54b6a654daa1c1f817440317e9b11c5ddc71249df261bb5cfa0e6057dc24" +source.sha256 = "1ea0e73e149a68bf91b5ce2e0db2a8a1af50dcdbbf381b672aa9ac7e36a3a181" output.type = "tarball" [package.mg-ddm] @@ -549,10 +549,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 = "025389ff39d594bf2b815377e2c1dc4dd23b1f96" +source.commit = "c9378b2762a9d59d83bbbe83e8e02fa64ca81f89" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "bb98815f759f38abee9f5aea0978cd33e66e75079cc8c171036be21bf9049c96" +source.sha256 = "3334b0a9d5956e3117a6b493b9a5a31220391fab1ecbfb3a4bd8e94d7030771a" output.type = "zone" output.intermediate_only = true @@ -564,7 +564,7 @@ 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 = "025389ff39d594bf2b815377e2c1dc4dd23b1f96" +source.commit = "c9378b2762a9d59d83bbbe83e8e02fa64ca81f89" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt source.sha256 = "e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd" diff --git a/tools/maghemite_mg_openapi_version b/tools/maghemite_mg_openapi_version index 1c27c19018..f913e5723a 100644 --- a/tools/maghemite_mg_openapi_version +++ b/tools/maghemite_mg_openapi_version @@ -1,2 +1,2 @@ -COMMIT="6b9c699e5b2091e359bad0f7fe168112d181892d" -SHA2="a5d2f275c99152711dec1df58fd49d459d3fcb8fbfc7a7f48f432be248d74639" +COMMIT="c9378b2762a9d59d83bbbe83e8e02fa64ca81f89" +SHA2="fdb33ee7425923560534672264008ef8948d227afce948ab704de092ad72157c" diff --git a/tools/maghemite_mgd_checksums b/tools/maghemite_mgd_checksums index 9ff18f2a8b..eeb873a424 100644 --- a/tools/maghemite_mgd_checksums +++ b/tools/maghemite_mgd_checksums @@ -1,2 +1,2 @@ -CIDL_SHA256="4526aa3247002df2085b95a88829dae6513c65e2546fa78f64556911bdcad9bc" -MGD_LINUX_SHA256="1b2c2c099e820157e7e038e6ce91c335d69437c714e51e3df4cced72dc60ce5c" +CIDL_SHA256="e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd" +MGD_LINUX_SHA256="903413ddaab89594ed7518cb8f2f27793e96cd17ed2d6b3fe11657ec4375cb19" From 01e84c0caa7b53128c1fd351d294965a417723a3 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Mon, 13 May 2024 21:32:59 +0000 Subject: [PATCH 19/26] pr comment fixes --- nexus/db-queries/src/db/datastore/v2p_mapping.rs | 10 ++-------- nexus/tests/integration_tests/instances.rs | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/nexus/db-queries/src/db/datastore/v2p_mapping.rs b/nexus/db-queries/src/db/datastore/v2p_mapping.rs index f53275ba86..6c00957e7d 100644 --- a/nexus/db-queries/src/db/datastore/v2p_mapping.rs +++ b/nexus/db-queries/src/db/datastore/v2p_mapping.rs @@ -28,7 +28,7 @@ impl DataStore { while let Some(p) = paginator.next() { let batch = paginated( dsl::v2p_mapping_view, - dsl::sled_id, + dsl::nic_id, &p.current_pagparams(), ) .select(V2PMappingView::as_select()) @@ -40,12 +40,6 @@ impl DataStore { mappings.extend(batch); } - let results = dsl::v2p_mapping_view - .select(V2PMappingView::as_select()) - .load_async(&*self.pool_connection_authorized(opctx).await?) - .await - .map_err(|e| public_error_from_diesel(e, ErrorHandler::Server))?; - - Ok(results) + Ok(mappings) } } diff --git a/nexus/tests/integration_tests/instances.rs b/nexus/tests/integration_tests/instances.rs index e484fc1008..e4a03dad31 100644 --- a/nexus/tests/integration_tests/instances.rs +++ b/nexus/tests/integration_tests/instances.rs @@ -4553,7 +4553,7 @@ async fn test_instance_v2p_mappings(cptestctx: &ControlPlaneTestContext) { wait_for_condition( condition, &Duration::from_secs(1), - &Duration::from_secs(3), + &Duration::from_secs(30), ) .await .expect("v2p mappings should be empty"); @@ -4673,7 +4673,7 @@ async fn assert_sled_v2p_mappings( wait_for_condition( condition, &Duration::from_secs(1), - &Duration::from_secs(3), + &Duration::from_secs(30), ) .await .expect("matching v2p mapping should be present"); From 0a279335ee3c300237b49b2bf68df40a37cb941f Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Wed, 15 May 2024 21:26:01 +0000 Subject: [PATCH 20/26] use watcher to trigger v2p rpw --- nexus/src/app/background/init.rs | 6 +++++- nexus/src/app/instance.rs | 4 ++-- nexus/src/app/instance_network.rs | 23 +++++++++++++++++------ nexus/src/app/mod.rs | 7 +++++++ 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/nexus/src/app/background/init.rs b/nexus/src/app/background/init.rs index 015da4c9c0..769338eaf5 100644 --- a/nexus/src/app/background/init.rs +++ b/nexus/src/app/background/init.rs @@ -112,6 +112,10 @@ impl BackgroundTasks { nexus_id: Uuid, resolver: internal_dns::resolver::Resolver, saga_request: Sender, + v2p_watcher: ( + tokio::sync::watch::Sender<()>, + tokio::sync::watch::Receiver<()>, + ), ) -> BackgroundTasks { let mut driver = common::Driver::new(); @@ -340,7 +344,7 @@ impl BackgroundTasks { config.switch_port_settings_manager.period_secs, Box::new(V2PManager::new(datastore.clone())), opctx.child(BTreeMap::new()), - vec![], + vec![Box::new(v2p_watcher.1)], ) }; diff --git a/nexus/src/app/instance.rs b/nexus/src/app/instance.rs index 78f24b9bab..cc2d2e61ed 100644 --- a/nexus/src/app/instance.rs +++ b/nexus/src/app/instance.rs @@ -1953,7 +1953,7 @@ impl super::Nexus { /// Invoked by a sled agent to publish an updated runtime state for an /// Instance. pub(crate) async fn notify_instance_updated( - Nexus { db_datastore, opctx_alloc, log, background_tasks, .. }: &Nexus, + Nexus { db_datastore, opctx_alloc, log, v2p_notification_tx, .. }: &Nexus, resolver: &internal_dns::resolver::Resolver, opctx: &OpContext, instance_id: &Uuid, @@ -1997,7 +1997,7 @@ pub(crate) async fn notify_instance_updated( &authz_instance, db_instance.runtime(), &new_runtime_state.instance_state, - background_tasks, + v2p_notification_tx.clone(), ) .await?; diff --git a/nexus/src/app/instance_network.rs b/nexus/src/app/instance_network.rs index c1318a46ea..e3f6aca24f 100644 --- a/nexus/src/app/instance_network.rs +++ b/nexus/src/app/instance_network.rs @@ -265,7 +265,7 @@ pub(crate) async fn ensure_updated_instance_network_config( authz_instance: &authz::Instance, prev_instance_state: &db::model::InstanceRuntimeState, new_instance_state: &nexus::InstanceRuntimeState, - background_tasks: &BackgroundTasks, + v2p_notification_tx: tokio::sync::watch::Sender<()>, ) -> Result<(), Error> { let instance_id = authz_instance.id(); @@ -296,7 +296,7 @@ pub(crate) async fn ensure_updated_instance_network_config( opctx, opctx_alloc, authz_instance, - background_tasks, + v2p_notification_tx, ) .await?; return Ok(()); @@ -376,7 +376,13 @@ pub(crate) async fn ensure_updated_instance_network_config( Err(e) => return Err(e), }; - background_tasks.activate(&background_tasks.task_v2p_manager); + if let Err(e) = v2p_notification_tx.send(()) { + error!( + log, + "error notifying background task of v2p change"; + "error" => ?e + ) + }; let (.., sled) = LookupPath::new(opctx, datastore).sled_id(new_sled_id).fetch().await?; @@ -691,14 +697,19 @@ pub(crate) async fn probe_ensure_dpd_config( async fn clear_instance_networking_state( datastore: &DataStore, log: &slog::Logger, - resolver: &internal_dns::resolver::Resolver, opctx: &OpContext, opctx_alloc: &OpContext, authz_instance: &authz::Instance, - background_tasks: &BackgroundTasks, + v2p_notification_tx: tokio::sync::watch::Sender<()>, ) -> Result<(), Error> { - background_tasks.activate(&background_tasks.task_v2p_manager); + if let Err(e) = v2p_notification_tx.send(()) { + error!( + log, + "error notifying background task of v2p change"; + "error" => ?e + ) + }; instance_delete_dpd_config( datastore, diff --git a/nexus/src/app/mod.rs b/nexus/src/app/mod.rs index f8cccd89a4..ec6c040356 100644 --- a/nexus/src/app/mod.rs +++ b/nexus/src/app/mod.rs @@ -193,6 +193,9 @@ pub struct Nexus { /// Default Crucible region allocation strategy default_region_allocation_strategy: RegionAllocationStrategy, + + /// Channel for notifying background task of change to opte v2p state + v2p_notification_tx: tokio::sync::watch::Sender<()>, } impl Nexus { @@ -377,6 +380,8 @@ impl Nexus { Arc::clone(&db_datastore), ); + let v2p_watcher_channel = tokio::sync::watch::channel(()); + let (saga_request, mut saga_request_recv) = SagaRequest::channel(); let background_tasks = background::BackgroundTasks::start( @@ -387,6 +392,7 @@ impl Nexus { config.deployment.id, resolver.clone(), saga_request, + v2p_watcher_channel.clone(), ); let external_resolver = { @@ -438,6 +444,7 @@ impl Nexus { .pkg .default_region_allocation_strategy .clone(), + v2p_notification_tx: v2p_watcher_channel.0, }; // TODO-cleanup all the extra Arcs here seems wrong From 0ed9fdc55976a17848c62e47ec07b7b5ba55fd1f Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Thu, 16 May 2024 21:08:18 +0000 Subject: [PATCH 21/26] fixup! WIP: merge main --- nexus/src/app/background/init.rs | 1 + nexus/src/app/background/instance_watcher.rs | 6 ++- nexus/src/app/instance.rs | 41 ++++++++++---------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/nexus/src/app/background/init.rs b/nexus/src/app/background/init.rs index 188bf56c18..7027534202 100644 --- a/nexus/src/app/background/init.rs +++ b/nexus/src/app/background/init.rs @@ -380,6 +380,7 @@ impl BackgroundTasks { resolver.clone(), producer_registry, instance_watcher::WatcherIdentity { nexus_id, rack_id }, + v2p_watcher.0, ); driver.register( "instance_watcher".to_string(), diff --git a/nexus/src/app/background/instance_watcher.rs b/nexus/src/app/background/instance_watcher.rs index 4cdca3c4b7..d473ea8e99 100644 --- a/nexus/src/app/background/instance_watcher.rs +++ b/nexus/src/app/background/instance_watcher.rs @@ -35,6 +35,7 @@ pub(crate) struct InstanceWatcher { resolver: internal_dns::resolver::Resolver, metrics: Arc>, id: WatcherIdentity, + v2p_notification_tx: tokio::sync::watch::Sender<()>, } const MAX_SLED_AGENTS: NonZeroU32 = unsafe { @@ -48,12 +49,13 @@ impl InstanceWatcher { resolver: internal_dns::resolver::Resolver, producer_registry: &ProducerRegistry, id: WatcherIdentity, + v2p_notification_tx: tokio::sync::watch::Sender<()>, ) -> Self { let metrics = Arc::new(Mutex::new(metrics::Metrics::default())); producer_registry .register_producer(metrics::Producer(metrics.clone())) .unwrap(); - Self { datastore, resolver, metrics, id } + Self { datastore, resolver, metrics, id, v2p_notification_tx } } fn check_instance( @@ -73,6 +75,7 @@ impl InstanceWatcher { .collect(), ); let client = client.clone(); + let v2p_notification_tx = self.v2p_notification_tx.clone(); async move { slog::trace!(opctx.log, "checking on instance..."); @@ -153,6 +156,7 @@ impl InstanceWatcher { &opctx.log, &target.instance_id, &new_runtime_state, + v2p_notification_tx, ) .await .map_err(|e| { diff --git a/nexus/src/app/instance.rs b/nexus/src/app/instance.rs index 88bf901177..63b080b436 100644 --- a/nexus/src/app/instance.rs +++ b/nexus/src/app/instance.rs @@ -15,7 +15,6 @@ use super::MIN_MEMORY_BYTES_PER_INSTANCE; use crate::app::sagas; use crate::cidata::InstanceCiData; use crate::external_api::params; -use crate::Nexus; use cancel_safe_futures::prelude::*; use futures::future::Fuse; use futures::{FutureExt, SinkExt, StreamExt}; @@ -29,6 +28,7 @@ use nexus_db_queries::db::datastore::InstanceAndActiveVmm; use nexus_db_queries::db::identity::Resource; use nexus_db_queries::db::lookup; use nexus_db_queries::db::lookup::LookupPath; +use nexus_db_queries::db::DataStore; use nexus_types::external_api::views; use omicron_common::api::external::http_pagination::PaginatedBy; use omicron_common::api::external::ByteCount; @@ -1515,11 +1515,14 @@ impl super::Nexus { new_runtime_state: &nexus::SledInstanceState, ) -> Result<(), Error> { notify_instance_updated( - &self, + &self.datastore(), &self.resolver().await, + &self.opctx_alloc, opctx, + &self.log, instance_id, new_runtime_state, + self.v2p_notification_tx.clone(), ) .await?; Ok(()) @@ -1963,12 +1966,16 @@ pub(crate) struct InstanceUpdated { /// Invoked by a sled agent to publish an updated runtime state for an /// Instance. +#[allow(clippy::too_many_arguments)] // :( pub(crate) async fn notify_instance_updated( - Nexus { db_datastore, opctx_alloc, log, v2p_notification_tx, .. }: &Nexus, + datastore: &DataStore, resolver: &internal_dns::resolver::Resolver, + opctx_alloc: &OpContext, opctx: &OpContext, + log: &slog::Logger, instance_id: &Uuid, new_runtime_state: &nexus::SledInstanceState, + v2p_notification_tx: tokio::sync::watch::Sender<()>, ) -> Result, Error> { let propolis_id = new_runtime_state.propolis_id; @@ -1980,11 +1987,10 @@ pub(crate) async fn notify_instance_updated( // Grab the current state of the instance in the DB to reason about // whether this update is stale or not. - let (.., authz_instance, db_instance) = - LookupPath::new(&opctx, &db_datastore) - .instance_id(*instance_id) - .fetch() - .await?; + let (.., authz_instance, db_instance) = LookupPath::new(&opctx, &datastore) + .instance_id(*instance_id) + .fetch() + .await?; // Update OPTE and Dendrite if the instance's active sled assignment // changed or a migration was retired. If these actions fail, sled agent @@ -2000,7 +2006,7 @@ pub(crate) async fn notify_instance_updated( // In the future, this should be replaced by a call to trigger a // networking state update RPW. super::instance_network::ensure_updated_instance_network_config( - db_datastore, + datastore, log, resolver, opctx, @@ -2023,7 +2029,7 @@ pub(crate) async fn notify_instance_updated( // will try to create its own virtual provisioning charges, which will // race with this operation. if new_runtime_state.instance_state.propolis_id.is_none() { - db_datastore + datastore .virtual_provisioning_collection_delete_instance( opctx, *instance_id, @@ -2047,20 +2053,15 @@ pub(crate) async fn notify_instance_updated( // an instance's state changes. // // Tracked in https://github.com/oxidecomputer/omicron/issues/3742. - super::oximeter::unassign_producer( - db_datastore, - log, - opctx, - instance_id, - ) - .await?; + super::oximeter::unassign_producer(datastore, log, opctx, instance_id) + .await?; } // Write the new instance and VMM states back to CRDB. This needs to be // done before trying to clean up the VMM, since the datastore will only // allow a VMM to be marked as deleted if it is already in a terminal // state. - let result = db_datastore + let result = datastore .instance_and_vmm_update_runtime( instance_id, &db::model::InstanceRuntimeState::from( @@ -2099,9 +2100,9 @@ pub(crate) async fn notify_instance_updated( "instance_id" => %instance_id, "propolis_id" => %propolis_id); - db_datastore.sled_reservation_delete(opctx, propolis_id).await?; + datastore.sled_reservation_delete(opctx, propolis_id).await?; - if !db_datastore.vmm_mark_deleted(opctx, &propolis_id).await? { + if !datastore.vmm_mark_deleted(opctx, &propolis_id).await? { warn!(log, "failed to mark vmm record as deleted"; "instance_id" => %instance_id, "propolis_id" => %propolis_id, From eb3c3f8f3083b6d350784d64d1dd79879319eb57 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Thu, 16 May 2024 21:32:20 +0000 Subject: [PATCH 22/26] add specific configuration for v2p mappings --- nexus-config/src/nexus_config.rs | 17 ++++++++++++++++- nexus/examples/config.toml | 1 + nexus/src/app/background/init.rs | 5 +---- nexus/tests/config.test.toml | 1 + smf/nexus/multi-sled/config-partial.toml | 1 + smf/nexus/single-sled/config-partial.toml | 1 + 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/nexus-config/src/nexus_config.rs b/nexus-config/src/nexus_config.rs index 01f642a36b..08517026ef 100644 --- a/nexus-config/src/nexus_config.rs +++ b/nexus-config/src/nexus_config.rs @@ -379,6 +379,8 @@ pub struct BackgroundTaskConfig { pub instance_watcher: InstanceWatcherConfig, /// configuration for service VPC firewall propagation task pub service_firewall_propagation: ServiceFirewallPropagationConfig, + /// configuration for v2p mapping propagation task + pub v2p_mapping_propagation: V2PMappingPropagationConfig, } #[serde_as] @@ -539,6 +541,14 @@ pub struct ServiceFirewallPropagationConfig { pub period_secs: Duration, } +#[serde_as] +#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] +pub struct V2PMappingPropagationConfig { + /// period (in seconds) for periodic activations of this background task + #[serde_as(as = "DurationSeconds")] + pub period_secs: Duration, +} + /// Configuration for a nexus server #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub struct PackageConfig { @@ -777,6 +787,7 @@ mod test { region_replacement.period_secs = 30 instance_watcher.period_secs = 30 service_firewall_propagation.period_secs = 300 + v2p_mapping_propagation.period_secs = 30 [default_region_allocation_strategy] type = "random" seed = 0 @@ -911,7 +922,10 @@ mod test { service_firewall_propagation: ServiceFirewallPropagationConfig { period_secs: Duration::from_secs(300), - } + }, + v2p_mapping_propagation: V2PMappingPropagationConfig { + period_secs: Duration::from_secs(30) + }, }, default_region_allocation_strategy: crate::nexus_config::RegionAllocationStrategy::Random { @@ -980,6 +994,7 @@ mod test { region_replacement.period_secs = 30 instance_watcher.period_secs = 30 service_firewall_propagation.period_secs = 300 + v2p_mapping_propagation.period_secs = 30 [default_region_allocation_strategy] type = "random" "##, diff --git a/nexus/examples/config.toml b/nexus/examples/config.toml index d3faf2459c..cba2edb7e6 100644 --- a/nexus/examples/config.toml +++ b/nexus/examples/config.toml @@ -116,6 +116,7 @@ region_replacement.period_secs = 30 # How frequently to query the status of active instances. instance_watcher.period_secs = 30 service_firewall_propagation.period_secs = 300 +v2p_mapping_propagation.period_secs = 30 [default_region_allocation_strategy] # allocate region on 3 random distinct zpools, on 3 random distinct sleds. diff --git a/nexus/src/app/background/init.rs b/nexus/src/app/background/init.rs index 7027534202..f7b7291c59 100644 --- a/nexus/src/app/background/init.rs +++ b/nexus/src/app/background/init.rs @@ -344,10 +344,7 @@ impl BackgroundTasks { driver.register( "v2p_manager".to_string(), String::from("manages opte v2p mappings for vpc networking"), - // TODO add custom config? - // should we create a general setting that can be shared across - // multiple tasks? A lot of these have the same values... - config.switch_port_settings_manager.period_secs, + config.v2p_mapping_propagation.period_secs, Box::new(V2PManager::new(datastore.clone())), opctx.child(BTreeMap::new()), vec![Box::new(v2p_watcher.1)], diff --git a/nexus/tests/config.test.toml b/nexus/tests/config.test.toml index 25a6d97efc..49a61cfa36 100644 --- a/nexus/tests/config.test.toml +++ b/nexus/tests/config.test.toml @@ -111,6 +111,7 @@ switch_port_settings_manager.period_secs = 30 region_replacement.period_secs = 30 instance_watcher.period_secs = 30 service_firewall_propagation.period_secs = 300 +v2p_mapping_propagation.period_secs = 30 [default_region_allocation_strategy] # we only have one sled in the test environment, so we need to use the diff --git a/smf/nexus/multi-sled/config-partial.toml b/smf/nexus/multi-sled/config-partial.toml index 696411966b..0ed7a0562b 100644 --- a/smf/nexus/multi-sled/config-partial.toml +++ b/smf/nexus/multi-sled/config-partial.toml @@ -56,6 +56,7 @@ sync_service_zone_nat.period_secs = 30 switch_port_settings_manager.period_secs = 30 region_replacement.period_secs = 30 service_firewall_propagation.period_secs = 300 +v2p_mapping_propagation.period_secs = 30 instance_watcher.period_secs = 30 [default_region_allocation_strategy] diff --git a/smf/nexus/single-sled/config-partial.toml b/smf/nexus/single-sled/config-partial.toml index 206f716fa7..c57d2d3ba2 100644 --- a/smf/nexus/single-sled/config-partial.toml +++ b/smf/nexus/single-sled/config-partial.toml @@ -56,6 +56,7 @@ sync_service_zone_nat.period_secs = 30 switch_port_settings_manager.period_secs = 30 region_replacement.period_secs = 30 service_firewall_propagation.period_secs = 300 +v2p_mapping_propagation.period_secs = 30 instance_watcher.period_secs = 30 [default_region_allocation_strategy] From 314e0b3dcd0141ad7485c422c29a616fffa16fb7 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Fri, 17 May 2024 23:33:01 +0000 Subject: [PATCH 23/26] Increase timeouts for asynchronous tasks Test intermittently fails because v2p mapping cleanup is a little slow. Maybe this is because the machine is under load. If logs indicate something otherwise we should revert this. --- nexus/tests/integration_tests/instances.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nexus/tests/integration_tests/instances.rs b/nexus/tests/integration_tests/instances.rs index 681be8406d..99be17388e 100644 --- a/nexus/tests/integration_tests/instances.rs +++ b/nexus/tests/integration_tests/instances.rs @@ -4555,7 +4555,7 @@ async fn test_instance_v2p_mappings(cptestctx: &ControlPlaneTestContext) { wait_for_condition( condition, &Duration::from_secs(1), - &Duration::from_secs(30), + &Duration::from_secs(60), ) .await .expect("v2p mappings should be empty"); @@ -4675,7 +4675,7 @@ async fn assert_sled_v2p_mappings( wait_for_condition( condition, &Duration::from_secs(1), - &Duration::from_secs(30), + &Duration::from_secs(60), ) .await .expect("matching v2p mapping should be present"); From f252bba7cc1b472a62ceeef64eacaf5206a12001 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Sat, 18 May 2024 01:31:41 +0000 Subject: [PATCH 24/26] point mgd back to main --- package-manifest.toml | 12 ++++++------ tools/maghemite_mg_openapi_version | 4 ++-- tools/maghemite_mgd_checksums | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 1eddc17805..ebd0ea9df1 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -533,10 +533,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 = "c9378b2762a9d59d83bbbe83e8e02fa64ca81f89" +source.commit = "da77bbee3e956bab31904ad852064e9e97582210" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//maghemite.sha256.txt -source.sha256 = "1ea0e73e149a68bf91b5ce2e0db2a8a1af50dcdbbf381b672aa9ac7e36a3a181" +source.sha256 = "9b1a03a56189cb495b1c79a90668ddb4433a570cf39736b9f3b48c53a38e4970" output.type = "tarball" [package.mg-ddm] @@ -549,10 +549,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 = "c9378b2762a9d59d83bbbe83e8e02fa64ca81f89" +source.commit = "da77bbee3e956bab31904ad852064e9e97582210" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "3334b0a9d5956e3117a6b493b9a5a31220391fab1ecbfb3a4bd8e94d7030771a" +source.sha256 = "d264d2f4760a8abc0e337e21ae65108b964e7277cf5e4239c2ec2af4ca32789b" output.type = "zone" output.intermediate_only = true @@ -564,10 +564,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 = "c9378b2762a9d59d83bbbe83e8e02fa64ca81f89" +source.commit = "da77bbee3e956bab31904ad852064e9e97582210" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd" +source.sha256 = "a696eccbebec458a9cc316b72ae15bf508801d2721f3570d99a95b10eac34b77" output.type = "zone" output.intermediate_only = true diff --git a/tools/maghemite_mg_openapi_version b/tools/maghemite_mg_openapi_version index 966e4de7fe..ad57b1105b 100644 --- a/tools/maghemite_mg_openapi_version +++ b/tools/maghemite_mg_openapi_version @@ -1,2 +1,2 @@ -COMMIT="025389ff39d594bf2b815377e2c1dc4dd23b1f96" -SHA2="a5d2f275c99152711dec1df58fd49d459d3fcb8fbfc7a7f48f432be248d74639" +COMMIT="da77bbee3e956bab31904ad852064e9e97582210" +SHA2="fdb33ee7425923560534672264008ef8948d227afce948ab704de092ad72157c" diff --git a/tools/maghemite_mgd_checksums b/tools/maghemite_mgd_checksums index eeb873a424..02629c33c6 100644 --- a/tools/maghemite_mgd_checksums +++ b/tools/maghemite_mgd_checksums @@ -1,2 +1,2 @@ -CIDL_SHA256="e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd" -MGD_LINUX_SHA256="903413ddaab89594ed7518cb8f2f27793e96cd17ed2d6b3fe11657ec4375cb19" +CIDL_SHA256="a696eccbebec458a9cc316b72ae15bf508801d2721f3570d99a95b10eac34b77" +MGD_LINUX_SHA256="8759c823fc5b210a02fe2a9d4b7b21c36296dcbc5277760807998ba3c527ce26" From 5e5168e0e823ad5af0364acf44752abb569c36ec Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Tue, 21 May 2024 18:17:33 +0000 Subject: [PATCH 25/26] use the thing correctly please --- nexus/tests/integration_tests/instances.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nexus/tests/integration_tests/instances.rs b/nexus/tests/integration_tests/instances.rs index 99be17388e..51e2552e85 100644 --- a/nexus/tests/integration_tests/instances.rs +++ b/nexus/tests/integration_tests/instances.rs @@ -4549,13 +4549,13 @@ async fn test_instance_v2p_mappings(cptestctx: &ControlPlaneTestContext) { if v2p_mappings.is_empty() { Ok(()) } else { - Err(CondCheckError::Failed("v2p mappings are still present")) + Err(CondCheckError::NotYet::<()>) } }; wait_for_condition( condition, &Duration::from_secs(1), - &Duration::from_secs(60), + &Duration::from_secs(30), ) .await .expect("v2p mappings should be empty"); @@ -4667,15 +4667,13 @@ async fn assert_sled_v2p_mappings( if mapping.is_some() { Ok(()) } else { - Err(CondCheckError::Failed( - "matching v2p mapping should be present", - )) + Err(CondCheckError::NotYet::<()>) } }; wait_for_condition( condition, &Duration::from_secs(1), - &Duration::from_secs(60), + &Duration::from_secs(30), ) .await .expect("matching v2p mapping should be present"); From 0bf66d7c53397af5e30bffe6d0ddd841d0b00472 Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Wed, 22 May 2024 17:49:11 +0000 Subject: [PATCH 26/26] rollback maghemite --- package-manifest.toml | 12 ++++++------ tools/maghemite_mg_openapi_version | 2 +- tools/maghemite_mgd_checksums | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 10befaf479..7f80dacf7c 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -533,10 +533,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 = "da77bbee3e956bab31904ad852064e9e97582210" +source.commit = "23b0cf439f9f62b9a4933e55cc72bcaddc9596cd" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//maghemite.sha256.txt -source.sha256 = "9b1a03a56189cb495b1c79a90668ddb4433a570cf39736b9f3b48c53a38e4970" +source.sha256 = "1ea0e73e149a68bf91b5ce2e0db2a8a1af50dcdbbf381b672aa9ac7e36a3a181" output.type = "tarball" [package.mg-ddm] @@ -549,10 +549,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 = "da77bbee3e956bab31904ad852064e9e97582210" +source.commit = "23b0cf439f9f62b9a4933e55cc72bcaddc9596cd" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "d264d2f4760a8abc0e337e21ae65108b964e7277cf5e4239c2ec2af4ca32789b" +source.sha256 = "3334b0a9d5956e3117a6b493b9a5a31220391fab1ecbfb3a4bd8e94d7030771a" output.type = "zone" output.intermediate_only = true @@ -564,10 +564,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 = "da77bbee3e956bab31904ad852064e9e97582210" +source.commit = "23b0cf439f9f62b9a4933e55cc72bcaddc9596cd" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "a696eccbebec458a9cc316b72ae15bf508801d2721f3570d99a95b10eac34b77" +source.sha256 = "e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd" output.type = "zone" output.intermediate_only = true diff --git a/tools/maghemite_mg_openapi_version b/tools/maghemite_mg_openapi_version index ad57b1105b..73095bd42d 100644 --- a/tools/maghemite_mg_openapi_version +++ b/tools/maghemite_mg_openapi_version @@ -1,2 +1,2 @@ -COMMIT="da77bbee3e956bab31904ad852064e9e97582210" +COMMIT="23b0cf439f9f62b9a4933e55cc72bcaddc9596cd" SHA2="fdb33ee7425923560534672264008ef8948d227afce948ab704de092ad72157c" diff --git a/tools/maghemite_mgd_checksums b/tools/maghemite_mgd_checksums index 02629c33c6..eeb873a424 100644 --- a/tools/maghemite_mgd_checksums +++ b/tools/maghemite_mgd_checksums @@ -1,2 +1,2 @@ -CIDL_SHA256="a696eccbebec458a9cc316b72ae15bf508801d2721f3570d99a95b10eac34b77" -MGD_LINUX_SHA256="8759c823fc5b210a02fe2a9d4b7b21c36296dcbc5277760807998ba3c527ce26" +CIDL_SHA256="e0907de39ca9f8ab45d40d361a1dbeed4bd8e9b157f8d3d8fe0a4bc259d933bd" +MGD_LINUX_SHA256="903413ddaab89594ed7518cb8f2f27793e96cd17ed2d6b3fe11657ec4375cb19"