Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into iliana/releng
Browse files Browse the repository at this point in the history
  • Loading branch information
iliana committed May 15, 2024
2 parents d5341bb + 7566128 commit f3c1fa8
Show file tree
Hide file tree
Showing 81 changed files with 3,107 additions and 1,220 deletions.
19 changes: 11 additions & 8 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ postgres-protocol = "0.6.6"
predicates = "3.1.0"
pretty_assertions = "1.4.0"
pretty-hex = "0.4.1"
prettyplease = { version = "0.2.19", features = ["verbatim"] }
prettyplease = { version = "0.2.20", features = ["verbatim"] }
proc-macro2 = "1.0"
progenitor = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
progenitor-client = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
Expand Down
2 changes: 2 additions & 0 deletions dev-tools/omdb/tests/usage_errors.out
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ Options:

Possible values:
- commissioned: All sleds that are currently part of the control plane cluster
- decommissioned: All sleds that were previously part of the control plane cluster
but have been decommissioned
- discretionary: Sleds that are eligible for discretionary services
- in-service: Sleds that are in service (even if they might not be eligible
for discretionary services)
Expand Down
5 changes: 4 additions & 1 deletion dev-tools/reconfigurator-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ use nexus_types::inventory::SledRole;
use omicron_common::api::external::Generation;
use omicron_common::api::external::Name;
use omicron_uuid_kinds::CollectionUuid;
use omicron_uuid_kinds::GenericUuid;
use omicron_uuid_kinds::SledUuid;
use omicron_uuid_kinds::VnicUuid;
use reedline::{Reedline, Signal};
use std::collections::BTreeMap;
use std::io::BufRead;
Expand Down Expand Up @@ -146,7 +148,8 @@ impl ReconfiguratorSim {
.add_omicron_zone_external_ip(zone.id, external_ip)
.context("adding omicron zone external IP")?;
let nic = OmicronZoneNic {
id: nic.id,
// TODO-cleanup use `TypedUuid` everywhere
id: VnicUuid::from_untyped_uuid(nic.id),
mac: nic.mac,
ip: nic.ip,
slot: nic.slot,
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/reconfigurator-cli/tests/test_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type ControlPlaneTestContext =
#[nexus_test]
async fn test_blueprint_edit(cptestctx: &ControlPlaneTestContext) {
// Setup
let nexus = &cptestctx.server.apictx().nexus;
let nexus = &cptestctx.server.server_context().nexus;
let datastore = nexus.datastore();
let log = &cptestctx.logctx.log;
let opctx = OpContext::for_background(
Expand Down
4 changes: 3 additions & 1 deletion nexus/db-model/src/network_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ use ipnetwork::NetworkSize;
use nexus_types::external_api::params;
use nexus_types::identity::Resource;
use omicron_common::api::{external, internal};
use omicron_uuid_kinds::GenericUuid;
use omicron_uuid_kinds::OmicronZoneUuid;
use omicron_uuid_kinds::VnicUuid;
use sled_agent_client::ZoneKind;
use uuid::Uuid;

Expand Down Expand Up @@ -207,7 +209,7 @@ impl TryFrom<&'_ ServiceNetworkInterface>
});
}
Ok(Self {
id: nic.id(),
id: VnicUuid::from_untyped_uuid(nic.id()),
mac: *nic.mac,
ip: nic.ip.ip(),
slot: *nic.slot,
Expand Down
3 changes: 2 additions & 1 deletion nexus/db-model/src/schema_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(61, 0, 0);
pub const SCHEMA_VERSION: SemverVersion = SemverVersion::new(62, 0, 0);

/// List of all past database schema versions, in *reverse* order
///
Expand All @@ -29,6 +29,7 @@ static KNOWN_VERSIONS: Lazy<Vec<KnownVersion>> = 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(62, "allocate-subnet-decommissioned-sleds"),
KnownVersion::new(61, "blueprint-add-sled-state"),
KnownVersion::new(60, "add-lookup-vmm-by-sled-id-index"),
KnownVersion::new(59, "enforce-first-as-default"),
Expand Down
2 changes: 1 addition & 1 deletion nexus/db-model/src/sled_underlay_subnet_allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use omicron_uuid_kinds::SledKind;
use uuid::Uuid;

/// Underlay allocation for a sled added to an initialized rack
#[derive(Queryable, Insertable, Debug, Clone, Selectable)]
#[derive(Queryable, Insertable, Debug, Clone, PartialEq, Eq, Selectable)]
#[diesel(table_name = sled_underlay_subnet_allocation)]
pub struct SledUnderlaySubnetAllocation {
pub rack_id: Uuid,
Expand Down
5 changes: 3 additions & 2 deletions nexus/db-queries/src/db/datastore/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1346,15 +1346,16 @@ mod tests {
use omicron_uuid_kinds::PhysicalDiskUuid;
use omicron_uuid_kinds::SledUuid;
use omicron_uuid_kinds::ZpoolUuid;
use once_cell::sync::Lazy;
use pretty_assertions::assert_eq;
use rand::thread_rng;
use rand::Rng;
use slog::Logger;
use std::mem;
use std::net::Ipv6Addr;

static EMPTY_PLANNING_INPUT: PlanningInput =
PlanningInputBuilder::empty_input();
static EMPTY_PLANNING_INPUT: Lazy<PlanningInput> =
Lazy::new(|| PlanningInputBuilder::empty_input());

// This is a not-super-future-maintainer-friendly helper to check that all
// the subtables related to blueprints have been pruned of a specific
Expand Down
Loading

0 comments on commit f3c1fa8

Please sign in to comment.