Merge pull request #46620 from rzarzynski/wip-tools-cot-force-pg-import

tools: COT ignores fsid mismatch when importing PG with --force

Reviewed-by: Nitzan Mordechai <nmordech@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
Yuri Weinstein 2022-07-18 13:38:05 -07:00 committed by GitHub
commit 026762fae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1823,7 +1823,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) {