]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: improve error message when FileStore op fails due to EPERM
authorNathan Cutler <ncutler@suse.com>
Thu, 24 Nov 2016 17:23:43 +0000 (18:23 +0100)
committerNathan Cutler <ncutler@suse.com>
Tue, 3 Jan 2017 23:10:21 +0000 (00:10 +0100)
References: http://tracker.ceph.com/issues/18037
Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/os/filestore/FileStore.cc

index 0d65187220a96a336781153c39e781e13baedd01..0d77e90437e6adc0fb93e5bc11df837ce07d2f2a 100644 (file)
@@ -3001,17 +3001,17 @@ void FileStore::_do_transaction(
 
        if (r == -ENOENT && (op->op == Transaction::OP_CLONERANGE ||
                             op->op == Transaction::OP_CLONE ||
-                            op->op == Transaction::OP_CLONERANGE2))
+                            op->op == Transaction::OP_CLONERANGE2)) {
          msg = "ENOENT on clone suggests osd bug";
-
-       if (r == -ENOSPC)
+       } else if (r == -ENOSPC) {
          // For now, if we hit _any_ ENOSPC, crash, before we do any damage
          // by partially applying transactions.
          msg = "ENOSPC handling not implemented";
-
-       if (r == -ENOTEMPTY) {
+       } else if (r == -ENOTEMPTY) {
          msg = "ENOTEMPTY suggests garbage data in osd data dir";
-       }
+       } else if (r == -EPERM) {
+          msg = "EPERM suggests file(s) in osd data dir not owned by ceph user, or leveldb corruption";
+        }
 
        derr  << " error " << cpp_strerror(r) << " not handled on operation " << op
              << " (" << spos << ", or op " << spos.op << ", counting from 0)" << dendl;