HDDS-15608. Return BucketAlreadyOwnedByYou when the same S3 owner recreates an existing bucket#10814
Open
Gargi-jais11 wants to merge 1 commit into
Open
HDDS-15608. Return BucketAlreadyOwnedByYou when the same S3 owner recreates an existing bucket#10814Gargi-jais11 wants to merge 1 commit into
Gargi-jais11 wants to merge 1 commit into
Conversation
rich7420
reviewed
Jul 21, 2026
|
|
||
| @Test | ||
| public void testCreateBucketAndFailOnDuplicate() throws Exception { | ||
| public void testCreateBucketAndFailOnDuplicateWithSameOWNER() throws Exception { |
Contributor
There was a problem hiding this comment.
Small non-blocking nits: the same-owner case here passes via null == null (the stub bucket has no owner and no principal is set), so it doesn't quite exercise a real owner match. Setting a principal and a matching bucket owner would cover getRequestOwner(). Thanks!
rich7420
reviewed
Jul 21, 2026
rich7420
left a comment
Contributor
There was a problem hiding this comment.
@Gargi-jais11 thanks for the patch!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
s3-tests
test_bucket_create_existsfails when the same S3 client creates a bucket twice. Ozone S3 Gateway always returns 409 with error code BucketAlreadyExists.AWS S3 expects:
Add BUCKET_ALREADY_OWNED_BY_YOU to
S3ErrorTable(BucketAlreadyOwnedByYou, HTTP 409) and return when same S3 owner creates a bucket that already existsWhat is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15608
How was this patch tested?
Added IT and UT.
Manual Testing:
Before Fix:
After Fix: