CompleteMultipartUpload has x-amz-version-id missing in its response body

Bug #2043619 reported by ASHWIN A NAIR
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Confirmed
Medium
ASHWIN A NAIR

Bug Description

We found this bug where after we had created a multipart upload, uploaded parts and then completed a mpu, we have versionID missing from the response body of the complete multipart upload operation even when versioning is enabled for a bucket.

The following sequence of commands will illustrate the bug:

```
aws s3api create-multipart-upload --bucket testpart --key test.mp4
{
    "Bucket": "testpart",
    "Key": "test.mp4",
    "UploadId": "Y2Q3YjdiYWItOWE4YS00OWM3LWIxMWQtOWI4ODk2ODBkMTI0"
}

aws s3api upload-part --bucket testversion --key test.mp4 --part-number 1 --body ./test-parts/xaa --upload-id Y2Q3YjdiYWItOWE4YS00OWM3LWIxMWQtOWI4ODk2ODBkMTI0
{
    "ETag": "\"4051199a50475fc7750ba3a1ed68e6fd\""
}

aws s3api upload-part --bucket testversion --key test.mp4 --part-number 2 --body ./test-parts/xab --upload-id Y2Q3YjdiYWItOWE4YS00OWM3LWIxMWQtOWI4ODk2ODBkMTI0
{
    "ETag": "\"eee81eda7931a8678d99f6975e9d4809\""
}

aws s3api upload-part --bucket testversion --key test.mp4 --part-number 3 --body ./test-parts/xac --upload-id Y2Q3YjdiYWItOWE4YS00OWM3LWIxMWQtOWI4ODk2ODBkMTI0
{
    "ETag": "\"2589ea0b2337ee12eed8b048fe051849\""
}

aws s3api upload-part --bucket testversion --key test.mp4 --part-number 4 --body ./test-parts/xad --upload-id Y2Q3YjdiYWItOWE4YS00OWM3LWIxMWQtOWI4ODk2ODBkMTI0
{
    "ETag": "\"4f4caa01c98dfac4ee71796d67d890f4\""
}

aws s3api complete-multipart-upload --multipart-upload file://fileparts.json --bucket testversion --key test.mp4 --upload-id Y2Q3YjdiYWItOWE4YS00OWM3LWIxMWQtOWI4ODk2ODBkMTI0
{
    "Location": "http://saio:8080/testpart/test.mp4",
    "Bucket": "testpart",
    "Key": "test.mp4",
    "ETag": "\"63cbae132cd7b248ae57ae3ab6d16fc9-4\""
}

aws s3api get-bucket-versioning --bucket testversion
{
    "Status": "Enabled"
}
```

Changed in swift:
assignee: nobody → ASHWIN A NAIR (indianwhocodes)
Revision history for this message
clayg (clay-gerrard) wrote :

Note that s3api will return the version-id on normal put-object calls to a x-versions-enabled: true bucket:

vagrant@saio:~$ aws s3api put-object --bucket s3test --key test --body test
{
    "ETag": "\"70c1db56f301c9e337b0099bd4174b28\"",
    "VersionId": "1700147883.21778"
}

... really any swift response that includes a x-version-id will be returned as x-amz-version-id; but complete-multipart-upload makes multiple sub-requests and the version-id from the ?multipart-manifest=put response isn't making it's way back to the client.

It should:

https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html

Changed in swift:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.