From 0a235d6927613dbc9ebd0fda86a95ffa99c48978 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 19 Sep 2018 07:16:19 -0500 Subject: [PATCH] ceph-objectstore-tool: add back pool dne check Signed-off-by: Sage Weil --- src/tools/ceph_objectstore_tool.cc | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.39.5