Project

General

Profile

Bug #11241

Incorrect ETAG calculated for POST uploads

Added by Marcin Gibula over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
03/26/2015
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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.

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


Related issues

Copied to rgw - Backport #14570: hammer: Incorrect ETAG calculated for POST uploads Resolved

Associated revisions

Revision 742906ab (diff)
Added by Radoslaw Zarzynski about 3 years ago

rgw: fix wrong etag calculation during POST on S3 bucket.

Fixes: #11241
Backport: infernalis, hammer, firefly
Signed-off-by: Radoslaw Zarzynski <>

Revision 5b9c3261 (diff)
Added by Radoslaw Zarzynski about 3 years ago

rgw: fix wrong etag calculation during POST on S3 bucket.

Fixes: #11241
Backport: infernalis, hammer, firefly
Signed-off-by: Radoslaw Zarzynski <>
(cherry picked from commit 742906ab5ee644d5932570bf95342697b673a498)

History

#1 Updated by Radoslaw Zarzynski over 3 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

#2 Updated by Radoslaw Zarzynski about 3 years ago

  • Status changed from New to In Progress
  • Regression set to No

#3 Updated by Radoslaw Zarzynski about 3 years ago

  • Assignee set to Radoslaw Zarzynski

#4 Updated by Radoslaw Zarzynski about 3 years ago

  • Status changed from In Progress to Need Review

#5 Updated by Yehuda Sadeh about 3 years ago

  • Status changed from Need Review to Resolved

Merged in commit:4b07f9333537f3a77a9f4218a3c829197dd48230

#6 Updated by Nathan Cutler almost 3 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to hammer

#7 Updated by Nathan Cutler almost 3 years ago

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

#8 Updated by Nathan Cutler almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF