without this change, ListObjects would attempt to list index shard
objects that don't exist and fail with:
> ERROR: S3 error: 404 (NoSuchKey)
after:
> ERROR: S3 error: 405 (MethodNotAllowed): Indexless buckets cannot be listed
Signed-off-by: Casey Bodley <cbodley@redhat.com>
return;
}
+ if (const auto& current_index = s->bucket->get_info().layout.current_index;
+ current_index.layout.type == rgw::BucketIndexType::Indexless) {
+ s->err.message = "Indexless buckets cannot be listed";
+ op_ret = -ERR_METHOD_NOT_ALLOWED;
+ return;
+ }
+
if (allow_unordered && !delimiter.empty()) {
ldpp_dout(this, 0) <<
"ERROR: unordered bucket listing requested with a delimiter" << dendl;