Bug 2336983

Summary: [IBM Support] RGW return code behavior adjustment for bucket creation nuance
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Anthony D'Atri <anthony.datri>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: VERIFIED --- QA Contact: Anuchaithra <anrao>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: anrao, anthony.datri, bkunal, cbodley, ceph-eng-bugs, cephqe-warriors, dparkes, gsitlani, kbader, mbenjamin, pdhiran, racpatel, tserlin
Target Milestone: ---Flags: anrao: needinfo? (mbenjamin)
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-19.2.1-62.el9cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2349723 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2349723    

Description Anthony D'Atri 2025-01-10 16:58:41 UTC
Description of problem:

Customer excepts different behavior for RGW bucket creation.  Ask is an option that when enabled will cause RGW to always return 409 if a CreateBucket call is made for a bucket that already exists.  When false (default) the current 200 behavior will continue.

The behavior that is documented here: https://docs.ceph.com/en/latest/radosgw/s3/bucketops/#http-response, is what Casey mentioned if it's the same owner, you don't get any message/error if it's a different owner, you get a 409 BucketAlreadyExists . 

Version-Release number of selected component (if applicable):

7.1* currently, expected to be the same with 8.x.  Probably requires a 7.1* backport.

How reproducible:

```
[root@ceph01 ~]# aws s3 mb s3://testingb --region default
make_bucket: testingb
[root@ceph01 ~]# aws s3 mb s3://testingb --region default
make_bucket: testingb
[root@ceph01 ~]# radosgw-admin bucket list | grep protect
    "protect"
[root@ceph01 ~]# aws s3 mb s3://protect --region default
make_bucket failed: s3://protect An error occurred (BucketAlreadyExists) when calling the CreateBucket operation: Cannot modify existing access control policy
[root@ceph01 ~]# aws s3api create-bucket --bucket protect --region default
An error occurred (BucketAlreadyExists) when calling the CreateBucket operation: Cannot modify existing access control policy
```


Steps to Reproduce:
1.
2.
3.

Actual results:
409

Expected results:
200

Additional info: