Project

General

Profile

Bug #15812

No Last-Modified, Content-Size and X-Object-Manifest headers if no segments in DLO manifest

Added by Antonio Kless almost 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
05/10/2016
Due date:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
jewel,hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

I use Ceph v0.80.9 Firefly as a part of Mirantis OpenStack installation (as Swift backend).

Customer claimed, that if there are no segments in DLO manifest, then when doing HEAD query to manifest, there would be no Last-Modified, Content-Size and X-Object-Manifest headers in response:

15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "HEAD /swift/v1/dummy/myobject HTTP/1.1[\r][\n]" 
15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "Accept: application/json; charset=utf-8[\r][\n]" 
15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "X-Auth-Token: 123456789changed123456789changed[\r][\n]" 
15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "Host: example.net:8080[\r][\n]" 
15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]" 
15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "User-Agent: OpenStack4j-Agent[\r][\n]" 
15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]" 
15:26:41.478 [main] DEBUG org.apache.http.wire - http-outgoing-1 >> "[\r][\n]" 
15:26:41.517 [main] DEBUG org.apache.http.wire - http-outgoing-1 << "HTTP/1.1 200 OK[\r][\n]" 
15:26:41.517 [main] DEBUG org.apache.http.wire - http-outgoing-1 << "Date: Fri, 06 May 2016 12:26:41 GMT[\r][\n]" 
15:26:41.517 [main] DEBUG org.apache.http.wire - http-outgoing-1 << "Server: Apache[\r][\n]" 
15:26:41.517 [main] DEBUG org.apache.http.wire - http-outgoing-1 << "[\r][\n]" 

Steps to reproduce:

  • create container (e.g. dummy)
  • create pseudo-folder (e.g. data)
  • retrive auth token
  • create DLO manifest (e.g. myobject):
    $ curl -X PUT -H 'X-Auth-Token: 123456789changed123456789changed' -H 'X-Object-Manifest: dummy/data/' https://example.net:8080/swift/v1/dummy/myobject --data-binary ''

Known workaround: if add even one (or more) segment to the manifest, this problem won't reproduce (headers would be where they are supposed to be).


Related issues

Copied to rgw - Backport #15965: jewel: No Last-Modified, Content-Size and X-Object-Manifest headers if no segments in DLO manifest Resolved
Copied to rgw - Backport #15966: hammer: No Last-Modified, Content-Size and X-Object-Manifest headers if no segments in DLO manifest Resolved

History

#1 Updated by Radoslaw Zarzynski almost 3 years ago

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

Replicated on master:

$ curl -i -X PUT -H "X-Auth-Token: $token" "$publicURL/cont/broken_dlo" -H "X-Object-Manifest: non/existent" -d ''

HTTP/1.1 201 Created
etag: d41d8cd98f00b204e9800998ecf8427e
Last-Modified: Tue, 10 May 2016 14:38:47 GMT
X-Trans-Id: tx00000000000000000000f-005731f277-1008-default
Content-Type: text/plain; charset=utf-8
Content-Length: 0
Date: Tue, 10 May 2016 14:38:47 GMT

$ curl -i -X HEAD -H "X-Auth-Token: $token" "$publicURL/cont/broken_dlo"

Content-Length: 0
Date: Tue, 10 May 2016 14:38:59 GMT

There are some slight differences due to using the civetweb front-end to RadosGW.

I will work on that. Thanks for the bug report.

#2 Updated by Radoslaw Zarzynski almost 3 years ago

  • Status changed from In Progress to Need Review
  • Source changed from other to Community (user)
  • Backport set to Jewel,Hammer

#3 Updated by Nathan Cutler almost 3 years ago

  • Backport changed from Jewel,Hammer to jewel,hammer

#4 Updated by Radoslaw Zarzynski almost 3 years ago

  • Status changed from Need Review to Pending Backport

#5 Updated by Nathan Cutler almost 3 years ago

  • Copied to Backport #15965: jewel: No Last-Modified, Content-Size and X-Object-Manifest headers if no segments in DLO manifest added

#6 Updated by Nathan Cutler almost 3 years ago

  • Copied to Backport #15966: hammer: No Last-Modified, Content-Size and X-Object-Manifest headers if no segments in DLO manifest added

#7 Updated by Nathan Cutler over 2 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF