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=ce3b7af2ee3360eb69a0326ffef8c878411b6b19;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 (cherry picked from commit f4beeb2038691e289c853a973ee9dfdff18ace4d) --- diff --git a/src/blk/kernel/KernelDevice.cc b/src/blk/kernel/KernelDevice.cc index a9b63b165b6f..ca3228bb56a8 100644 --- a/src/blk/kernel/KernelDevice.cc +++ b/src/blk/kernel/KernelDevice.cc @@ -897,6 +897,9 @@ bool KernelDevice::try_discard(interval_set &to_release, bool async) 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 66121190ce65..e804be14a6aa 100644 --- a/src/extblkdev/ExtBlkDevInterface.h +++ b/src/extblkdev/ExtBlkDevInterface.h @@ -34,6 +34,7 @@ #include #include #include +#include "osd/osd_types.h" #ifdef __linux__ #include #else @@ -111,6 +112,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 07304cfcd8e6..ed302cb03384 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -3313,6 +3313,8 @@ void PGMap::get_health_checks( summary += " experiencing stalled read in wal device of BlueFS"; } else if (asum.first == "DB_DEVICE_STALLED_READ_ALERT") { summary += " experiencing stalled read in db device of BlueFS"; + } else if (asum.first == "EXTBLKDEV") { + summary += " reporting problems with ExtBlkDev plugin"; } auto& d = checks->add(asum.first, HEALTH_WARN, summary, asum.second.first);