diff --git a/sled-storage/src/manager.rs b/sled-storage/src/manager.rs index ca001e2178..b4a07f606c 100644 --- a/sled-storage/src/manager.rs +++ b/sled-storage/src/manager.rs @@ -28,6 +28,7 @@ use omicron_common::disk::{ }; use omicron_common::ledger::Ledger; use omicron_uuid_kinds::DatasetUuid; +use omicron_uuid_kinds::GenericUuid; use slog::{error, info, o, warn, Logger}; use std::collections::BTreeMap; use std::collections::HashSet; @@ -999,17 +1000,11 @@ impl StorageManager { }; if old_id != config.id { - // NOTE(https://github.com/oxidecomputer/omicron/issues/7265): - // - // This should potentially return a "UuidMismatch" error in the - // future, rather than overwriting the existing dataset UUID. - warn!( - log, - "Dataset UUID mismatch. Choosing to take new value."; - "old" => ?old_id, - "new" => ?config.id - ); - return Ok(false); + return Err(Error::UuidMismatch { + name: config.name.full_name(), + old: old_id.into_untyped_uuid(), + new: config.id.into_untyped_uuid(), + }); } let old_props = match SharedDatasetConfig::try_from(old_dataset) {