From: Radosław Zarzyński Date: Fri, 10 Jun 2022 11:37:08 +0000 (+0200) Subject: tools: COT ignores fsid mismatch when importing PG with --force X-Git-Tag: v18.0.0~487^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F46620%2Fhead;p=ceph.git tools: COT ignores fsid mismatch when importing PG with --force Signed-off-by: Radosław Zarzyński --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index b51c7c1f5dc..1cc51e1a657 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -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) {