mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
crush/CrushTester: test fewer inputs when running crushtool
If there are a lot of crush rules (say, 100) then the test can take a long time. 100 values per rule should be enough to catch most issues. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
ea8609b25a
commit
0f82f461b3
@ -359,7 +359,12 @@ int CrushTester::test_with_crushtool(const char *crushtool_cmd, int max_id, int
|
||||
{
|
||||
SubProcessTimed crushtool(crushtool_cmd, true, false, true, timeout);
|
||||
string opt_max_id = boost::lexical_cast<string>(max_id);
|
||||
crushtool.add_cmd_args("-i", "-", "--test", "--check", opt_max_id.c_str(), NULL);
|
||||
crushtool.add_cmd_args(
|
||||
"-i", "-",
|
||||
"--test", "--check", opt_max_id.c_str(),
|
||||
"--min-x", "1",
|
||||
"--max-x", "50",
|
||||
NULL);
|
||||
int ret = crushtool.spawn();
|
||||
if (ret != 0) {
|
||||
err << "failed run crushtool: " << crushtool.err();
|
||||
|
Loading…
Reference in New Issue
Block a user