Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - REST - GetObjectAttributes not returning ObjectParts element #1001

Open
lrm25 opened this issue Dec 23, 2024 · 0 comments
Open

[Bug] - REST - GetObjectAttributes not returning ObjectParts element #1001

lrm25 opened this issue Dec 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lrm25
Copy link
Contributor

lrm25 commented Dec 23, 2024

Describe the bug
Direct to s3, a query for the attributes "ETag,StorageClass,ObjectParts,ObjectSize" returns something similar to:

<?xml version="1.0" encoding="UTF-8"?>
   <GetObjectAttributesResponse xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><ETag>b8785a1b2e2fa28fc4a6b1a3eb6ecc68-4</ETag><ObjectParts><PartsCount>4</PartsCount></ObjectParts><StorageClass>STANDARD</StorageClass><ObjectSize>167772160</ObjectSize></GetObjectAttributesResponse>

Via versitygw, the ObjectParts element is missing.

To Reproduce

  1. Start versitygw, e.g.: ./versitygw --access=******** --secret=******** --region=us-east-1 --iam-dir=/Users/lukemccrone/devel/versitygw/iam --cert /Users/lukemccrone/devel/versitygw/cert.pem --key /Users/lukemccrone/devel/versitygw/versitygw.pem posix --versioning-dir /tmp/versioning /tmp/gw
  2. Create bucket, e.g.: aws --no-verify-ssl s3api create-bucket --bucket versity-gwtest-bucket-one-1
  3. Create multipart upload using REST script, e.g.: curl -ks -w %{http_code} -X POST https://localhost:7070/versity-gwtest-bucket-one-1/test_file?uploads= -H Authorization: AWS4-HMAC-SHA256 Credential=********/20241223/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=84e9ba790073f8f4eb7de09f8733008c843e6199c1fe2fc2eaecf7ec05b77ac9 -H x-amz-content-sha256: UNSIGNED-PAYLOAD -H x-amz-date: 20241223T200427Z -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/output.txt
  4. Upload each part using REST script, e.g. (for one part): curl -isk -w %{http_code} https://localhost:7070/versity-gwtest-bucket-one-1/test_file?partNumber=1&uploadId=55260c0a-ce49-4ba3-aed6-73d9e2a00398 -H Authorization: AWS4-HMAC-SHA256 Credential=********/20241223/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=b542b4bad7d9038e067c914b7d90be505a6bc841d056d44eb08d4d91636d90fc -H x-amz-content-sha256: af1d9f2e5d9a9e477c596914df5e2537e9b9b666a29c920ce8b5370904bbadba -H x-amz-date: 20241223T200427Z -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/etag.txt -T /Users/lukemccrone/devel/versitygw/versity-gwtest-files/test_file-0
  5. After each part is uploaded, complete using REST script, e.g.: curl -ks -w %{http_code} -X POST https://localhost:7070/versity-gwtest-bucket-one-1/test_file?uploadId=55260c0a-ce49-4ba3-aed6-73d9e2a00398 -H Authorization: AWS4-HMAC-SHA256 Credential=********/20241223/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=fd1b6d5200d36991f5c727a2bdd08316cb01258abfe1725b3d792ee87e466694 -H x-amz-content-sha256: 298c436fd1efa631b04ab52b57300d04da63585d4005892288bda8d00032f2b4 -H x-amz-date: 20241223T200450Z -H Content-Type: application/xml -d <CompleteMultipartUpload xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Part><ETag>9410f8e019970aa8e93501fe2e14efad</ETag><PartNumber>1</PartNumber></Part><Part><ETag>f81b7ba0038b1a0ba217312199d78a54</ETag><PartNumber>2</PartNumber></Part><Part><ETag>9c265e8d3c169b79e805198dea43441e</ETag><PartNumber>3</PartNumber></Part><Part><ETag>6072b4fd113858f4df3a215d85f83e42</ETag><PartNumber>4</PartNumber></Part></CompleteMultipartUpload> -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/result.txt
  6. Query attributes (including ObjectParts) using REST script, e.g.: curl -ks -w %{http_code} https://localhost:7070/versity-gwtest-bucket-one-1/test_file?attributes= -H Authorization: AWS4-HMAC-SHA256 Credential=********/20241223/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-object-attributes,Signature=a574aa4f66a61a01fee4df111e30be483d722d5edf2174153771a96707d99a7c -H x-amz-content-sha256: UNSIGNED-PAYLOAD -H x-amz-date: 20241223T200450Z -H x-amz-object-attributes: ETag,StorageClass,ObjectParts,ObjectSize -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/attributes.txt

Expected behavior
ObjectParts element, wtih PartCount, is shown.

Server Version
Version : v1.0.9
Build : 91d3bbc
BuildTime: 2024-12-23_08:30:21PM
Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant