From 0aa8bfa995ca241bb5a883a86d8e696a7f5f16c1 Mon Sep 17 00:00:00 2001 From: Vlad Lazar Date: Mon, 23 Sep 2024 17:33:18 +0100 Subject: [PATCH] storcon: skip spurious detach on node activation --- storage_controller/src/service.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/storage_controller/src/service.rs b/storage_controller/src/service.rs index 957f633feb..156f2e73b4 100644 --- a/storage_controller/src/service.rs +++ b/storage_controller/src/service.rs @@ -5272,7 +5272,7 @@ impl Service { } AvailabilityTransition::ToActive => { tracing::info!("Node {} transition to active", node_id); - // When a node comes back online, we must reconcile any tenant that has a None observed + // When a node comes back online, we must reconcile any non-detached tenant that has a None observed // location on the node. for tenant_shard in locked.tenants.values_mut() { // If a reconciliation is already in progress, rely on the previous scheduling @@ -5282,7 +5282,9 @@ impl Service { } if let Some(observed_loc) = tenant_shard.observed.locations.get_mut(&node_id) { - if observed_loc.conf.is_none() { + if observed_loc.conf.is_none() + && !matches!(tenant_shard.policy, PlacementPolicy::Detached) + { self.maybe_reconcile_shard(tenant_shard, &new_nodes); } }