Project

General

Profile

Feature #42031

rgw: provide mech to allow unordered bucket listing to work past missing bucket index shards

Added by Eric Ivancich about 1 year ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Tags:
Backport:
nautilus,octopus
Reviewed:
Affected Versions:
Pull request ID:

Description

Currently a missing bucket index shard will cause an unordered bucket listing to fail. In the extreme case where a user obliterates a single bucket index shard, this would allow them to at least list all objects in their other shards, possibly allowing an emergency copy of listable objects to a recovery bucket.

History

#1 Updated by Eric Ivancich about 1 year ago

It seems like the place to do this is in RGWRados::cls_bucket_list_unordered. Ideally cls_rgw_bucket_list_op has a result of -ENOENT when a bucket index shard is missing....

Here's the code:

while (count <= num_entries &&
((shard_id >= 0 && current_shard == uint32_t(shard_id)) ||
current_shard < num_shards)) {
const std::string& oid = oids[current_shard];
rgw_cls_list_ret result;
librados::ObjectReadOperation op;
cls_rgw_bucket_list_op(op, marker, prefix, num_entries,
list_versions, &result);
r = index_ctx.operate(oid, &op, nullptr);
if (r < 0)
return r;

#2 Updated by Eric Ivancich about 2 months ago

  • Subject changed from rgw: provide mech to allow unordered bucket listing to work passed missing bucket index shards to rgw: provide mech to allow unordered bucket listing to work past missing bucket index shards

#3 Updated by Eric Ivancich about 2 months ago

  • Backport changed from luminous,mimic,nautilus to nautilus,octopus

Also available in: Atom PDF