Skip to content

Commit

Permalink
Merge pull request ceph#54196 from ivancich/wip-log-bi-list-errors
Browse files Browse the repository at this point in the history
rgw: log errors during "bi list"

Reviewed-by: Casey Bodley <[email protected]>
Reviewed-by: Jiffin Tony Thottan <[email protected]>
  • Loading branch information
ivancich authored Nov 7, 2023
2 parents 0bed9a9 + 8b8941c commit 4d482e5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/rgw/rgw_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7671,7 +7671,8 @@ int main(int argc, const char **argv)

int ret = init_bucket(user.get(), tenant, bucket_name, bucket_id, &bucket);
if (ret < 0) {
cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl;
ldpp_dout(dpp(), 0) << "ERROR: could not init bucket: " << cpp_strerror(-ret) <<
dendl;
return -ret;
}

Expand All @@ -7691,13 +7692,13 @@ int main(int argc, const char **argv)
int i = (specified_shard_id ? shard_id : 0);
for (; i < max_shards; i++) {
ldpp_dout(dpp(), 20) << "INFO: " << __func__ << ": starting shard=" << i << dendl;
marker.clear();

RGWRados::BucketShard bs(static_cast<rgw::sal::RadosStore*>(driver)->getRados());
int ret = bs.init(dpp(), bucket->get_info(), index, i, null_yield);
marker.clear();

if (ret < 0) {
cerr << "ERROR: bs.init(bucket=" << bucket << ", shard=" << i << "): " << cpp_strerror(-ret) << std::endl;
ldpp_dout(dpp(), 0) << "ERROR: bs.init(bucket=" << bucket << ", shard=" << i <<
"): " << cpp_strerror(-ret) << dendl;
return -ret;
}

Expand All @@ -7706,7 +7707,7 @@ int main(int argc, const char **argv)
// if object is specified, we use that as a filter to only retrieve some some entries
ret = static_cast<rgw::sal::RadosStore*>(driver)->getRados()->bi_list(bs, object, marker, max_entries, &entries, &is_truncated, null_yield);
if (ret < 0) {
cerr << "ERROR: bi_list(): " << cpp_strerror(-ret) << std::endl;
ldpp_dout(dpp(), 0) << "ERROR: bi_list(): " << cpp_strerror(-ret) << dendl;
return -ret;
}
ldpp_dout(dpp(), 20) << "INFO: " << __func__ <<
Expand Down

0 comments on commit 4d482e5

Please sign in to comment.