Merge pull request #12181 from SUSE/wip-18037

osd: improve error message when FileStore op fails due to EPERM

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
This commit is contained in:
Nathan Cutler 2017-01-04 19:06:25 +01:00 committed by GitHub
commit cc4551485a

View 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;