]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: COT ignores fsid mismatch when importing PG with --force 46620/head
authorRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 10 Jun 2022 11:37:08 +0000 (13:37 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 10 Jun 2022 11:37:08 +0000 (13:37 +0200)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/tools/ceph_objectstore_tool.cc

index b51c7c1f5dc24e6cce5712166ba8629844eef9ce..1cc51e1a6571fd40fb503c74f19552285997111e 100644 (file)
@@ -1806,7 +1806,11 @@ int ObjectStoreTool::do_import(ObjectStore *store, OSDSuperblock& sb,
       && pgb.superblock.cluster_fsid != sb.cluster_fsid) {
     cerr << "Export came from different cluster with fsid "
          << pgb.superblock.cluster_fsid << std::endl;
-    return -EINVAL;
+    if (force) {
+      cerr << "Ignoring this problem due to --force" << std::endl;
+    } else {
+      return -EINVAL;
+    }
   }
 
   if (debug) {