Project

General

Profile

Bug #10662

RGW swift API: Providing custom metadata header in COPY operation does not add custom metadata in the new object.

Added by Ahmad Faheem over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
01/28/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

Steps to reproduce:

1. swift post container
2. swift upload container file1
3. curl -i https://10.20.20.15:80/swift/v1/container/file1 -X COPY -H "X-Auth-Token: 28498ad3697c494fb7cb859947a3d1d0" -H "Destination: container/file2" -H "x-object-meta-testmeta: data"
4. swift stat container file2

Account: v1
Container: container
Object: file2
Content Type: application/octet-stream
Content Length: 0
Last Modified: Wed, 28 Jan 2015 06:59:20 GMT
ETag: d41d8cd98f00b204e9800998ecf8427e
Accept-Ranges: bytes
Server: Apache/2.4.7 (Ubuntu)
Connection: close

In swift the custom metadata is added provided during COPY request.
3. curl -i http://10.0.2.15:8080/v1/AUTH_b2419ea9588d49ddbd8c006b5eb199ff/container/file1 -X COPY -H "X-Auth-Token: bd4089d017d24203a9b6fe08daeb464a" -H "Destination: container/file2" -H "x-object-meta-testmeta: data"
4. swift stat container file2

Account: AUTH_b2419ea9588d49ddbd8c006b5eb199ff
Container: container
Object: file2
Content Type: application/octet-stream
Content Length: 3
Last Modified: Tue, 27 Jan 2015 21:07:36 GMT
ETag: 764efa883dda1e11db47671c4a3bbd9e
Meta Testmeta: data
Meta Mtime: 1422392742.632376
Accept-Ranges: bytes
X-Timestamp: 1422392855.69999
X-Trans-Id: txd9441f26d906441e8fea8-0054c7fe20

Associated revisions

Revision 1b722bbc (diff)
Added by Dmytro Iurchenko about 4 years ago

rgw: Swift API. Allows setting attributes with COPY object operation.

http://developer.openstack.org/api-ref-objectstorage-v1.html says: "With COPY, you can add additional metadata to the object."

Fixes: #10662
Backport: hammer
Reported-by: Ahmad Faheem <>
Signed-off-by: Dmytro Iurchenko <>

Revision 7f41ff0a (diff)
Added by Dmytro Iurchenko about 4 years ago

rgw: Swift API. Allows setting attributes with COPY object operation.

http://developer.openstack.org/api-ref-objectstorage-v1.html says: "With COPY, you can add additional metadata to the object."

Fixes: #10662
Backport: hammer
Reported-by: Ahmad Faheem <>
Signed-off-by: Dmytro Iurchenko <>
(cherry picked from commit 1b722bbcd691e0a4a39ea77cd28e309fd723ec88)

History

#2 Updated by Dmytro Yurchenko over 4 years ago

  • Assignee set to Dmytro Yurchenko

#3 Updated by Dmytro Yurchenko over 4 years ago

  • Status changed from New to Need Review

#4 Updated by Yehuda Sadeh about 4 years ago

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

#6 Updated by Loic Dachary about 4 years ago

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

Also available in: Atom PDF