]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: extblkdev related health warnings
authorAdam Kupczyk <akupczyk@ibm.com>
Thu, 16 Apr 2026 09:36:03 +0000 (09:36 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Mon, 4 May 2026 16:27:10 +0000 (16:27 +0000)
Replaced start error with health warnings:
EXTBLKDEV: plugin xxx not loaded
EXTBLKDEV: plugin xxx used on mkfs, but now uses plugin yyy

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit 950cd2c746e4002fb8ab15ef3565fc646e07f285)

src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index 35a56b7a187852176508e77557531701ade275f5..312cef4594016c29e22991a3ee3f3766ec175e2e 100644 (file)
@@ -7156,6 +7156,7 @@ int BlueStore::_open_bdev(bool create)
 
   if (!create && cct->_conf->bluestore_use_ebd) {
     // for regular bdev opens check if it was deployed with plugin
+    ebd_health_alert.clear();
     string meta_plugin_id;
     r = read_meta("extblkdev", &meta_plugin_id);
     if (r == 0) {
@@ -7167,19 +7168,15 @@ int BlueStore::_open_bdev(bool create)
       }
       string bdev_plugin_id;
       r = bdev->detect_ebd(bdev_plugin_id);
-      bool is_osd = cct->get_module_type() & CEPH_ENTITY_TYPE_OSD;
       if (r != 0) {
+        ebd_health_alert = "plugin '" + meta_plugin_id + "' not loaded";
         derr << __func__ << " plugin " << meta_plugin_id << " not loaded" << dendl;
-        if (is_osd) {
-          goto fail_close;
-        }
       } else {
         if (meta_plugin_id != bdev_plugin_id) {
+          ebd_health_alert = " plugin '" + meta_plugin_id + "' used on mkfs, "
+            "but now uses plugin '" + bdev_plugin_id + "'";
           derr << __func__ << " plugin '" << meta_plugin_id << "' used on mkfs, "
             << "but now uses plugin '" << bdev_plugin_id << "'" << dendl;
-          if (is_osd) {
-            goto fail_close;
-          }
         }
       }
     }
@@ -19447,6 +19444,13 @@ void BlueStore::_log_alerts(osd_alert_list_t& alerts)
     alerts.emplace("BLUESTORE_FREE_FRAGMENTATION",
       fmt::format("{0:.6f}", logger->get(l_bluestore_fragmentation) * 1e-6));
   }
+  if (!ebd_health_alert.empty()) {
+    std::string& v = alerts["EXTBLKDEV"];
+    if (!v.empty()) {
+      v += "; ";
+    }
+    v.append(ebd_health_alert);
+  }
 }
 
 void BlueStore::_collect_allocation_stats(uint64_t need, uint32_t alloc_size,
index cf9b382b66fdeae1359cf5e15994165d2ce83ef9..b0d93d0656f463d758817f9412b5785f5d525f44 100644 (file)
@@ -2393,6 +2393,8 @@ private:
   std::string freelist_type;
   FreelistManager *fm = nullptr;
 
+  std::string ebd_health_alert; ///< used to report ExtBlkDev plugin problem up the health chain
+
   Allocator *alloc = nullptr;   ///< allocator consumed by BlueStore
   bluefs_shared_alloc_context_t shared_alloc; ///< consumed by BlueFS (may be == alloc)