if (is_stopping())
return 0;
+ check_config();
+
dout(10) << "ensuring pgs have consumed prior maps" << dendl;
consume_map();
peering_wq.drain();
"osd_max_backfills",
"osd_op_complaint_time", "osd_op_log_threshold",
"osd_op_history_size", "osd_op_history_duration",
+ "osd_map_cache_size",
+ "osd_map_max_advance",
+ "osd_pg_epoch_persisted_max_stale",
NULL
};
return KEYS;
op_tracker.set_history_size_and_duration(cct->_conf->osd_op_history_size,
cct->_conf->osd_op_history_duration);
}
+
+ check_config();
+}
+
+void OSD::check_config()
+{
+ // some sanity checks
+ if (g_conf->osd_map_cache_size <= g_conf->osd_map_max_advance + 2) {
+ clog.warn() << "osd_map_cache_size (" << g_conf->osd_map_cache_size << ")"
+ << " is not > osd_map_max_advance ("
+ << g_conf->osd_map_max_advance << ")";
+ }
+ if (g_conf->osd_map_cache_size <= (int)g_conf->osd_pg_epoch_persisted_max_stale + 2) {
+ clog.warn() << "osd_map_cache_size (" << g_conf->osd_map_cache_size << ")"
+ << " is not > osd_pg_epoch_persisted_max_stale ("
+ << g_conf->osd_pg_epoch_persisted_max_stale << ")";
+ }
}
// --------------------------------
virtual const char** get_tracked_conf_keys() const;
virtual void handle_conf_change(const struct md_config_t *conf,
const std::set <std::string> &changed);
+ void check_config();
protected:
Mutex osd_lock; // global lock