Project

General

Profile

Actions

Bug #11241

closed

Incorrect ETAG calculated for POST uploads

Added by Marcin Gibula about 9 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When uploading file via POST method, with multipart/form-data encoding, incorrect ETag is calculated for any file that is not aligned to 512KB.

Test results:

FILE UPLOADED/SIZE => CALCULATED ETAG => EXPECTED ETAG => comparsion value
--------------------------------------------------------------------------
testupload/1k => d41d8cd98f00b204e9800998ecf8427e = 0f343b0931126a20f133d67c2b018a3b => false
testupload/2k => d41d8cd98f00b204e9800998ecf8427e = c99a74c555371a433d121f551d6c6398 => false
testupload/128k => d41d8cd98f00b204e9800998ecf8427e = 0dfbe8aa4c20b52e1b8bf3cb6cbdf193 => false
testupload/511k => d41d8cd98f00b204e9800998ecf8427e = eb779e3f74b7b686b3d256004414eab2 => false
testupload/512k => 59071590099d21dd439896592338bf95 = 59071590099d21dd439896592338bf95 => true
testupload/513k => 59071590099d21dd439896592338bf95 = 0df2a0d3ec7e4dc1b64babdb3ec50a2b => false
testupload/1000k => 59071590099d21dd439896592338bf95 = 80ec129d645c70cf0de45b1a5a682235 => false
testupload/1023k => 59071590099d21dd439896592338bf95 = c96b9b9ca1a5f231115d7dc6d2490331 => false
testupload/1024k => b6d81b360a5672d80c27430f39153e2c = b6d81b360a5672d80c27430f39153e2c => true
testupload/1025k => b6d81b360a5672d80c27430f39153e2c = 3d283316360c56857e7c212cfecbbd83 => false

The problem does not exist when using PUT method. Test script attached. Tested with latest firefly and giant releases.


Files

test-case.php (2.9 KB) test-case.php Marcin Gibula, 03/26/2015 09:21 AM

Related issues 1 (0 open1 closed)

Copied to rgw - Backport #14570: hammer: Incorrect ETAG calculated for POST uploadsResolvedActions
Actions #1

Updated by Radoslaw Zarzynski about 9 years ago

Hi Marcin!

According to our talk RGWPostObj::execute() method in src/rgw/rgw_op.cc looks like a good place to start the analysis.
You also might need to check the RGWPostObj_ObjStore_S3 class in src/rgw/rgw_rest_s3.cc.

Regards,
Radek

Actions #2

Updated by Radoslaw Zarzynski over 8 years ago

  • Status changed from New to In Progress
  • Regression set to No
Actions #3

Updated by Radoslaw Zarzynski over 8 years ago

  • Assignee set to Radoslaw Zarzynski
Actions #4

Updated by Radoslaw Zarzynski over 8 years ago

  • Status changed from In Progress to Fix Under Review
Actions #5

Updated by Yehuda Sadeh over 8 years ago

  • Status changed from Fix Under Review to Resolved

Merged in commit:4b07f9333537f3a77a9f4218a3c829197dd48230

Actions #6

Updated by Nathan Cutler about 8 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to hammer
Actions #7

Updated by Nathan Cutler about 8 years ago

  • Copied to Backport #14570: hammer: Incorrect ETAG calculated for POST uploads added
Actions #8

Updated by Nathan Cutler about 8 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF