OPTION(bluestore_debug_inject_csum_err_probability, OPT_FLOAT)
OPTION(bluestore_no_per_pool_stats_tolerance, OPT_STR)
OPTION(bluestore_warn_on_bluefs_spillover, OPT_BOOL)
+OPTION(bluestore_warn_on_legacy_statfs, OPT_BOOL)
OPTION(bluestore_log_op_age, OPT_DOUBLE)
OPTION(bluestore_log_omap_iterator_age, OPT_DOUBLE)
.set_default(true)
.set_description("Enable health indication on bluefs slow device usage"),
+ Option("bluestore_warn_on_legacy_statfs", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(true)
+ .set_description("Enable health indication on lack of per-pool statfs reporting from bluestore"),
+
Option("bluestore_log_op_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(5)
.set_description("log operation if it's slower than this age (seconds)"),
"osd_memory_cache_min",
"bluestore_cache_autotune",
"bluestore_cache_autotune_interval",
+ "bluestore_no_per_pool_stats_tolerance",
+ "bluestore_warn_on_legacy_statfs",
NULL
};
return KEYS;
void BlueStore::handle_conf_change(const ConfigProxy& conf,
const std::set<std::string> &changed)
{
+ if (changed.count("bluestore_no_per_pool_stats_tolerance") ||
+ changed.count("bluestore_warn_on_legacy_statfs")) {
+ _check_legacy_statfs_alert();
+ }
+
if (changed.count("bluestore_csum_type")) {
_set_csum();
}
} else {
dout(10) << __func__ << " store_statfs is corrupt, using empty" << dendl;
}
+ _check_legacy_statfs_alert();
} else if (cct->_conf->bluestore_no_per_pool_stats_tolerance == "enforce") {
per_pool_stat_collection = false;
dout(10) << __func__ << " store_statfs is requested but missing, using empty" << dendl;
int BlueStore::pool_statfs(uint64_t pool_id, struct store_statfs_t *buf)
{
dout(20) << __func__ << " pool " << pool_id<< dendl;
+
if (!per_pool_stat_collection) {
dout(20) << __func__ << " not supported in legacy mode " << dendl;
return -ENOTSUP;
return 0;
}
+void BlueStore::_check_legacy_statfs_alert()
+{
+ string s;
+ if (!per_pool_stat_collection &&
+ cct->_conf->bluestore_no_per_pool_stats_tolerance != "enforce" &&
+ cct->_conf->bluestore_warn_on_legacy_statfs) {
+ s = "legacy statfs reporting detected, "
+ "suggest to run store repair to get consistent statistic reports";
+ }
+ std::lock_guard l(qlock);
+ legacy_statfs_alert = s;
+}
+
// ---------------
// cache
{
std::lock_guard l(qlock);
+ if (!legacy_statfs_alert.empty()) {
+ alerts.emplace(
+ "BLUESTORE_LEGACY_STATFS",
+ legacy_statfs_alert);
+ }
if (!spillover_alert.empty() &&
cct->_conf->bluestore_warn_on_bluefs_spillover) {
alerts.emplace(