Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions clients/gateway-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ workspace = true
[dependencies]
base64.workspace = true
chrono.workspace = true
daft.workspace = true
gateway-messages.workspace = true
progenitor.workspace = true
rand.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions clients/gateway-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ progenitor::generate_api!(
SpIgnition = { derives = [PartialEq, Eq, PartialOrd, Ord] },
SpIgnitionSystemType = { derives = [Copy, PartialEq, Eq, PartialOrd, Ord] },
SpState = { derives = [PartialEq, Eq, PartialOrd, Ord] },
SpType = { derives = [daft::Diffable] },
SpUpdateStatus = { derives = [PartialEq, Hash, Eq] },
UpdatePreparationProgress = { derives = [PartialEq, Hash, Eq] },
},
);

Expand Down
2 changes: 2 additions & 0 deletions common/src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use std::fmt;

use daft::Diffable;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use tufaceous_artifact::{Artifact, ArtifactKind, ArtifactVersion};
Expand All @@ -15,6 +16,7 @@ use tufaceous_artifact::{Artifact, ArtifactKind, ArtifactVersion};
// TODO: move this to tufaceous-artifact in the future
#[derive(
Debug,
Diffable,
Clone,
PartialEq,
Eq,
Expand Down
2 changes: 2 additions & 0 deletions dev-tools/omdb/tests/successes.out
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ parent: <none>
internal DNS version: 1
external DNS version: 2

PENDING MGS-MANAGED UPDATES: 0

---------------------------------------------
stderr:
Expand Down Expand Up @@ -1519,6 +1520,7 @@ parent: <none>
internal DNS version: 1
external DNS version: 2

PENDING MGS-MANAGED UPDATES: 0

---------------------------------------------
stderr:
Expand Down
2 changes: 2 additions & 0 deletions dev-tools/reconfigurator-cli/tests/output/cmd-example-stdout
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


>
Expand Down Expand Up @@ -453,5 +454,6 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ parent: 06c88262-f435-410e-ba98-101bed41ec27
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


> blueprint-edit 3f00b694-1b16-4aaa-8f78-e6b3a527b434 expunge-zone 9995de32-dd52-4eb1-b0eb-141eb84bc739
Expand Down Expand Up @@ -605,6 +606,7 @@ parent: 3f00b694-1b16-4aaa-8f78-e6b3a527b434
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


> blueprint-plan 366b0b68-d80e-4bc1-abd3-dc69837847e0
Expand Down Expand Up @@ -922,6 +924,7 @@ parent: 366b0b68-d80e-4bc1-abd3-dc69837847e0
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


> blueprint-edit 9c998c1d-1a7b-440a-ae0c-40f781dea6e2 expunge-zone d786ef4a-5acb-4f5d-a732-a00addf986b5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ parent: 1b013011-2062-4b48-b544-a32b23bce83a
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


>
Expand Down Expand Up @@ -198,6 +199,7 @@ parent: 9766ca20-38d4-4380-b005-e7c43c797e7c
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


> blueprint-diff 971eeb12-1830-4fa0-a699-98ea0164505c f714e6ea-e85a-4d7d-93c2-a018744fe176
Expand Down Expand Up @@ -470,6 +472,7 @@ parent: bb128f06-a2e1-44c1-8874-4f789d0ff896
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0


