Bug #12108
RGW Swift API: X-Trans-Id header is wrongly formatted
0%
Description
It seems that X-Trans-Id doesn't comply to Swift implementation nor OpenStack Object Storage API v1 which defined the header type as csapi:uuid.
1. RGW via FCGI frontend:
$ curl -i ${publicURL} -X HEAD -H "X-Auth-Token: $token"
HTTP/1.1 204 No Content
Server: nginx/1.4.6 (Ubuntu)
Date: Mon, 22 Jun 2015 13:22:42 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 0
Connection: keep-alive
X-Timestamp: 1434979362.81427
X-Account-Container-Count: 0
X-Account-Object-Count: 0
X-Account-Bytes-Used: 0
X-Account-Bytes-Used-Actual: 0
X-Trans-Id: ts-default.4123.1-20150622:132242:783
Accept-Ranges: bytes
2. Swift:
$ curl -i ${publicURL} -X HEAD -H "X-Auth-Token: $token"
HTTP/1.1 204 No Content
Content-Length: 0
Accept-Ranges: bytes
X-Timestamp: 1430929360.01528
X-Account-Bytes-Used: 0
X-Account-Container-Count: 1
Content-Type: text/plain; charset=utf-8
X-Account-Object-Count: 0
X-Trans-Id: tx1d87435e9b6e4e7cb0965-0055880c2a
Date: Mon, 22 Jun 2015 13:22:50 GMT
What Tempest's tests expect is:
elif key == 'x-trans-id' and \ not re.match("^tx[0-9a-f]{21}-[0-9a-f]{10}.*", value): return InvalidFormat(key, value)
The currently used presentation format of X-Trans-Id causes early failure of many tests and thus could hide more important issues.
Related issues
Associated revisions
rgw: rework X-Trans-Id header to be conform with Swift API.
Fixes: #12108
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
rgw: rework X-Trans-Id header to be conform with Swift API.
Fixes: #12108
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit d1735a4e8ea2056d333a5001a7a410fc03fe1b9e)
History
#1 Updated by Radoslaw Zarzynski over 8 years ago
- Status changed from New to In Progress
- Assignee set to Radoslaw Zarzynski
Working on that.
#2 Updated by Radoslaw Zarzynski about 8 years ago
- Status changed from In Progress to Fix Under Review
Pull request: https://github.com/ceph/ceph/pull/5047.
#3 Updated by Yehuda Sadeh about 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer
#4 Updated by Loïc Dachary about 8 years ago
- Status changed from Pending Backport to Resolved