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 2313745

Summary: [rgw] GetObjectAttributes is not returning VersionId for versioned objects
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Hemanth Sai <hmaheswa>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED ERRATA QA Contact: Hemanth Sai <hmaheswa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: ceph-eng-bugs, cephqe-warriors, tserlin
Target Milestone: ---   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-19.2.0-19.el9cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-25 09:11:51 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 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