]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: clarify when encountering eacces for reshard list
authorKarol Mroz <kmroz@suse.de>
Thu, 6 Jul 2017 17:39:01 +0000 (10:39 -0700)
committerAbhishek Lekshmanan <abhishek@suse.com>
Mon, 17 Jul 2017 12:48:07 +0000 (14:48 +0200)
Specify that we don't have access to the reshard pool when encountering
EACCESS.
TODO: get rgw's name and add that in the log message

Fixes http://tracker.ceph.com/issues/20289

Signed-off-by: Karol Mroz <kmroz@suse.de>
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_reshard.cc

index 12c324e721940a8bd06cf87005eec9b9d791f19c..1612385a0c042c476734d218a0f9fdae56fe7f45 100644 (file)
@@ -639,14 +639,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)