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: v0.94.10~8^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37cda4ec1fee1d6e413d1ffe8c5f4f6558634740;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 a4483ad8db6..7049055426c 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2645,6 +2645,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) {