From: Kefu Chai Date: Sat, 11 Jul 2015 15:04:33 +0000 (+0800) Subject: crush/CrushTester: return EINVAL if crushtool returns non-zero X-Git-Tag: v0.94.3~45^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f1c0cc9cd3deab925440b56d82c3e61a8ba5ab1;p=ceph.git crush/CrushTester: return EINVAL if crushtool returns non-zero 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 --- diff --git a/src/crush/CrushTester.cc b/src/crush/CrushTester.cc index 04c5be1de1617..9aada7b1eb938 100644 --- a/src/crush/CrushTester.cc +++ b/src/crush/CrushTester.cc @@ -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 {