From: Yehuda Sadeh Date: Sat, 24 Sep 2016 17:46:36 +0000 (-0700) Subject: rgw_admin: reshard also links to new bucket instance X-Git-Tag: v11.1.0~548^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=094fe3f0cfeb27b32abfc93b07054b60de363a20;p=ceph.git rgw_admin: reshard also links to new bucket instance Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 5f46f6e1b3b9..bfa072f444a2 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -4836,6 +4836,15 @@ next: } delete target_shards[i]; } + + bucket_op.set_bucket_id(new_bucket_info.bucket.bucket_id); + bucket_op.set_user_id(new_bucket_info.owner); + string err; + int r = RGWBucketAdminOp::link(store, bucket_op, &err); + if (r < 0) { + cerr << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << err << "; " << cpp_strerror(-r) << std::endl; + return -r; + } } if (opt_cmd == OPT_OBJECT_UNLINK) {