From d28a853a331cc7152df6220d62ad4fea8d9724a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rados=C5=82aw=20Zarzy=C5=84ski?= Date: Fri, 10 Jun 2022 13:37:08 +0200 Subject: [PATCH] tools: COT ignores fsid mismatch when importing PG with --force MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Radosław Zarzyński --- src/tools/ceph_objectstore_tool.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index b51c7c1f5dc24..1cc51e1a6571f 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) { -- 2.47.3