From 676014580dadc48b4c7220794195e79f1a694b04 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 11 May 2015 12:53:52 +0100 Subject: [PATCH] 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 --- src/tools/cephfs/TableTool.cc | 1 + 1 file changed, 1 insertion(+) 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); -- 2.47.3