In certain cases the admin may know that it is safe to trim old osdmaps but
a bug or other issue is preventing the Monitor from deciding on its own.
Signed-off-by: Sage Weil <sage@inktank.com>
OPTION(mon_sync_debug_provider_fallback, OPT_INT, -1) // monitor to be used as fallback if sync provider fails
OPTION(mon_osd_min_down_reporters, OPT_INT, 1) // number of OSDs who need to report a down OSD for it to count
OPTION(mon_osd_min_down_reports, OPT_INT, 3) // number of times a down OSD must be reported for it to count
+OPTION(mon_osd_force_trim_to, OPT_INT, 0) // force mon to trim maps to this point, regardless of min_last_epoch_clean (dangerous, use with care)
// dump transactions
OPTION(mon_debug_dump_transactions, OPT_BOOL, false)
mon->pgmon()->pg_map.creating_pgs.empty()) {
epoch_t floor = mon->pgmon()->pg_map.calc_min_last_epoch_clean();
dout(10) << " min_last_epoch_clean " << floor << dendl;
+ if (g_conf->mon_osd_force_trim_to > 0 &&
+ g_conf->mon_osd_force_trim_to < (int)get_last_committed()) {
+ floor = g_conf->mon_osd_force_trim_to;
+ dout(10) << " explicit mon_osd_force_trim_to = " << floor << dendl;
+ }
unsigned min = g_conf->mon_min_osdmap_epochs;
if (floor + min > get_last_committed()) {
if (min < get_last_committed())