[ 
https://issues.apache.org/jira/browse/HDDS-13447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18007315#comment-18007315
 ] 

Wei-Chiu Chuang commented on HDDS-13447:
----------------------------------------

https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html

The specification doesn't state what is supported range, other than that it's 
an integer.

MaxKeys
Sets the maximum number of keys returned in the response. By default, the 
action returns up to 1,000 key names. The response might contain fewer keys but 
will never contain more.

Type: Integer

> [S3G] ListObjectsV2 should accept maxKeys=0
> -------------------------------------------
>
>                 Key: HDDS-13447
>                 URL: https://issues.apache.org/jira/browse/HDDS-13447
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Wei-Chiu Chuang
>            Priority: Major
>
> I'm getting this error running mountpoint-s3:
>  
> {noformat}
> bash-5.1$ mount-s3 -f --force-path-style bucket1 mnt --endpoint-url 
> http://localhost:9878/
> 2025-07-15T08:19:12.219715Z  WARN mountpoint_s3::cli: failed to detect 
> network throughput. Using 10 gbps as throughput. Use 
> --maximum-throughput-gbps CLI flag to configure a target throughput 
> appropriate for the instance. Detection failed due to: failed to get instance 
> type: IMDS query failed: Unknown CRT error
> 2025-07-15T08:19:12.219824Z  WARN mountpoint_s3_fs::s3::config: endpoint 
> specified but region unspecified. using us-east-1 as the signing region.
> 2025-07-15T08:19:12.272612Z  WARN list_objects{id=0 bucket="bucket1" 
> continued=false delimiter="" max_keys="0" prefix=""}: 
> mountpoint_s3_client::s3_crt_client: duration=24.045594ms 
> request_id=85ea3230-2d51-4a32-9796-b2ca4672c4e3 
> request_result=MetaRequestResult { response_status: 400, crt_error: 
> Error(14343, "aws-c-s3: AWS_ERROR_S3_INVALID_RESPONSE_STATUS, Invalid 
> response status from request"), error_response_headers: Some(Headers { inner: 
> 0xfe7628012a80 }), error_response_body: Some("<?xml version=\"1.0\" 
> encoding=\"UTF-8\"?>\n<Error>\n  <Code>InvalidArgument</Code>\n  
> <Message>Invalid Argument</Message>\n  <Resource>maxKeys must be > 
> 0</Resource>\n  
> <RequestId>85ea3230-2d51-4a32-9796-b2ca4672c4e3</RequestId>\n</Error>\n") } 
> meta request failed
> Error: Failed to create S3 clientCaused by:
>     0: initial ListObjectsV2 failed for bucket bucket1 in region us-east-1
>     1: Client error
>     2: Unknown response error: MetaRequestResult { response_status: 400, 
> crt_error: Error(14343, "aws-c-s3: AWS_ERROR_S3_INVALID_RESPONSE_STATUS, 
> Invalid response status from request"), error_response_headers: Some(Headers 
> { inner: 0xfe7628012a80 }), error_response_body: Some("<?xml version=\"1.0\" 
> encoding=\"UTF-8\"?>\n<Error>\n  <Code>InvalidArgument</Code>\n  
> <Message>Invalid Argument</Message>\n  <Resource>maxKeys must be > 
> 0</Resource>\n  
> <RequestId>85ea3230-2d51-4a32-9796-b2ca4672c4e3</RequestId>\n</Error>\n") } 
> {noformat}
> This is broken by HDDS-12870. S3G should accept maxKeys=0 and reject maxKeys 
> < 0.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to