]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: improve error message when FileStore op fails due to EPERM 12789/head
authorNathan Cutler <ncutler@suse.com>
Thu, 24 Nov 2016 17:23:43 +0000 (18:23 +0100)
committerNathan Cutler <ncutler@suse.com>
Wed, 4 Jan 2017 18:28:03 +0000 (19:28 +0100)
References: http://tracker.ceph.com/issues/18037
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit f7723e59b6e10e1aef35543639e0ea1fcac65574)

src/os/filestore/FileStore.cc

index ce1cfe262046c382b06823091b8783af37f435f4..bf741f48ea77135ba33e32ce5514b98965345655 100644 (file)
@@ -2882,17 +2882,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";
+        }
 
        dout(0) << " error " << cpp_strerror(r) << " not handled on operation " << op
                << " (" << spos << ", or op " << spos.op << ", counting from 0)" << dendl;