Project

General

Profile

Feature #11148

RGW Swift API: support for 202 Accepted response code on container creation

Added by Radoslaw Zarzynski about 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Low
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer
Reviewed:
Affected Versions:
Pull request ID:

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

Copied to rgw - Backport #12299: RGW Swift API: support for 202 Accepted response code on container creation Resolved 03/18/2015

Associated revisions

Revision 3998fe7e (diff)
Added by Radoslaw Zarzynski about 9 years ago

rgw: rectify 202 Accepted in response for PUT on existing bucket.

Fixes: #11148
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <>

Revision c78cc00a (diff)
Added by Radoslaw Zarzynski over 8 years ago

rgw: rectify 202 Accepted in response for PUT on existing bucket.

Fixes: #11148
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <>
(cherry picked from commit 3998fe7e02a6c25a3302c80a9c9907357fd3a23e)

History

#1 Updated by Radoslaw Zarzynski about 9 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 about 9 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 about 9 years ago

  • Status changed from In Progress to Fix Under Review

#4 Updated by Nathan Cutler over 8 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to hammer

#5 Updated by Nathan Cutler over 8 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF