]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_admin: reshard also links to new bucket instance
authorYehuda Sadeh <yehuda@redhat.com>
Sat, 24 Sep 2016 17:46:36 +0000 (10:46 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 30 Sep 2016 17:16:37 +0000 (10:16 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_admin.cc

index a4483ad8db619f54d5b1015c26df177f9eb839f4..7049055426c34f42d1cb3ecc5bfe83663102bff4 100644 (file)
@@ -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) {