Skip to content

Commit

Permalink
Remove DsState::Migrating
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Nov 1, 2024
1 parent bdb0897 commit a6d1a0d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
1 change: 0 additions & 1 deletion cmon/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
1 change: 0 additions & 1 deletion openapi/crucible-control.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"faulted",
"live_repair_ready",
"live_repair",
"migrating",
"offline",
"deactivated",
"disabled",
Expand Down
12 changes: 1 addition & 11 deletions upstairs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
),
Expand Down Expand Up @@ -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 {
Expand Down
7 changes: 0 additions & 7 deletions upstairs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit a6d1a0d

Please sign in to comment.