From 890d7131081bea2ae743a654c5b64b7febdf0757 Mon Sep 17 00:00:00 2001 From: Joshua Baergen Date: Wed, 19 Oct 2022 15:13:12 -0600 Subject: [PATCH] rgw: Fix truncated ListBuckets response. Commit 54b470facffe8251dc37b2020e771d4d061cb2ae caused s3:ListBuckets to return a maximum of 1000 buckets by default as it removed the truncation detection from this code. We can fix this by simply setting RGWListBuckets::is_truncated after querying for each batch of buckets. Signed-off-by: Joshua Baergen (cherry picked from commit 4bf05121407f2108152379bb3f92d1ecbd730ea3) --- src/rgw/rgw_op.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index cc3ff80845d35..b120a8c2d05ef 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -2465,6 +2465,8 @@ void RGWListBuckets::execute(optional_yield y) break; } + is_truncated = buckets.is_truncated(); + /* We need to have stats for all our policies - even if a given policy * isn't actually used in a given account. In such situation its usage * stats would be simply full of zeros. */ -- 2.39.5