> blueprint-diff f714e6ea-e85a-4d7d-93c2-a018744fe176 d9c572a1-a68c-4945-b1ec-5389bd588fe9
Expand Down
3 changes: 3 additions & 0 deletions nexus/db-queries/src/db/datastore/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ use nexus_types::deployment::BlueprintSledConfig;
use nexus_types::deployment::BlueprintTarget;
use nexus_types::deployment::ClickhouseClusterConfig;
use nexus_types::deployment::CockroachDbPreserveDowngrade;
use nexus_types::deployment::PendingMgsUpdates;
use omicron_common::api::external::DataPageParams;
use omicron_common::api::external::Error;
use omicron_common::api::external::ListResultVec;
Expand Down Expand Up @@ -892,6 +893,8 @@ impl DataStore {

Ok(Blueprint {
id: blueprint_id,
// TODO these need to be serialized to the database.
Comment thread
davepacheco marked this conversation as resolved.
pending_mgs_updates: PendingMgsUpdates::new(),
sleds: sled_configs,
parent_blueprint_id,
internal_dns_version,
Expand Down
6 changes: 6 additions & 0 deletions nexus/db-queries/src/db/datastore/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ mod test {
use nexus_sled_agent_shared::inventory::OmicronZoneDataset;
use nexus_types::deployment::BlueprintSledConfig;
use nexus_types::deployment::CockroachDbPreserveDowngrade;
use nexus_types::deployment::PendingMgsUpdates;
use nexus_types::deployment::{
BlueprintZoneConfig, OmicronZoneExternalFloatingAddr,
OmicronZoneExternalFloatingIp,
Expand Down Expand Up @@ -1054,6 +1055,7 @@ mod test {
blueprint: Blueprint {
id: BlueprintUuid::new_v4(),
sleds: BTreeMap::new(),
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: None,
Expand Down Expand Up @@ -1539,6 +1541,7 @@ mod test {
let blueprint = Blueprint {
id: BlueprintUuid::new_v4(),
sleds: make_sled_config_only_zones(blueprint_zones),
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: None,
Expand Down Expand Up @@ -1796,6 +1799,7 @@ mod test {
let blueprint = Blueprint {
id: BlueprintUuid::new_v4(),
sleds: make_sled_config_only_zones(blueprint_zones),
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: None,
Expand Down Expand Up @@ -2002,6 +2006,7 @@ mod test {
let blueprint = Blueprint {
id: BlueprintUuid::new_v4(),
sleds: make_sled_config_only_zones(blueprint_zones),
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: None,
Expand Down Expand Up @@ -2138,6 +2143,7 @@ mod test {
let blueprint = Blueprint {
id: BlueprintUuid::new_v4(),
sleds: make_sled_config_only_zones(blueprint_zones),
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: None,
Expand Down
2 changes: 2 additions & 0 deletions nexus/reconfigurator/execution/src/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ mod test {
pub use nexus_types::deployment::OmicronZoneExternalFloatingAddr;
pub use nexus_types::deployment::OmicronZoneExternalFloatingIp;
pub use nexus_types::deployment::OmicronZoneExternalSnatIp;
use nexus_types::deployment::PendingMgsUpdates;
use nexus_types::deployment::SledFilter;
use nexus_types::deployment::blueprint_zone_type;
use nexus_types::external_api::params;
Expand Down Expand Up @@ -688,6 +689,7 @@ mod test {
let mut blueprint = Blueprint {
id: BlueprintUuid::new_v4(),
sleds: blueprint_sleds,
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ use thiserror::Error;

use super::ClickhouseZonesThatShouldBeRunning;
use super::clickhouse::ClickhouseAllocator;
use nexus_types::deployment::PendingMgsUpdates;

/// Errors encountered while assembling blueprints
#[derive(Debug, Error)]
Expand Down Expand Up @@ -454,6 +455,7 @@ impl<'a> BlueprintBuilder<'a> {
Blueprint {
id: rng.next_blueprint(),
sleds,
pending_mgs_updates: PendingMgsUpdates::new(),
parent_blueprint_id: None,
internal_dns_version: Generation::new(),
external_dns_version: Generation::new(),
Expand Down Expand Up @@ -688,6 +690,10 @@ impl<'a> BlueprintBuilder<'a> {
Blueprint {
id: blueprint_id,
sleds,
pending_mgs_updates: self
Comment thread
davepacheco marked this conversation as resolved.
.parent_blueprint
.pending_mgs_updates
.clone(),
parent_blueprint_id: Some(self.parent_blueprint.id),
internal_dns_version: self.input.internal_dns_version(),
external_dns_version: self.input.external_dns_version(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,4 @@ parent: e35b2fdd-354d-48d9-acb5-703b2c269a54
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,4 @@ parent: 516e80a3-b362-4fac-bd3c-4559717120dd
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0
Original file line number Diff line number Diff line change
Expand Up @@ -466,3 +466,4 @@ parent: 4d4e6c38-cd95-4c4e-8f45-6af4d686964b
internal DNS version: 1
external DNS version: 1

PENDING MGS-MANAGED UPDATES: 0
3 changes: 2 additions & 1 deletion nexus/src/app/background/tasks/blueprint_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ mod test {
use nexus_types::deployment::{
Blueprint, BlueprintSledConfig, BlueprintTarget, BlueprintZoneConfig,
BlueprintZoneDisposition, BlueprintZoneImageSource, BlueprintZoneType,
CockroachDbPreserveDowngrade, blueprint_zone_type,
CockroachDbPreserveDowngrade, PendingMgsUpdates, blueprint_zone_type,
};
use nexus_types::external_api::views::SledState;
use omicron_common::api::external;
Expand Down Expand Up @@ -253,6 +253,7 @@ mod test {
let blueprint = Blueprint {
id,
sleds: blueprint_sleds,
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: Some(current_target.target_id),
Expand Down
2 changes: 2 additions & 0 deletions nexus/src/app/background/tasks/blueprint_load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ mod test {
use nexus_test_utils_macros::nexus_test;
use nexus_types::deployment::{
Blueprint, BlueprintTarget, CockroachDbPreserveDowngrade,
PendingMgsUpdates,
};
use omicron_common::api::external::Generation;
use omicron_uuid_kinds::BlueprintUuid;
Expand All @@ -217,6 +218,7 @@ mod test {
Blueprint {
id,
sleds: BTreeMap::new(),
pending_mgs_updates: PendingMgsUpdates::new(),
cockroachdb_setting_preserve_downgrade:
CockroachDbPreserveDowngrade::DoNotModify,
parent_blueprint_id: Some(parent_blueprint_id),
Expand Down
2 changes: 2 additions & 0 deletions nexus/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ use std::sync::Arc;
use std::time::Duration;
use uuid::Uuid;

use nexus_types::deployment::PendingMgsUpdates;
pub use sim::TEST_HARDWARE_THREADS;
pub use sim::TEST_RESERVOIR_RAM;

Expand Down Expand Up @@ -940,6 +941,7 @@ impl<'a, N: NexusServer> ControlPlaneTestContextBuilder<'a, N> {
Blueprint {
id: BlueprintUuid::new_v4(),
sleds: blueprint_sleds,
pending_mgs_updates: PendingMgsUpdates::new(),
parent_blueprint_id: None,
internal_dns_version: dns_config.generation,
external_dns_version: Generation::new(),
Expand Down
Loading
Loading