]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushTester: return EINVAL if crushtool returns non-zero 5208/head
authorKefu Chai <kchai@redhat.com>
Sat, 11 Jul 2015 15:04:33 +0000 (23:04 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 11 Jul 2015 17:32:42 +0000 (01:32 +0800)
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>
src/crush/CrushTester.cc

index 04c5be1de1617523bc691fdb3e8f90b1d86be116..9aada7b1eb938d5a067917f02ffe88bcd9eddaad 100644 (file)
@@ -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 {