From: Adam Kupczyk Date: Thu, 16 Apr 2026 09:36:03 +0000 (+0000) Subject: os/bluestore: extblkdev related health warnings X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=950cd2c746e4002fb8ab15ef3565fc646e07f285;p=ceph.git os/bluestore: extblkdev related health warnings 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 --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 8bed9ba5ea8f..0897e067426c 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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, diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 95103d73f62a..b8b76266b21d 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -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)