]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/mon/OSDMonitor.cc: ignore non-exist CRUSH bucket
authorKamoltat Sirivadhna <ksirivad@redhat.com>
Wed, 7 Aug 2024 20:35:26 +0000 (20:35 +0000)
committerKamoltat Sirivadhna <ksirivad@redhat.com>
Thu, 27 Feb 2025 21:32:15 +0000 (21:32 +0000)
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 <ksirivad@redhat.com>
(cherry picked from commit 5c46c482dde1073810d9d4c2f1c7f8c0b1630185)

src/mon/OSDMonitor.cc

index f12ad4ea40573c34e4c357052db717b47fb633c9..87dba220fac8c9cedb7415d25c9cdb45eeba9265 100644 (file)
@@ -15282,7 +15282,10 @@ bool OSDMonitor::check_for_dead_crush_zones(const map<string,set<string>>& 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;