From ba1a1ad2a644bab454cd8df51a54e3707b9307b5 Mon Sep 17 00:00:00 2001 From: Kamoltat Sirivadhna Date: Wed, 7 Aug 2024 20:35:26 +0000 Subject: [PATCH] src/mon/OSDMonitor.cc: ignore non-exist CRUSH bucket Problem: In a stretch cluster, we encountered an assert failure when checking for dead crush zones when we have a none-existing CRUSH bucket. Solution: Ignore the none-existing crush bucket, instead of assert. Fixes: https://tracker.ceph.com/issues/63861 Signed-off-by: Kamoltat Sirivadhna (cherry picked from commit 5c46c482dde1073810d9d4c2f1c7f8c0b1630185) --- src/mon/OSDMonitor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index f12ad4ea40573..87dba220fac8c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -15282,7 +15282,10 @@ bool OSDMonitor::check_for_dead_crush_zones(const map>& dead_ bool really_down = false; for (auto dbi : dead_buckets) { const string& bucket_name = dbi.first; - ceph_assert(osdmap.crush->name_exists(bucket_name)); + if (!osdmap.crush->name_exists(bucket_name)) { + dout(10) << "CRUSH bucket " << bucket_name << " does not exist" << dendl; + continue; + } int bucket_id = osdmap.crush->get_item_id(bucket_name); dout(20) << "Checking " << bucket_name << " id " << bucket_id << " to see if OSDs are also down" << dendl; -- 2.39.5