Project

General

Profile

Actions

Bug #11088

closed

RGW Swift API: wrong handling of empty metadata on Swift container

Added by Radoslaw Zarzynski about 9 years ago. Updated almost 9 years ago.

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

0%

Source:
other
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Ceph RADOS Gateway allows to set empty container metadata items if they are currently not present.

$ curl -i http://localhost:8080/swift/v1/cont -X POST -H "X-Auth-Token: $token" -H "X-Container-Meta-Test;"

HTTP/1.1 204 No Content
Server: nginx/1.4.6 (Ubuntu)
Date: Tue, 10 Mar 2015 17:52:31 GMT
Content-Type: text/plain; charset=utf-8
Connection: keep-alive

$ curl -i http://localhost:8080/swift/v1/cont -X HEAD -H "X-Auth-Token: $token"

HTTP/1.1 204 No Content
Server: nginx/1.4.6 (Ubuntu)
Date: Tue, 10 Mar 2015 17:52:39 GMT
Content-Type: text/plain; charset=utf-8
Connection: keep-alive
X-Container-Object-Count: 3
X-Container-Bytes-Used: 0
X-Container-Bytes-Used-Actual: 0
X-Storage-Policy: default-placement
X-Container-Meta-test:

Swift filters out such items:
$ curl -i http://localhost:9090/v1/AUTH_test/cont -X POST -H "X-Auth-Token: $token" -H "X-Container-Meta-Test;"

HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txe2a69d98c60f45889bd84-0054ff2f14
Date: Tue, 10 Mar 2015 17:51:16 GMT

$ curl -i http://localhost:9090/v1/AUTH_test/cont -X HEAD -H "X-Auth-Token: $token"

HTTP/1.1 204 No Content
Content-Length: 0
X-Container-Object-Count: 2
Accept-Ranges: bytes
X-Timestamp: 1424789735.12920
X-Container-Bytes-Used: 0
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx32a97f9099984fc58d827-0054ff2f1b
Date: Tue, 10 Mar 2015 17:51:23 GMT

Actions #1

Updated by Radoslaw Zarzynski about 9 years ago

I'm working on that.

Actions #3

Updated by Radoslaw Zarzynski about 9 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Radoslaw Zarzynski
Actions #4

Updated by Yehuda Sadeh about 9 years ago

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

Merged in, commit:e35269e74966c8d8c3fdfa02e286142bc4d35545

Actions #6

Updated by Loïc Dachary almost 9 years ago

  • Status changed from Pending Backport to Resolved
  • Regression set to No
Actions

Also available in: Atom PDF