HDDS-12869. Add some corner cases in create bucket - #11240
Open
rajeshkumarchandolu wants to merge 3 commits into
Open
rajeshkumarchandolu wants to merge 3 commits into
rajeshkumarchandolu wants to merge 3 commits into
Conversation
Gargi-jais11
self-requested a review
September 15, 2026 04:07
Contributor
There was a problem hiding this comment.
We could also add some more cases like names with:
- Leading dash
- Leading period
- Trailing period
- All numeric
Author
There was a problem hiding this comment.
@sreejasahithi can you validate now . i had added all the scenarios mentioned
Contributor
There was a problem hiding this comment.
Thanks @rajeshkumarchandolu for adding robot tests.
+1 to @sreejasahithi comment.
Please check this aws documentation for naming rules and add one robot test for each rules which are currently supported by ozone. This was we can verify each of the rules are satisfied.
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?
This change extends the S3 gateway smoketest coverage for create-bucket behavior aligned with AWS naming rules and related error responses.
What and why
HDDS-12869 adds Robot tests for create-bucket corner cases: invalid bucket names (length, character set, uppercase, leading/trailing punctuation, IP-shaped names, adjacent periods, all-numeric names) and validation that duplicate create returns the expected error when the requester already owns the bucket. The S3 gateway already returns the appropriate error codes; this PR adds smoketest coverage so regressions are caught in compose/CI.
Changes
In
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot, the following test cases are added or updated:ab) →InvalidBucketNameInvalidBucketNameInvalidBucketNameInvalidBucketNametest#12-$) → error message containsInvalid bucket name(AWS CLI client validation)InvalidBucketNameInvalidBucketNameInvalidBucketName--bucket=-test) →InvalidBucketNameInvalidBucketNameInvalidBucketNameInvalidBucketNameDuplicate create with the same name and the same credentials is unchanged; it remains covered by the existing
Create bucket which already existstest, which expectsBucketAlreadyOwnedByYou.The 63-character success case uses a unique 63-character name (
bplus 62 random lowercase characters) so repeated runs on the same compose cluster do not fail withBucketAlreadyOwnedByYouon a fixed bucket name.Pre-existing cases in the same file (
Create new bucket, default group ACL, web-endpoint-style bucket names, bucket ownership verification) are unchanged and still run as part of the suite.No S3 gateway or OM code changes are included.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-12869
How was this patch tested?
Manual smoketest on the docker-compose
ozoneenvironment:Build dist smoketest artifacts:
mvn clean install -DskipTests -f hadoop-ozone/dist/pom.xmlFrom
hadoop-ozone/dist/target/ozone-*-SNAPSHOT/compose/ozone, start compose (recreate containers after a dist rebuild if needed):docker compose up -dRun the robot suite:
../test-single.sh s3g s3/bucketcreate.robotNote:
Test buckets named like web endpointsuses fixed bucket names (conf,jmx, …). On a cluster where those buckets already exist from a prior run, delete them or recreate the compose environment before re-running the suite.Result: 19 tests, 19 passed, 0 failed.
No unit tests or product code changes in this PR. No UI changes.