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)
OPTION(mon_mds_force_trim_to, OPT_INT, 0) // force mon to trim mdsmaps to this point (dangerous, use with care)
+OPTION(crushtool, OPT_STR, "crushtool")
// dump transactions
OPTION(mon_debug_dump_transactions, OPT_BOOL, false)
dst.push_back( data_buffer.str() );
}
-int CrushTester::test_with_crushtool()
+int CrushTester::test_with_crushtool(const string& crushtool)
{
vector<const char *> cmd_args;
- cmd_args.push_back("crushtool");
+ cmd_args.push_back(crushtool.c_str());
cmd_args.push_back("-i");
cmd_args.push_back("-");
cmd_args.push_back("--test");
}
if (r == ENOENT) {
- err << "unable to find 'crushtool' to test the map";
+ err << "unable to find " << cmd_args << " to test the map";
return -ENOENT;
}
}
int test();
- int test_with_crushtool();
+ int test_with_crushtool(const string& crushtool);
};
#endif
const char** Monitor::get_tracked_conf_keys() const
{
static const char* KEYS[] = {
+ "crushtool", // helpful for testing
"mon_lease",
"mon_lease_renew_interval",
"mon_lease_ack_timeout",
dout(10) << " testing map" << dendl;
stringstream ess;
CrushTester tester(crush, ess);
- int r = tester.test_with_crushtool();
+ int r = tester.test_with_crushtool(g_conf->crushtool);
if (r < 0) {
derr << "error on crush map: " << ess.str() << dendl;
ss << "Failed to parse crushmap: " << ess.str();