From: John Spray Date: Mon, 11 May 2015 11:53:52 +0000 (+0100) Subject: tools: fix tabletool reset of nonexistent sessionmap X-Git-Tag: v9.0.2~184^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F4522%2Fhead;p=ceph.git tools: fix tabletool reset of nonexistent sessionmap If the object didn't exist, the omap clear was failing and preventing the subsueent omap set header from executing. Set the FAILOK flag on the omap clear sub-operation. Signed-off-by: John Spray --- diff --git a/src/tools/cephfs/TableTool.cc b/src/tools/cephfs/TableTool.cc index 8afdebe2023a..b54256f3dea6 100644 --- a/src/tools/cephfs/TableTool.cc +++ b/src/tools/cephfs/TableTool.cc @@ -353,6 +353,7 @@ public: // Compose a transaction to clear and write header librados::ObjectWriteOperation op; op.omap_clear(); + op.set_op_flags(librados::OP_FAILOK); op.omap_set_header(header_bl); return io->operate(object_name, &op);