Feature #11148
RGW Swift API: support for 202 Accepted response code on container creation
0%
Description
Swift will return 202 Accepted if the container already exists. This behaviour is not covered by the OpenStack Object Storage API v1, so the issue is nothing more than a feature request.
On currently existing container /cont:
1. RGW via civetweb frontend:
$ curl -i http://localhost:8000/swift/v1/cont/ -X PUT -H "X-Auth-Token: $token"
HTTP/1.1 201 Created
Content-type: text/plain; charset=utf-8
Content-Length: 0
Date: Wed, 18 Mar 2015 15:00:03 GMT
2. Swift
$ curl -i http://localhost:9090/v1/AUTH_test/cont/ -X PUT -H "X-Auth-Token: $token"
HTTP/1.1 202 Accepted
Content-Length: 76
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx31b78ca004934467bb51e-00550992d4
Date: Wed, 18 Mar 2015 14:59:32 GMT
Related issues
Associated revisions
rgw: rectify 202 Accepted in response for PUT on existing bucket.
Fixes: #11148
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
rgw: rectify 202 Accepted in response for PUT on existing bucket.
Fixes: #11148
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit 3998fe7e02a6c25a3302c80a9c9907357fd3a23e)
History
#1 Updated by Radoslaw Zarzynski over 8 years ago
- Subject changed from RGW Swift API: lack of support for 202 Accepted response code on container creation to RGW Swift API: support for 202 Accepted response code on container creation
#2 Updated by Radoslaw Zarzynski over 8 years ago
- Status changed from New to In Progress
- Assignee set to Radoslaw Zarzynski
It looks like that all RGWCreateBucket_ObjStore_*::_send_response() methods are already prepared to handle the 202 Accepted. However, a little problem in RGWCreateBucket::execute() exists. Fixing.
#3 Updated by Radoslaw Zarzynski over 8 years ago
- Status changed from In Progress to Fix Under Review
Pull request: https://github.com/ceph/ceph/pull/4104.
#4 Updated by Nathan Cutler about 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer
#5 Updated by Nathan Cutler about 8 years ago
- Status changed from Pending Backport to Resolved