]> 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>
Wed, 22 Apr 2026 14:35:17 +0000 (14:35 +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>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index 8bed9ba5ea8fafa4d1b1b3c68ddd67df531eb2b4..0897e067426c23392e585b39f228fbcbbd3c04c0 100644 (file)
@@ -7186,6 +7186,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) {
@@ -7197,19 +7198,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;
-          }
         }
       }
     }
@@ -19572,6 +19569,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 95103d73f62a756d0fc4d74ae9d66034c6fa24f3..b8b76266b21d069d678bc0f214d938d4288ae23e 100644 (file)
@@ -2355,6 +2355,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)