OPTION(bluestore_fsck_error_on_no_per_pool_stats, OPT_BOOL)
OPTION(bluestore_warn_on_bluefs_spillover, OPT_BOOL)
OPTION(bluestore_warn_on_legacy_statfs, OPT_BOOL)
+OPTION(bluestore_warn_on_spurious_read_errors, OPT_BOOL)
OPTION(bluestore_fsck_error_on_no_per_pool_omap, OPT_BOOL)
OPTION(bluestore_warn_on_no_per_pool_omap, OPT_BOOL)
OPTION(bluestore_log_op_age, OPT_DOUBLE)
.set_default(true)
.set_description("Enable health indication on lack of per-pool statfs reporting from bluestore"),
+ Option("bluestore_warn_on_spurious_read_errors", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(true)
+ .set_description("Enable health indication when spurious read errors are observed by OSD"),
+
Option("bluestore_fsck_error_on_no_per_pool_omap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
.set_default(false)
.set_description("Make fsck error (instead of warn) when objects without per-pool omap are found"),
summary += " have dangerous mismatch between BlueStore block device and free list sizes";
} else if (asum.first == "BLUESTORE_NO_PER_POOL_OMAP") {
summary += " reporting legacy (not per-pool) BlueStore omap usage stats";
+ } else if (asum.first == "BLUESTORE_SPURIOUS_READ_ERRORS") {
+ summary += " have spurious read errors";
}
+
auto& d = checks->add(asum.first, HEALTH_WARN, summary, asum.second.first);
for (auto& s : asum.second.second) {
d.detail.push_back(s);
logger->inc(l_bluestore_reads_with_retries);
dout(5) << __func__ << " read at 0x" << std::hex << offset << "~" << length
<< " failed " << std::dec << retry_count << " times before succeeding" << dendl;
+ stringstream s;
+ s << " reads with retries: " << logger->get(l_bluestore_reads_with_retries);
+ _set_spurious_read_errors_alert(s.str());
}
return r;
}
{
std::lock_guard l(qlock);
+ if (!spurious_read_errors_alert.empty()) {
+ alerts.emplace(
+ "BLUESTORE_SPURIOUS_READ_ERRORS",
+ spurious_read_errors_alert);
+ }
if (!disk_size_mismatch_alert.empty()) {
alerts.emplace(
"BLUESTORE_DISK_SIZE_MISMATCH",
std::string legacy_statfs_alert;
std::string no_per_pool_omap_alert;
std::string disk_size_mismatch_alert;
+ std::string spurious_read_errors_alert;
void _log_alerts(osd_alert_list_t& alerts);
bool _set_compression_alert(bool cmode, const char* s) {
std::lock_guard l(qlock);
disk_size_mismatch_alert = s;
}
+ void _set_spurious_read_errors_alert(const string& s) {
+ std::lock_guard l(qlock);
+ spurious_read_errors_alert = s;
+ }
private: