You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "rajeshkumarchandolu (via GitHub)" <gi...@apache.org> on 2026/09/15 03:30:36 UTC
[PR] HDDS-12869. Add S3 create-bucket naming corner cases to bucketcreate … [ozone]
rajeshkumarchandolu opened a new pull request, #11240:
URL: https://github.com/apache/ozone/pull/11240
## 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](https://issues.apache.org/jira/browse/HDDS-12869) adds robot tests for create-bucket corner cases: invalid bucket names (length, uppercase, trailing dash) 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:
| Test | Expected |
|------|----------|
| Name too short (`ab`) | `InvalidBucketName` |
| Name too long (64 characters) | `InvalidBucketName` |
| All-uppercase bucket name | `InvalidBucketName` |
| Mixed-uppercase bucket name | `InvalidBucketName` |
| Trailing dash in name | `InvalidBucketName` |
| Maximum valid length (63 characters) | Success |
Duplicate create with the same name and the same credentials is unchanged; it remains covered by the existing `Create bucket which already exists` test, which expects `BucketAlreadyOwnedByYou`.
The 63-character success case uses a unique 63-character name (`b` plus 62 random lowercase characters) so repeated runs on the same compose cluster do not fail with `BucketAlreadyOwnedByYou` on a fixed bucket name.
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 `ozone` environment:
1. Build dist smoketest artifacts:
```bash
mvn clean install -DskipTests -f hadoop-ozone/dist/pom.xml
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12869. Add S3 create-bucket naming corner cases to bucketcreate … [ozone]
Posted by "sreejasahithi (via GitHub)" <gi...@apache.org>.
sreejasahithi commented on code in PR #11240:
URL: https://github.com/apache/ozone/pull/11240#discussion_r4011959714
##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot:
##########
Review Comment:
We could also add some more cases like names with:
- Leading dash
- Leading period
- Trailing period
- All numeric
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12869. Add S3 create-bucket naming corner cases to bucketcreate … [ozone]
Posted by "sreejasahithi (via GitHub)" <gi...@apache.org>.
sreejasahithi commented on code in PR #11240:
URL: https://github.com/apache/ozone/pull/11240#discussion_r4011959714
##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot:
##########
Review Comment:
We could also add some more cases like :
- Leading dash
- Leading period
- Trailing period
- All numeric
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12869. Add some corner cases in create bucket [ozone]
Posted by "ashishkumar50 (via GitHub)" <gi...@apache.org>.
ashishkumar50 merged PR #11240:
URL: https://github.com/apache/ozone/pull/11240
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12869. Add some corner cases in create bucket [ozone]
Posted by "ashishkumar50 (via GitHub)" <gi...@apache.org>.
ashishkumar50 commented on code in PR #11240:
URL: https://github.com/apache/ozone/pull/11240#discussion_r4022763623
##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot:
##########
@@ -42,6 +47,59 @@ Create bucket with invalid bucket name
${result} = Execute AWSS3APICli and checkrc create-bucket --bucket invalid_bucket_${randStr} 255
Should contain ${result} InvalidBucketName
+Create bucket with name too short
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket ab 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket with name too long
+ ${bucket} = Evaluate 'a' * 64
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket ${bucket} 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket with all uppercase characters in bucket name
+ ${randStr} = Generate Random String 8 [UPPER]
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket BUCKET${randStr} 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket with mixed uppercase characters in bucket name
+ ${randStr} = Generate Random String 8 [LOWER]
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket BuCkEt-${randStr} 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket validate names can consist only of lowercase letters, numbers, periods (.), and hyphens (-).
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket test#12-$ 255
+ Should contain ${result} Invalid bucket name
Review Comment:
`test#12-$ `appears to be rejected by the AWS CLI client before the request reaches the S3 Gateway. Since this PR is intended to provide Ozone S3 Gateway smoketest coverage, this case doesn't provide regression coverage for Ozone.
It could be addressed separately in another PR.
##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot:
##########
@@ -42,6 +47,59 @@ Create bucket with invalid bucket name
${result} = Execute AWSS3APICli and checkrc create-bucket --bucket invalid_bucket_${randStr} 255
Should contain ${result} InvalidBucketName
+Create bucket with name too short
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket ab 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket with name too long
+ ${bucket} = Evaluate 'a' * 64
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket ${bucket} 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket with all uppercase characters in bucket name
+ ${randStr} = Generate Random String 8 [UPPER]
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket BUCKET${randStr} 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket with mixed uppercase characters in bucket name
+ ${randStr} = Generate Random String 8 [LOWER]
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket BuCkEt-${randStr} 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket validate names can consist only of lowercase letters, numbers, periods (.), and hyphens (-).
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket test#12-$ 255
+ Should contain ${result} Invalid bucket name
+
+Create bucket validate names must begin and end with a letter or number.
+ ${randStr} = Generate Random String 8 [LOWER]
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket bucket-${randStr}- 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket validate names must not contain two adjacent periods.
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket test..bucket 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket validate names must not be formatted as an IP address (for example, 192.168.5.4).
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket 192.168.5.4 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket validate names must not contain leading dash
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket=-test 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket validate names must not contain leading period
+ ${result} = Execute AWSS3APICli and checkrc create-bucket --bucket .test 255
+ Should contain ${result} InvalidBucketName
+
+Create bucket validate names must not contain Trailing period
Review Comment:
nit: `trailing period`
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12869. Add some corner cases in create bucket [ozone]
Posted by "rajeshkumarchandolu (via GitHub)" <gi...@apache.org>.
rajeshkumarchandolu commented on code in PR #11240:
URL: https://github.com/apache/ozone/pull/11240#discussion_r4016771511
##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot:
##########
Review Comment:
@sreejasahithi can you validate now . i had added all the scenarios mentioned
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org