Project

General

Profile

Bug #12108

RGW Swift API: X-Trans-Id header is wrongly formatted

Added by Radoslaw Zarzynski over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
06/22/2015
Due date:
% Done:

0%

Source:
Q/A
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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

Copied to rgw - Backport #12853: RGW Swift API: X-Trans-Id header is wrongly formatted Resolved 06/22/2015

Associated revisions

Revision d1735a4e (diff)
Added by Radoslaw Zarzynski over 3 years ago

rgw: rework X-Trans-Id header to be conform with Swift API.

Fixes: #12108
Signed-off-by: Radoslaw Zarzynski <>

Revision da00bedb (diff)
Added by Radoslaw Zarzynski about 3 years ago

rgw: rework X-Trans-Id header to be conform with Swift API.

Fixes: #12108
Signed-off-by: Radoslaw Zarzynski <>
(cherry picked from commit d1735a4e8ea2056d333a5001a7a410fc03fe1b9e)

History

#1 Updated by Radoslaw Zarzynski over 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Radoslaw Zarzynski

Working on that.

#2 Updated by Radoslaw Zarzynski over 3 years ago

  • Status changed from In Progress to Need Review

#3 Updated by Yehuda Sadeh over 3 years ago

  • Status changed from Need Review to Pending Backport
  • Backport set to hammer

#4 Updated by Loic Dachary about 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF