Bug 2313745 - [rgw] GetObjectAttributes is not returning VersionId for versioned objects
Summary: [rgw] GetObjectAttributes is not returning VersionId for versioned objects
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: Matt Benjamin (redhat)
QA Contact: Hemanth Sai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-20 11:58 UTC by Hemanth Sai
Modified: 2024-11-25 09:11 UTC (History)
3 users (show)

Fixed In Version: ceph-19.2.0-19.el9cp
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-11-25 09:11:51 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-10012 0 None None None 2024-10-12 22:29:58 UTC
Red Hat Product Errata RHBA-2024:10216 0 None None None 2024-11-25 09:11:54 UTC

Description Hemanth Sai 2024-09-20 11:58:43 UTC
Description of problem:
GetObjectAttributes is not returning VersionId in the response for versioned objects

according to the below aws documentation, response also contains VersionId:
https://awscli.amazonaws.com/v2/documentation/api/2.7.12/reference/s3api/get-object-attributes.html

{
    "LastModified": "2022-03-15T19:37:31+00:00",
    "VersionId": "IuCPjXTDzHNfldAuitVBIKJpF2p1fg4P",
    "ETag": "b662d79adeb7c8d787ea7eafb9ef6207",
    "StorageClass": "STANDARD",
    "ObjectSize": 405
}


Version-Release number of selected component (if applicable):
ceph version 19.1.1-42.el9cp

How reproducible:
always

Steps to Reproduce:
1.create a bucket
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ aws --endpoint-url http://10.0.67.48:80 --profile hsm s3 mb s3://versioned-bkt1
make_bucket: versioned-bkt1
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$

2.enable versioning on the bucket
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ aws --endpoint-url http://10.0.67.48:80 --profile hsm s3api put-bucket-versioning --bucket versioned-bkt1 --versioning-configuration Status=Enabled
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ 
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ aws --endpoint-url http://10.0.67.48:80 --profile hsm s3api get-bucket-versioning --bucket versioned-bkt1
{
    "Status": "Enabled",
    "MFADelete": "Disabled"
}
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$

3.upload an object
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ aws --endpoint-url http://10.0.67.48:80 --profile hsm s3 cp obj30MB s3://versioned-bkt1
upload: ./obj30MB to s3://versioned-bkt1/obj30MB                  
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ 
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ aws --endpoint-url http://10.0.67.48:80 --profile hsm s3api head-object --bucket versioned-bkt1 --key obj30MB
{
    "AcceptRanges": "bytes",
    "LastModified": "Fri, 20 Sep 2024 11:52:34 GMT",
    "ContentLength": 30000000,
    "ETag": "\"8a259752f0f2a2500615926da4f194b2-4\"",
    "VersionId": "YKgy1r5PKow4ELCB1.-oE.6zOEQqk1v",
    "ContentType": "binary/octet-stream",
    "Metadata": {},
    "PartsCount": 4
}
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ 

4.verify get-object-attributes response contains VersionId
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ aws --endpoint-url http://10.0.67.48:80 --profile hsm s3api get-object-attributes --bucket versioned-bkt1 --key obj30MB --object-attributes "StorageClass" "ETag" "ObjectSize" "Checksum"
{
    "LastModified": "Fri, 20 Sep 2024 11:52:34 GMT",
    "ETag": "8a259752f0f2a2500615926da4f194b2-4",
    "Checksum": {},
    "StorageClass": "STANDARD",
    "ObjectSize": 30000000
}
[cephuser@ceph-pri-hsm-squid-ms-fqoqnn-node6 ~]$ 

Actual results:
GetObjectAttributes is not returning VersionId in the response for versioned objects

Expected results:
GetObjectAttributes should return VersionId in the response for versioned objects as per aws documentation

Additional info:

Comment 8 errata-xmlrpc 2024-11-25 09:11:51 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.