// UNSAFE -- TESTING ONLY! Allows addition of a cache tier with preexisting snaps
OPTION(mon_debug_unsafe_allow_tier_with_nonempty_snaps, OPT_BOOL, false)
OPTION(mon_osd_blacklist_default_expire, OPT_DOUBLE, 60*60) // default one hour
+OPTION(mon_osd_crush_smoke_test, OPT_BOOL, true)
OPTION(paxos_stash_full_interval, OPT_INT, 25) // how often (in commits) to stash a full copy of the PaxosService state
OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first sync the monitor stores
dout(10) << " prepare_pool_crush_rule returns " << r << dendl;
return r;
}
- CrushWrapper newcrush;
- _get_pending_crush(newcrush);
- ostringstream err;
- CrushTester tester(newcrush, err);
- tester.set_max_x(50);
- tester.set_rule(crush_rule);
- r = tester.test_with_fork(g_conf->mon_lease);
- if (r < 0) {
- dout(10) << " tester.test_with_fork returns " << r
- << ": " << err.str() << dendl;
- *ss << "crush test failed with " << r << ": " << err.str();
- return r;
+ if (g_conf->mon_osd_crush_smoke_test) {
+ CrushWrapper newcrush;
+ _get_pending_crush(newcrush);
+ ostringstream err;
+ CrushTester tester(newcrush, err);
+ tester.set_max_x(50);
+ tester.set_rule(crush_rule);
+ r = tester.test_with_fork(g_conf->mon_lease);
+ if (r < 0) {
+ dout(10) << " tester.test_with_fork returns " << r
+ << ": " << err.str() << dendl;
+ *ss << "crush test failed with " << r << ": " << err.str();
+ return r;
+ }
}
unsigned size, min_size;
r = prepare_pool_size(pool_type, erasure_code_profile, &size, &min_size, ss);
}
}
- // sanity check: test some inputs to make sure this map isn't totally broken
- dout(10) << " testing map" << dendl;
- stringstream ess;
- CrushTester tester(crush, ess);
- tester.set_max_x(50);
- int r = tester.test_with_fork(g_conf->mon_lease);
- if (r < 0) {
- dout(10) << " tester.test_with_fork returns " << r
- << ": " << ess.str() << dendl;
- ss << "crush smoke test failed with " << r << ": " << ess.str();
- err = r;
- goto reply;
+ if (g_conf->mon_osd_crush_smoke_test) {
+ // sanity check: test some inputs to make sure this map isn't
+ // totally broken
+ dout(10) << " testing map" << dendl;
+ stringstream ess;
+ CrushTester tester(crush, ess);
+ tester.set_max_x(50);
+ int r = tester.test_with_fork(g_conf->mon_lease);
+ if (r < 0) {
+ dout(10) << " tester.test_with_fork returns " << r
+ << ": " << ess.str() << dendl;
+ ss << "crush smoke test failed with " << r << ": " << ess.str();
+ err = r;
+ goto reply;
+ }
+ dout(10) << " crush test result " << ess.str() << dendl;
}
- dout(10) << " result " << ess.str() << dendl;
-
pending_inc.crush = data;
ss << osdmap.get_crush_version() + 1;
goto update;