Bug 2317891 - rgw/lifecycle: lifecycle transition fails for non-current object with instance empty
Summary: rgw/lifecycle: lifecycle transition fails for non-current object with instanc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 8.0
Assignee: Soumya Koduri
QA Contact: Vidushi Mishra
URL:
Whiteboard:
Depends On:
Blocks: 2317218
TreeView+ depends on / blocked
 
Reported: 2024-10-10 19:36 UTC by Soumya Koduri
Modified: 2024-11-25 09:13 UTC (History)
6 users (show)

Fixed In Version: ceph-19.2.0-16.el9cp
Doc Type: Bug Fix
Doc Text:
.Lifecycle transition no longer fails for non-current object with an empty instance Previously, when bucket versioning was enabled, old plain object entries would get converted to versioned by updating its instance as "null" in its raw head/old object. Due to this, the lifecycle transition would fail for a non-current object with an instance empty. With this fix, the code is corrected to keep the instance empty while updating bucket index entries and the lifecycle transition works for all plain entries which are converted to versioned.
Clone Of:
Environment:
Last Closed: 2024-11-25 09:13:10 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-9999 0 None None None 2024-10-10 19:37:06 UTC
Red Hat Product Errata RHBA-2024:10216 0 None None None 2024-11-25 09:13:15 UTC

Description Soumya Koduri 2024-10-10 19:36:27 UTC
Description of problem:

Lifecycle transition (with rule set for non-current versions) fails with below error for the object version created prior to bucket versioning is enabled.

<<<
out/radosgw.8001.log:2024-10-07T00:09:35.620+0530 7fc9eee566c0  0 lifecycle: transition_obj ERROR: failed to transition obj(lc_h1) read_mtime = 2024-10-07T00:07:38.972424+0530 doesn't match mtime = 2024-10-07T00:07:09.220348+0530
>>>

Upstream tracker: https://tracker.ceph.com/issues/68402


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


How reproducible:
Always

Steps to Reproduce:
Lifecycle transition (with rule set for non-current versions) fails with below error for the object version created prior to bucket versioning is enabled.

	out/radosgw.8001.log:2024-10-07T00:09:35.620+0530 7fc9eee566c0  0 lifecycle: transition_obj ERROR: failed to transition obj(lc_h1) read_mtime = 2024-10-07T00:07:38.972424+0530 doesn't match mtime = 2024-10-07T00:07:09.220348+0530
	out/radosgw.8001.log:2024-10-07T00:09:35.620+0530 7fc9eee566c0  0 lifecycle: ERROR: failed to transition obj :bucket4[d5e68941-d38f-45d3-a5b6-cbbb16786734.14117.1]):lc_h1 -> S1 (125) Operation canceled wp_thrd: 2, 1
	out/radosgw.8001.log:2024-10-07T00:10:16.149+0530 7fc9f0e5a6c0  0 lifecycle: transition_obj ERROR: failed to transition obj(lc_h1) read_mtime = 2024-10-07T00:07:38.972424+0530 doesn't match mtime = 2024-10-07T00:07:09.220348+0530
	out/radosgw.8001.log:2024-10-07T00:10:16.149+0530 7fc9f0e5a6c0  0 lifecycle: ERROR: failed to transition obj :bucket4[d5e68941-d38f-45d3-a5b6-cbbb16786734.14117.1]):lc_h1 -> S1 (125) Operation canceled wp_thrd: 1, 1


