From a6d1a0d27b9d5216a690897b033ce45fee8c74a7 Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Fri, 1 Nov 2024 11:57:44 -0400 Subject: [PATCH] Remove DsState::Migrating --- cmon/src/main.rs | 1 - openapi/crucible-control.json | 1 - upstairs/src/client.rs | 12 +----------- upstairs/src/lib.rs | 7 ------- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/cmon/src/main.rs b/cmon/src/main.rs index 183457b8c..4f3fe1952 100644 --- a/cmon/src/main.rs +++ b/cmon/src/main.rs @@ -97,7 +97,6 @@ fn short_state(dss: DsState) -> String { DsState::Faulted => "FLT".to_string(), DsState::LiveRepairReady => "LRR".to_string(), DsState::LiveRepair => "LR".to_string(), - DsState::Migrating => "MIG".to_string(), DsState::Offline => "OFF".to_string(), DsState::Deactivated => "DAV".to_string(), DsState::Disabled => "DIS".to_string(), diff --git a/openapi/crucible-control.json b/openapi/crucible-control.json index 3515dacb6..5e193f1c7 100644 --- a/openapi/crucible-control.json +++ b/openapi/crucible-control.json @@ -98,7 +98,6 @@ "faulted", "live_repair_ready", "live_repair", - "migrating", "offline", "deactivated", "disabled", diff --git a/upstairs/src/client.rs b/upstairs/src/client.rs index 67b07cce3..1edcc7bd7 100644 --- a/upstairs/src/client.rs +++ b/upstairs/src/client.rs @@ -586,8 +586,6 @@ impl DownstairsClient { // If we have replaced a downstairs, don't forget that. DsState::Replacing | DsState::Replaced => DsState::Replaced, - - DsState::Migrating => panic!(), }; // Jobs are skipped and replayed in `Downstairs::reinitialize`, which is @@ -839,7 +837,6 @@ impl DownstairsClient { let new_state = match self.state { DsState::Active => DsState::Offline, DsState::Offline => DsState::Offline, - DsState::Migrating => DsState::Faulted, DsState::Faulted => DsState::Faulted, DsState::Deactivated => DsState::New, DsState::Reconcile => DsState::New, @@ -955,8 +952,7 @@ impl DownstairsClient { | DsState::WaitQuorum | DsState::Reconcile | DsState::Deactivated - | DsState::Disabled - | DsState::Migrating => panic!( + | DsState::Disabled => panic!( "enqueue should not be called from state {:?}", self.state ), @@ -1148,12 +1144,6 @@ impl DownstairsClient { // A move to Disabled can happen at any time we are talking // to a downstairs. } - _ => { - panic!( - "[{}] Missing check for transition {} to {}", - self.client_id, old_state, new_state - ); - } } if old_state != new_state { diff --git a/upstairs/src/lib.rs b/upstairs/src/lib.rs index 5afdc7601..1ae6a74a0 100644 --- a/upstairs/src/lib.rs +++ b/upstairs/src/lib.rs @@ -809,10 +809,6 @@ pub enum DsState { * This downstairs is undergoing LiveRepair */ LiveRepair, - /* - * This downstairs is being migrated to a new location - */ - Migrating, /* * This downstairs was active, but is now no longer connected. * We may have work for it in memory, so a replay is possible @@ -867,9 +863,6 @@ impl std::fmt::Display for DsState { DsState::LiveRepair => { write!(f, "LiveRepair") } - DsState::Migrating => { - write!(f, "Migrating") - } DsState::Offline => { write!(f, "Offline") }