This PR breaks the s3 client and radosgw-admin if there are a lot of uncomplete multiparts in the bucket.
Create a bucket.
$ s3cmd mb s3://test-bucket
Create over 150 uncomplete multiparts.
$ s3cmd -c testing.s3cfg put 1GB s3://test-bucket --multipart-chunk-size-mb=5
upload: '1GB' -> 's3://test-bucket/1GB' [part 1 of 205, 5MB] [1 of 1]
5242880 of 5242880 100% in 0s 27.60 MB/s done
...
upload: '1GB' -> 's3://test-bucket/1GB' [part 151 of 205, 5MB] [1 of 1]
5242880 of 5242880 100% in 0s 37.73 MB/s done
upload: '1GB' -> 's3://test-bucket/1GB' [part 152 of 205, 5MB] [1 of 1]
65536 of 5242880 1% in 0s 3.17 MB/s^CERROR:
Upload of '1GB' part 152 failed. Use
/usr/bin/s3cmd abortmp s3://test-bucket/1GB 2~NzYtsNgOq8hWplcDqnaZDHoPlP4Vkah
to abort the upload, or
/usr/bin/s3cmd --upload-id 2~NzYtsNgOq8hWplcDqnaZDHoPlP4Vkah put ...
to continue the upload.
See ya!
s3cmd shows the following error:
$ s3cmd ls s3://test-bucket --debug
...
DEBUG: Response:
{'data': '<?xml version="1.0" encoding="UTF-8"?><ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>test-bucket</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>true</IsTruncated></ListBucketResult>',
...
Invoked as: /usr/bin/s3cmd ls s3://test-bucket --debug
Problem: IndexError: list index out of range
...
Could not delete bucket
# radosgw-admin bucket rm --purge-objects --bypass-gc --bucket=test-bucket
The same message is repeated over and over.
2019-12-06 22:48:47.446570 7f0457018e00 1 RGWRados::Bucket::List::list_objects_ordered INFO ordered bucket listing requires read #2
2019-12-06 22:48:47.448804 7f0457018e00 1 RGWRados::Bucket::List::list_objects_ordered INFO ordered bucket listing requires read #3
2019-12-06 22:48:47.451057 7f0457018e00 1 RGWRados::Bucket::List::list_objects_ordered INFO ordered bucket listing requires read #2
2019-12-06 22:48:47.453403 7f0457018e00 1 RGWRados::Bucket::List::list_objects_ordered INFO ordered bucket listing requires read #3
2019-12-06 22:48:47.456087 7f0457018e00 1 RGWRados::Bucket::List::list_objects_ordered INFO ordered bucket listing requires read #2
2019-12-06 22:48:47.458373 7f0457018e00 1 RGWRados::Bucket::List::list_objects_ordered INFO ordered bucket listing requires read #3