From: Sage Weil Date: Wed, 19 Sep 2018 12:16:19 +0000 (-0500) Subject: ceph-objectstore-tool: add back pool dne check X-Git-Tag: v14.0.1~211^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0a235d6927613dbc9ebd0fda86a95ffa99c48978;p=ceph.git ceph-objectstore-tool: add back pool dne check Signed-off-by: Sage Weil --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 0ba7f679d2a33..6e1e94e105808 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -1643,6 +1643,11 @@ int ObjectStoreTool::do_import(ObjectStore *store, OSDSuperblock& sb, cerr << "Can't find latest local OSDMap " << sb.current_epoch << std::endl; return ret; } + if (!curmap.have_pg_pool(pgid.pgid.m_pool)) { + cerr << "Pool " << pgid.pgid.m_pool << " no longer exists" << std::endl; + // Special exit code for this error, used by test code + return 10; // Positive return means exit status + } pool_pg_num_history_t pg_num_history; get_pg_num_history(store, &pg_num_history);