From: Adam Kupczyk Date: Wed, 15 Apr 2026 10:59:46 +0000 (+0000) Subject: blk/extblkdev: Health warns from ExtBlkDev plugins X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4beeb2038691e289c853a973ee9dfdff18ace4d;p=ceph.git blk/extblkdev: Health warns from ExtBlkDev plugins Expanded interface by collect_alerts. Created category "EBD_PROBLEMS" for ExtBlkDev problems. Signed-off-by: Adam Kupczyk --- diff --git a/src/blk/kernel/KernelDevice.cc b/src/blk/kernel/KernelDevice.cc index e7193c19ea6e..01f17f0f7e83 100644 --- a/src/blk/kernel/KernelDevice.cc +++ b/src/blk/kernel/KernelDevice.cc @@ -925,6 +925,9 @@ bool KernelDevice::try_discard(interval_set &to_release, void KernelDevice::collect_alerts(osd_alert_list_t& alerts, const std::string& device_name) { BlockDevice::collect_alerts(alerts, device_name); + if (ebd_impl) { + ebd_impl->collect_alerts(alerts); + } } void KernelDevice::_aio_log_start( diff --git a/src/extblkdev/ExtBlkDevInterface.h b/src/extblkdev/ExtBlkDevInterface.h index b9e553c8c1f1..a1e31154a89d 100644 --- a/src/extblkdev/ExtBlkDevInterface.h +++ b/src/extblkdev/ExtBlkDevInterface.h @@ -35,6 +35,7 @@ #include #include #include +#include "osd/osd_types.h" #ifdef __linux__ #include #else @@ -112,6 +113,14 @@ namespace ceph { * @return 0 on success or a negative errno on error. */ virtual int get_plugin_id(std::string& id_str) = 0; + + /** + * Retrieve alerts from the plugin, if any. + * This function is used to give plugin a way to signal health warnings. + * + * @param [out] alerts append warnings here. + */ + virtual void collect_alerts(osd_alert_list_t& alerts) {} }; typedef std::shared_ptr ExtBlkDevInterfaceRef; diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index c5bbf8e95e08..e57cb4a534aa 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -3332,6 +3332,8 @@ void PGMap::get_health_checks( summary += " experiencing slow discard operations"; } else if (asum.first == "BLUESTORE_FREE_FRAGMENTATION") { summary += " experiencing high free space fragmentation of BlueStore"; + } else if (asum.first == "EXTBLKDEV") { + summary += " reporting problems with ExtBlkDev plugin"; } auto& d = checks->add(asum.first, HEALTH_WARN, summary, asum.second.first);