]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Wed, 19 Oct 2016 15:41:48 +0000 (08:41 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_admin.cc

index 5f46f6e1b3b945f9b306ba8351a14f144f42e013..bfa072f444a20d8ffdeab4dee9a634216a9911ea 100644 (file)
@@ -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) {