Skip to content

Commit

Permalink
crush/CrushTester: return EINVAL if crushtool returns non-zero
Browse files Browse the repository at this point in the history
this backports a tiny part of ec02441, otherwise
CrushTester will return 1, and "ceph" cli will take it
as EPERM, which is miss leading, and fails
osd-crush.sh:TEST_crush_reject_empty.

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Jul 11, 2015
1 parent 4a66e35 commit f56b3e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crush/CrushTester.cc
Expand Up @@ -435,7 +435,7 @@ int CrushTester::test_with_crushtool(const string& crushtool,
// something else entirely happened
// log it and consider an invalid crush map
err << "error running crushmap through crushtool: " << cpp_strerror(r);
return -r;
return -EINVAL;
}

namespace {
Expand Down

0 comments on commit f56b3e0

Please sign in to comment.