From: Jiaying Ren Date: Wed, 10 May 2017 06:58:27 +0000 (+0800) Subject: rgw: fix lc list failure when shards not be all created X-Git-Tag: v12.1.0~10^2~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=18eb21fa509fd42aeed6869737e1a06e09d1bda0;p=ceph.git rgw: fix lc list failure when shards not be all created Default lc shard is 32, if we had created few lc config,that all been sharded to lc.31, then `radosgw-admin lc list` failed by can't find lc.0. Fixes: http://tracker.ceph.com/issues/19898 Signed-off-by: Jiaying Ren --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 38a66a35573..494f8db76d1 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -545,8 +545,15 @@ int RGWLC::list_lc_progress(const string& marker, uint32_t max_entries, map entries; int ret = cls_rgw_lc_list(store->lc_pool_ctx, obj_names[index], marker, max_entries, entries); - if (ret < 0) - return ret; + if (ret < 0) { + if (ret == -ENOENT) { + dout(10) << __func__ << " ignoring unfound lc object=" + << obj_names[index] << dendl; + continue; + } else { + return ret; + } + } map::iterator iter; for (iter = entries.begin(); iter != entries.end(); ++iter) { progress_map->insert(*iter);