]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: resharding needs to set back the bucket ACL after link 20039/head
authorOrit Wasserman <owasserm@redhat.com>
Sun, 21 Jan 2018 10:11:34 +0000 (12:11 +0200)
committerOrit Wasserman <owasserm@redhat.com>
Sun, 4 Feb 2018 05:06:52 +0000 (07:06 +0200)
Jewel only fix. New implementation of resharding in Luminous.
Fixes: http://tracker.ceph.com/issues/22703
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_admin.cc

index 2faf3c1eeec405bd1973190377a99e5c9f6977dd..28d93fb2998071238e85812a502ad9bb1b03a295 100644 (file)
@@ -5121,7 +5121,7 @@ next:
     int num_target_shards = (new_bucket_info.num_shards > 0 ? new_bucket_info.num_shards : 1);
 
     BucketReshardManager target_shards_mgr(store, new_bucket_info, num_target_shards);
-    
+
     if (verbose) {
       formatter->open_array_section("entries");
     }
@@ -5207,6 +5207,14 @@ next:
       cerr << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << err << "; " << cpp_strerror(-r) << std::endl;
       return -r;
     }
+
+    r = rgw_bucket_set_attrs(store, new_bucket_info, attrs, &new_bucket_info.objv_tracker);
+    if (r < 0) {
+      cerr << "failed to reset attrs for bucket " << new_bucket_info.bucket.name <<
+       " instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << err << "; " << cpp_strerror(-ret)
+          << ")" << std::endl;
+    }
+
   }
 
   if (opt_cmd == OPT_OBJECT_UNLINK) {