From fe5e6dcf05e472caecb35f1b4f8bf51974e84539 Mon Sep 17 00:00:00 2001 From: Alex Plotnick Date: Fri, 15 Nov 2024 11:55:50 -0700 Subject: [PATCH] Don't try to initialize expunged databases --- nexus/reconfigurator/execution/src/clickhouse.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nexus/reconfigurator/execution/src/clickhouse.rs b/nexus/reconfigurator/execution/src/clickhouse.rs index 1687df668e8..b414bf18dfe 100644 --- a/nexus/reconfigurator/execution/src/clickhouse.rs +++ b/nexus/reconfigurator/execution/src/clickhouse.rs @@ -20,6 +20,8 @@ use futures::future::Either; use futures::stream::FuturesUnordered; use futures::stream::StreamExt; use nexus_db_queries::context::OpContext; +use nexus_sled_agent_shared::inventory::OmicronZoneType; +use nexus_types::deployment::BlueprintZoneFilter; use nexus_types::deployment::BlueprintZonesConfig; use nexus_types::deployment::ClickhouseClusterConfig; use omicron_common::address::CLICKHOUSE_ADMIN_PORT; @@ -168,7 +170,11 @@ pub(crate) async fn deploy_single_node( if let Some(zone) = zones .values() .flat_map(|zones| { - zones.zones.iter().find(|zone| zone.zone_type.is_clickhouse()) + zones + .to_omicron_zones_config(BlueprintZoneFilter::ShouldBeRunning) + .zones + .into_iter() + .find(|zone| matches!(zone.zone_type, OmicronZoneType::Clickhouse { .. })) }) .next() {