]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix set_buckets_enabled(), set_bucket_owner()
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 30 Jul 2013 20:53:53 +0000 (13:53 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 30 Jul 2013 23:03:12 +0000 (16:03 -0700)
Fixes: 5808
We cannot call get_bucket_instance_info() at that point,
as the bucket structure wasn't initialized, so we don't
have the bucket instance location information. Just calling
get_bucket_info().

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/rgw/rgw_rados.cc

index 7131df9eaebb23c284fb604fecc394f96ca16708..aba5cdf0ee273796298acc5da2a2526d2b30cfb4 100644 (file)
@@ -2907,7 +2907,7 @@ int RGWRados::set_bucket_owner(rgw_bucket& bucket, ACLOwner& owner)
 {
   RGWBucketInfo info;
   map<string, bufferlist> attrs;
-  int r = get_bucket_instance_info(NULL, bucket, info, NULL, &attrs);
+  int r = get_bucket_info(NULL, bucket.name, info, NULL, &attrs);
   if (r < 0) {
     ldout(cct, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << dendl;
     return r;
@@ -2940,7 +2940,7 @@ int RGWRados::set_buckets_enabled(vector<rgw_bucket>& buckets, bool enabled)
 
     RGWBucketInfo info;
     map<string, bufferlist> attrs;
-    int r = get_bucket_instance_info(NULL, bucket, info, NULL, &attrs);
+    int r = get_bucket_info(NULL, bucket.name, info, NULL, &attrs);
     if (r < 0) {
       ldout(cct, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << ", skipping bucket" << dendl;
       ret = r;