From fad3c4992d7172a58b555f210d543f352cc89ccf Mon Sep 17 00:00:00 2001 From: Karol Mroz Date: Thu, 6 Jul 2017 10:39:01 -0700 Subject: [PATCH] rgw: clarify when encountering eacces for reshard list 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 Signed-off-by: Abhishek Lekshmanan --- src/rgw/rgw_reshard.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index 12c324e721940..1612385a0c042 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -639,14 +639,20 @@ int RGWReshard::list(int logshard_num, string& marker, uint32_t max, std::listreshard_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) -- 2.39.5