Project

General

Profile

Bug #21984

RGWBug: rewrite a versioning object create a new object

Added by Enming Zhang over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
Start date:
10/31/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

1. Enable bucket 111 versioning and get bucket 111 versioning info

200

<?xml version="1.0" encoding="UTF-8"?><VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Status>Enabled</Status></VersioningConfiguration>

2. Upload an object by s3cmd

$ s3cmd put 10M s3://111/ver-10M
$ s3cmd ls s3://111

2017-10-31 07:35 10485760 s3://111/ver-10M

3. List objects in RADOS

$ rados -p default.rgw.buckets.data ls

40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1_ver-10M
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_ver-10M
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__shadow:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_.kkuTNDZ_MnyM_LY-RXwd3Vuw7gxxhbh_2
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__shadow:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_.kkuTNDZ_MnyM_LY-RXwd3Vuw7gxxhbh_1

4. Rewrite the versioning object

$ radosgw-admin object rewrite --bucket=111 --object=ver-10M --object-version=qGEyHOzkiC9sbudpcUcoojt1gWF8jkA

5. List objects in RADOS again

$ rados -p default.rgw.buckets.data ls

40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1_ver-10M
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__:qVdlQNOMf6yS2HVfFYSPVN7A-qIPP92__:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_ver-10M 40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_ver-10M
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1___:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_ver-10M 40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_ver-10M
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_ver-10M
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__shadow:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_.kkuTNDZ_MnyM_LY-RXwd3Vuw7gxxhbh_2
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__shadow:qVdlQNOMf6yS2HVfFYSPVN7A-qIPP92_.V1CDbCDBaaBFK95sIc8-EOHpyv1UG-C_1
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__shadow:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_.kkuTNDZ_MnyM_LY-RXwd3Vuw7gxxhbh_1
40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1__shadow:qVdlQNOMf6yS2HVfFYSPVN7A-qIPP92_.V1CDbCDBaaBFK95sIc8-EOHpyv1UG-C_2

6. List objects in bucket 111 by s3cmd

$ s3cmd ls s3://111

2017-10-31 07:35 10485760 s3://111/_:qGEyHOzkiC9sbudpcUcoojt1gWF8jkA_ver-10M
2017-10-31 07:35 10485760 s3://111/ver-10M

7. Check the object info of current version object which is recorded in RADOS object "40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1_ver-10M"

$ radosgw-admin object stat --object 40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1_ver-10M

...

"manifest": {
"objs": [],
"obj_size": 10485760,
"explicit_objs": "false",
"head_size": 4194304,
"max_head_size": 4194304,
"prefix": ".kkuTNDZ_MnyM_LY-RXwd3Vuw7gxxhbh_",
"rules": [ {
"key": 0,
"val": {
"start_part_num": 0,
"start_ofs": 4194304,
"part_size": 0,
"stripe_max_size": 4194304,
"override_prefix": ""
}
}
],
"tail_instance": "qGEyHOzkiC9sbudpcUcoojt1gWF8jkA",
"tail_placement": {
"bucket": {
"name": "111",
"marker": "40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1",
"bucket_id": "40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1",
"tenant": "",
"explicit_placement": {
"data_pool": "",
"data_extra_pool": "",
"index_pool": ""
}
},
"placement_rule": "default-placement"
}

...

The object info recorded in "40c0efe7-d250-4064-b22f-3f2718788dc0.4120.1_ver-10M" is not updated.


Related issues

Copied to rgw - Backport #22586: luminous: RGWBug: rewrite a versioning object create a new object Resolved

History

#2 Updated by Casey Bodley over 1 year ago

  • Project changed from Ceph to rgw

#3 Updated by Yehuda Sadeh over 1 year ago

  • Status changed from New to Need Review
  • Priority changed from Normal to High

#4 Updated by Casey Bodley over 1 year ago

  • Assignee set to Casey Bodley

#5 Updated by Casey Bodley over 1 year ago

  • Status changed from Need Review to Testing

#6 Updated by Yuri Weinstein over 1 year ago

Enming Zhang wrote:

Fix in https://github.com/ceph/ceph/pull/18662

merged

#7 Updated by Casey Bodley about 1 year ago

  • Status changed from Testing to Pending Backport
  • Backport set to luminous

not sure about backport to jewel. i don't think it will apply cleanly, and it's not clear that it even reproduces on jewel

#8 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #22586: luminous: RGWBug: rewrite a versioning object create a new object added

#9 Updated by Nathan Cutler about 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF