Tejaskriya opened a new pull request, #5319:
URL: https://github.com/apache/ozone/pull/5319

   ## What changes were proposed in this pull request?
   
   AWS s3 returns with an exit code of 255 if a create-bucket on an existing 
bucket is done but ozone was returning the location of the bucket each time 
instead. In order to match the behaviours, S3G now throws a new error 
BUCKET_ALREADY_EXISTS if we try to create-bucket on an existing bucket.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-9314
   
   ## How was this patch tested?
   
   Added test in TestBucketPut. Also tested manually using docker:
   ```
   $ aws s3api --endpoint http://localhost:9878 create-bucket --bucket bucket1
   {
       "Location": "http://localhost:9878/bucket1";
   }
   
   $ aws s3api --endpoint http://localhost:9878 create-bucket --bucket bucket1 
   
   An error occurred (BucketAlreadyExists) when calling the CreateBucket 
operation: The requested bucket name is not available as it already exists.
   
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to