Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1234643

Summary: rgw: swift API: Providing custom metadata header in COPY operation does not add custom metadata in the new object
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Yehuda Sadeh <yehuda>
Component: RGWAssignee: Yehuda Sadeh <yehuda>
Status: CLOSED ERRATA QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.3.0CC: cbodley, ceph-eng-bugs, flucifre, hyelloji, kbader, mbenjamin, owasserm, sweil, tmuthami
Target Milestone: rc   
Target Release: 1.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-16 22:20:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yehuda Sadeh 2015-06-22 22:40:13 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


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

Actual results:
custom metadata is not included


Expected results:
custom metadata should be included

Additional info:

Comment 4 Hemanth Kumar 2015-07-10 12:59:00 UTC
Hi Yehuda,

custom metadata is not included from the "swift stat" for a File after it is copied the new objects..


Setup:-
Installed 1.3.0 (Cluster + rgw Client)
Populated few data on the Cluster.

Upgraded to async using the puddle repo(02-06)
Restarted Ceph process on all the Cluster Node and rgw Client (One at a time)

--------------------------------------------------------------------
Here is the updated Version.

On RGW Client.
--------------
[root@hp-ms-01-c25 ~]# rpm -qa | grep ceph
ceph-common-0.94.1-15.el7cp.x86_64
ceph-radosgw-0.94.1-15.el7cp.x86_64
[root@hp-ms-01-c25 ~]# 

On OSD's and MON.
-----------------
[root@gqac031 ~]# rpm -qa | grep ceph
ceph-0.94.1-15.el7cp.x86_64
ceph-common-0.94.1-15.el7cp.x86_64
ceph-osd-0.94.1-15.el7cp.x86_64
 
[root@gqas005 ~]# rpm -qa | grep ceph
ceph-common-0.94.1-15.el7cp.x86_64
ceph-mon-0.94.1-15.el7cp.x86_64
ceph-0.94.1-15.el7cp.x86_64

------------------------------------------------------------------------------
1. Creating a Container called Container.
-----------------------------------------

[root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25/swift/v1/Container1 -X PUT -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68"
HTTP/1.1 201 Created
Content-type: text/plain; charset=utf-8
Content-Length: 0

2. Created a File
-----------------
[root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25/swift/v1/Container1/NEWFILE1 -X PUT -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" -H "content-length:0" 
HTTP/1.1 201 Created
etag: d41d8cd98f00b204e9800998ecf8427e
Content-type: text/plain; charset=utf-8
Content-Length: 0

3. Setting metadata along with COPY
-----------------------------------
[root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25/swift/v1/Container1/NEWFILE1 -X COPY -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb790484b9557dff7afa6045d928a8cfee70e68" -H "Destination: Container1/NEWFILE2"  -H "x-object-meta-testmeta: Phone"
HTTP/1.1 201 Created
etag: d41d8cd98f00b204e9800998ecf8427e
Last-Modified: Fri, 10 Jul 2015 10:40:50 GMT
X-Copied-From: Container1/NEWFILE1
X-Copied-From-Account: hemanth
X-Copied-From-Last-Modified: Fri, 10 Jul 2015 10:38:19 GMT
X-Object-Meta-testmeta: Phone
Content-type: binary/octet-stream
Content-Length: 0

4. Verify the metadata using "swift stat"
----------------------------------------
[root@hp-ms-01-c25 ~]# swift -A http://10.12.27.25:80/auth/1.0 -U hemanth:swift -K 'vYwJa1H98e4g56PXJ0rIMW0ZFCqyzd0+WrFWennU' stat Container1 NEWFILE2
       Account: v1
     Container: Container1
        Object: NEWFILE2
  Content Type: binary/octet-stream
Content Length: 0
 Last Modified: Fri, 10 Jul 2015 10:40:50 GMT
          ETag: d41d8cd98f00b204e9800998ecf8427e
 Accept-Ranges: bytes
    Connection: Keep-Alive
   X-Timestamp: 1436524850


[root@hp-ms-01-c25 ~]# swift -A http://10.12.27.25:80/auth/1.0 -U hemanth:swift -K 'vYwJa1H98e4g56PXJ0rIMW0ZFCqyzd0+WrFWennU' stat Container1 NEWFILE1
       Account: v1
     Container: Container1
        Object: NEWFILE1
  Content Type: binary/octet-stream
Content Length: 0
 Last Modified: Fri, 10 Jul 2015 10:38:19 GMT
          ETag: d41d8cd98f00b204e9800998ecf8427e
 Accept-Ranges: bytes
    Connection: Keep-Alive
   X-Timestamp: 1436524699

Comment 5 Hemanth Kumar 2015-07-10 20:38:04 UTC
Seems to be working., 

I restarted all the Ceph process on Cluster Nodes and rgw Clients once again..

Moving to Verified State

Comment 7 errata-xmlrpc 2015-07-16 22:20:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:1240