Bug #10662
RGW swift API: Providing custom metadata header in COPY operation does not add custom metadata in the new object.
0%
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
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 <ahmad.faheem@ril.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
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 <ahmad.faheem@ril.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
(cherry picked from commit 1b722bbcd691e0a4a39ea77cd28e309fd723ec88)
History
#1 Updated by Dmytro Yurchenko almost 9 years ago
http://docs.openstack.org/api/openstack-object-storage/1.0/content/COPY_copyObject__v1__account___container___object__storage_object_services.html
An important thing to note is that it should not erase already existent metadata but merge them.
#2 Updated by Dmytro Yurchenko almost 9 years ago
- Assignee set to Dmytro Yurchenko
#3 Updated by Dmytro Yurchenko almost 9 years ago
- Status changed from New to Fix Under Review
Waiting for the review https://github.com/ceph/ceph/pull/4054
#4 Updated by Yehuda Sadeh over 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer
#5 Updated by Loïc Dachary over 8 years ago
- hammer backport https://github.com/ceph/ceph/pull/4568
#6 Updated by Loïc Dachary over 8 years ago
- Status changed from Pending Backport to Resolved
- Regression set to No