Project

General

Profile

Actions

Feature #42031

open

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

Added by J. Eric Ivancich over 4 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
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.

Actions #1

Updated by J. Eric Ivancich over 4 years 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;
Actions #2

Updated by J. Eric Ivancich over 3 years 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
Actions #3

Updated by J. Eric Ivancich over 3 years ago

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

Also available in: Atom PDF