Bug 1234644
| Summary: | rgw: swift api: using x-fresh-metadata=true in object copying using swift API copies custom metadata also | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Ceph Storage | Reporter: | Yehuda Sadeh <yehuda> |
| Component: | RGW | Assignee: | Yehuda Sadeh <yehuda> |
| Status: | CLOSED ERRATA | QA Contact: | ceph-qe-bugs <ceph-qe-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.3.0 | CC: | cbodley, ceph-eng-bugs, flucifre, hyelloji, kbader, kdreyer, 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:17 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:43:06 UTC
Hi Yehuda, I am still seeing old metadata on 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/Container -X PUT -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" HTTP/1.1 201 Created Content-type: text/plain; charset=utf-8 Content-Length: 0 [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25/swift/v1/Container -X GET -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" HTTP/1.1 204 No Content Content-type: text/plain; charset=utf-8 Content-Length: 0 2. Created an Object. --------------------- [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25/swift/v1/Container/File1 -X PUT -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" -H "content-length:0" -d "" HTTP/1.1 201 Created etag: d41d8cd98f00b204e9800998ecf8427e Content-type: text/plain; charset=utf-8 Content-Length: 0 3. Added a Custom Metadata. --------------------------- [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25/swift/v1/Container/File1 -X POST -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" -H "x-object-meta-testmeta: meta" HTTP/1.1 202 Accepted Content-type: text/plain; charset=utf-8 Content-Length: 0 4. Stat of the : File1 -------------------- [root@hp-ms-01-c25 ~]# swift -A http://10.12.27.25:80/auth/1.0 -U hemanth:swift -K 'vYwJa1H98e4g56PXJ0rIMW0ZFCqyzd0+WrFWennU' stat Container File1 Account: v1 Container: Container Object: File1 Content Type: application/x-www-form-urlencoded Content Length: 0 Last Modified: Fri, 10 Jul 2015 10:27:04 GMT ETag: d41d8cd98f00b204e9800998ecf8427e Meta Testmeta: meta Accept-Ranges: bytes Connection: Keep-Alive X-Timestamp: 1436524024 5. Created a new File2 with X-Fresh-Metadata: true -------------------------------------------------- [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25:80/swift/v1/Container/File2 -X PUT -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" -H "x-copy-from: Container/File1" -H "X-Fresh-Metadata: true" HTTP/1.1 201 Created etag: d41d8cd98f00b204e9800998ecf8427e Last-Modified: Fri, 10 Jul 2015 10:29:41 GMT X-Copied-From: Container/File1 X-Copied-From-Account: hemanth X-Copied-From-Last-Modified: Fri, 10 Jul 2015 10:27:04 GMT Content-type: binary/octet-stream Content-Length: 0 6. Check the Info of New File2. ------------------------------- [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25:80/swift/v1/Container/File2 -I -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" HTTP/1.1 200 OK Content-Length: 0 Accept-Ranges: bytes Last-Modified: Fri, 10 Jul 2015 10:29:41 GMT X-Timestamp: 1436524181 etag: d41d8cd98f00b204e9800998ecf8427e X-Object-Meta-testmeta: meta Content-type: application/x-www-form-urlencoded ==================================================== From the above step, the metadata info is still Seen ===================================================== Checked the Infor of old File1. --------------------------------- [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25:80/swift/v1/Container/File1 -I -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" HTTP/1.1 200 OK Content-Length: 0 Accept-Ranges: bytes Last-Modified: Fri, 10 Jul 2015 10:27:04 GMT X-Timestamp: 1436524024 etag: d41d8cd98f00b204e9800998ecf8427e X-Object-Meta-testmeta: meta Content-type: application/x-www-form-urlencoded Using swift stat , checked the info of both Old File1 and new File2 ------------------------------------------------------------------- [root@hp-ms-01-c25 ~]# swift -A http://10.12.27.25:80/auth/1.0 -U hemanth:swift -K 'vYwJa1H98e4g56PXJ0rIMW0ZFCqyzd0+WrFWennU' stat Container File2 Account: v1 Container: Container Object: File2 Content Type: application/x-www-form-urlencoded Content Length: 0 Last Modified: Fri, 10 Jul 2015 10:29:41 GMT ETag: d41d8cd98f00b204e9800998ecf8427e Meta Testmeta: meta Accept-Ranges: bytes Connection: Keep-Alive X-Timestamp: 1436524181 [root@hp-ms-01-c25 ~]# swift -A http://10.12.27.25:80/auth/1.0 -U hemanth:swift -K 'vYwJa1H98e4g56PXJ0rIMW0ZFCqyzd0+WrFWennU' stat Container File1 Account: v1 Container: Container Object: File1 Content Type: application/x-www-form-urlencoded Content Length: 0 Last Modified: Fri, 10 Jul 2015 10:27:04 GMT ETag: d41d8cd98f00b204e9800998ecf8427e Meta Testmeta: meta Accept-Ranges: bytes Connection: Keep-Alive X-Timestamp: 1436524024 =============================================================================== Tried again with another custom metadata input, Seeing the same issue. ---------------------------------------------- [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25/swift/v1/Container/File1 -X POST -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" -H "x-object-meta-testmeta: Laptop" HTTP/1.1 202 Accepted Content-type: text/plain; charset=utf-8 Content-Length: 0 [root@hp-ms-01-c25 ~]# swift -A http://10.12.27.25:80/auth/1.0 -U hemanth:swift -K 'vYwJa1H98e4g56PXJ0rIMW0ZFCqyzd0+WrFWennU' stat Container File1 Account: v1 Container: Container Object: File1 Content Type: application/x-www-form-urlencoded Content Length: 0 Last Modified: Fri, 10 Jul 2015 10:35:18 GMT ETag: d41d8cd98f00b204e9800998ecf8427e Meta Testmeta: Laptop Accept-Ranges: bytes Connection: Keep-Alive X-Timestamp: 1436524518 [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25:80/swift/v1/Container/File3 -X PUT -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" -H "x-copy-from: Container/File1" -H "X-Fresh-Metadata: true" HTTP/1.1 201 Created etag: d41d8cd98f00b204e9800998ecf8427e Last-Modified: Fri, 10 Jul 2015 10:35:44 GMT X-Copied-From: Container/File1 X-Copied-From-Account: hemanth X-Copied-From-Last-Modified: Fri, 10 Jul 2015 10:35:18 GMT Content-type: binary/octet-stream Content-Length: 0 [root@hp-ms-01-c25 ~]# swift -A http://10.12.27.25:80/auth/1.0 -U hemanth:swift -K 'vYwJa1H98e4g56PXJ0rIMW0ZFCqyzd0+WrFWennU' stat Container File3 Account: v1 Container: Container Object: File3 Content Type: application/x-www-form-urlencoded Content Length: 0 Last Modified: Fri, 10 Jul 2015 10:35:44 GMT ETag: d41d8cd98f00b204e9800998ecf8427e Meta Testmeta: Laptop Accept-Ranges: bytes Connection: Keep-Alive X-Timestamp: 1436524544 [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25:80/swift/v1/Container/File1 -I -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" HTTP/1.1 200 OK Content-Length: 0 Accept-Ranges: bytes Last-Modified: Fri, 10 Jul 2015 10:35:18 GMT X-Timestamp: 1436524518 etag: d41d8cd98f00b204e9800998ecf8427e X-Object-Meta-testmeta: Laptop Content-type: application/x-www-form-urlencoded [root@hp-ms-01-c25 ~]# curl -i http://10.12.27.25:80/swift/v1/Container/File3 -I -H "X-Auth-Token: AUTH_rgwtk0d00000068656d616e74683a737769667477a4d6063ec6ea666aeda05506eb7904846e1332cb9557dff7afa6045d928a8cfee70e68" HTTP/1.1 200 OK Content-Length: 0 Accept-Ranges: bytes Last-Modified: Fri, 10 Jul 2015 10:35:44 GMT X-Timestamp: 1436524544 etag: d41d8cd98f00b204e9800998ecf8427e X-Object-Meta-testmeta: Laptop Content-type: application/x-www-form-urlencoded Are you sure rgw was restarted following the upgrade? I tested the version (built from source, not built packages) and it seem to work. This means that it's most likely either there's an issue with the built packages, or that rgw was not restarted. Can you verify the running rgw version by querying it through the admin socket? Seems to be working., I restarted all the Ceph process on Cluster Nodes and rgw Client once again.. Moving to verified state.. 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 |