Steps to reproduce:

	[root@fedora build]# s3cmd mb s3://bucket4
	Bucket 's3://bucket4/' created
	[root@fedora build]# s3cmd put h1 s3://bucket4/lc_h1
	upload: 'h1' -> 's3://bucket4/lc_h1'  [1 of 1]
	 21 of 21   100% in    2s     8.41 B/s  done
	[root@fedora build]# aws s3api --no-verify-ssl --endpoint http://localhost:8000 list-object-versions --bucket=bucket4
	{
	    "Versions": [
		{
		    "ETag": "\"1115173c87f173f4f3cd255ce79d4de5\"",
		    "Size": 21,
		    "StorageClass": "STANDARD",
		    "Key": "lc_h1",
		    "VersionId": "null",
		    "IsLatest": true,
		    "LastModified": "2024-10-06T18:37:09.220000+00:00",
		    "Owner": {
		        "DisplayName": "cosbench_user",
		        "ID": "cosbench"
		    }
		}
	    ],
	    "RequestCharged": null
	}
	[root@fedora build]# aws s3api --no-verify-ssl --endpoint http://localhost:8000 put-bucket-versioning --bucket bucket4 --versioning-configuration Status=Enabled
	[root@fedora build]# s3cmd put h1 s3://bucket4/lc_h1
	upload: 'h1' -> 's3://bucket4/lc_h1'  [1 of 1]
	 21 of 21   100% in    0s   428.37 B/s  done
	[root@fedora build]# aws s3api --no-verify-ssl --endpoint http://localhost:8000 list-object-versions --bucket=bucket4
	{
	    "Versions": [
		{
		    "ETag": "\"1115173c87f173f4f3cd255ce79d4de5\"",
		    "Size": 21,
		    "StorageClass": "STANDARD",
		    "Key": "lc_h1",
		    "VersionId": "ZXoNuSHA.BQiQGmGcrGmxkUD54P0M09",
		    "IsLatest": true,
		    "LastModified": "2024-10-06T18:37:38.972000+00:00",
		    "Owner": {
		        "DisplayName": "cosbench_user",
		        "ID": "cosbench"
		    }
		},
		{
		    "ETag": "\"1115173c87f173f4f3cd255ce79d4de5\"",
		    "Size": 21,
		    "StorageClass": "STANDARD",
		    "Key": "lc_h1",
		    "VersionId": "null",
		    "IsLatest": false,
	[root@fedora build]# 
	[root@fedora build]# s3cmd setlifecycle ../../scripts/lifecycle_S1_noncur.xml s3://bucket4
	s3://bucket4/: Lifecycle Policy updated
	[root@fedora build]# s3cmd getlifecycle s3://bucket4
	<?xml version="1.0" ?>
	<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
		<Rule>
			<ID>Transition and Expiration Rule</ID>
			<Filter>
				<Prefix>lc</Prefix>
			</Filter>
			<Status>Enabled</Status>
			<Transition>
				<Days>1</Days>
				<StorageClass>S1</StorageClass>
			</Transition>
			<NoncurrentVersionTransition>
				<NoncurrentDays>1</NoncurrentDays>
				<StorageClass>S1</StorageClass>
			</NoncurrentVersionTransition>
		</Rule>
	</LifecycleConfiguration>

	[root@fedora build]# aws s3api --no-verify-ssl --endpoint http://localhost:8000 list-object-versions --bucket=bucket4
	{
	    "Versions": [
		{
		    "ETag": "\"1115173c87f173f4f3cd255ce79d4de5\"",
		    "Size": 21,
		    "StorageClass": "S1",
		    "Key": "lc_h1",
		    "VersionId": "ZXoNuSHA.BQiQGmGcrGmxkUD54P0M09",
		    "IsLatest": true,
		    "LastModified": "2024-10-06T18:37:38.972000+00:00",
		    "Owner": {
		        "DisplayName": "cosbench_user",
		        "ID": "cosbench"
		    }
		},
		{
		    "ETag": "\"1115173c87f173f4f3cd255ce79d4de5\"",
		    "Size": 21,
		    "StorageClass": "STANDARD",
		    "Key": "lc_h1",
		    "VersionId": "null",
		    "IsLatest": false,
		    "LastModified": "2024-10-06T18:37:09.220000+00:00",
		    "Owner": {
		        "DisplayName": "cosbench_user",
		        "ID": "cosbench"
		    }
		}
	    ],
	    "RequestCharged": null
	}
	[root@fedora build]# 



Actual results:
Lifecycle transition fails for those versioned objects with instance empty


Expected results:
Transition should succeed

Additional info:

Comment 1 Storage PM bot 2024-10-10 19:36:40 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 10 errata-xmlrpc 2024-11-25 09:13:10 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 (Red Hat Ceph Storage 8.0 security, bug fix, and enhancement updates), 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-2024:10216


Note You need to log in before you can comment on or make changes to this bug.