]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-objectstore-tool: add back pool dne check 23985/head
authorSage Weil <sage@redhat.com>
Wed, 19 Sep 2018 12:16:19 +0000 (07:16 -0500)
committerSage Weil <sage@redhat.com>
Thu, 20 Sep 2018 17:58:00 +0000 (12:58 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/tools/ceph_objectstore_tool.cc

index 0ba7f679d2a337dafe6794359733bd0c6192bf01..6e1e94e1058089a80919868b840079b83956f229 100644 (file)
@@ -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);