]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_reshard.cc
update sources to v12.1.2
[ceph.git] / ceph / src / rgw / rgw_reshard.cc
index 12c324e721940a8bd06cf87005eec9b9d791f19c..0389ca33dce293c4fba356db6b3568d5416b1e76 100644 (file)
@@ -534,6 +534,7 @@ int RGWBucketReshard::execute(int num_shards, int max_op_entries,
   if (reshard_log) {
     ret = reshard_log->update(bucket_info, new_bucket_info);
     if (ret < 0) {
+      unlock_bucket();
       return ret;
     }
   }
@@ -639,14 +640,20 @@ int RGWReshard::list(int logshard_num, string& marker, uint32_t max, std::list<c
   get_logshard_oid(logshard_num, &logshard_oid);
 
   int ret = cls_rgw_reshard_list(store->reshard_pool_ctx, logshard_oid, marker, max, entries, is_truncated);
-  if (ret < 0 && ret != -ENOENT) {
+
+  if (ret < 0) {
+    if (ret == -ENOENT) {
+      *is_truncated = false;
+      ret = 0;
+    }
     lderr(store->ctx()) << "ERROR: failed to list reshard log entries, oid=" << logshard_oid << dendl;
-    return ret;
-  }
-  if (ret == -ENOENT) {
-    *is_truncated = false;
+    if (ret == -EACCES) {
+      lderr(store->ctx()) << "access denied to pool " << store->get_zone_params().reshard_pool
+                          << ". Fix the pool access permissions of your client" << dendl;
+    }
   }
-  return 0;
+
+  return ret;
 }
 
 int RGWReshard::get(cls_rgw_reshard_entry& entry)