Project

General

Profile

Bug #23506

[rgw] GET <object>?torrent returns object's body instead torrent-file

Added by Aleksandr Rudenko over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
03/29/2018
Due date:
% Done:

0%

Source:
Community (user)
Tags:
torrent
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

i use awscli:

aws --endpoint-url=http://my-domain.ru s3api get-object-torrent --bucket my-bucket --key test.png test.torrent

and i get object test.png instead torrent-file.

"obj_size": 169494

in rgw log(debug rgw = 20) i didn't see any errors or exceptions.

torrent relative parameters:

    "rgw_torrent_comment": "",
    "rgw_torrent_createby": "",
    "rgw_torrent_encoding": "",
    "rgw_torrent_flag": "true",
    "rgw_torrent_origin": "",
    "rgw_torrent_sha_unit": "524288",
    "rgw_torrent_tracker": "",

Related issues

Related to rgw - Bug #23838: save_torrent_file writes to omap (not atomic, not supported on ec pools) New 04/24/2018
Copied to rgw - Backport #23865: luminous: [rgw] GET <object>?torrent returns object's body instead torrent-file Resolved

History

#1 Updated by Robin Johnson over 1 year ago

Brief debugging because I saw similar as well, and I think this behavior would be an improvement:

0. If rgw_torrent_flag==FALSE, we should always return an error.
1. If the object was uploaded with rgw_torrent_flag==TRUE, and rgw_torrent_flag then the torrent should be returned.
2. If the object was uploaded with rgw_torrent_flag==FALSE, then we should return an error.

#2 Updated by Casey Bodley over 1 year ago

  • Status changed from New to Need Review
  • Assignee set to Casey Bodley
  • Tags set to torrent
  • Backport set to luminous

#3 Updated by Casey Bodley over 1 year ago

Thanks Robin. My recollection is that we just didn't want to do the SHA calculation and omap request for every upload by default, so the flag was added to control that. So I propose that rgw_torrent_flag be interpreted only as 'generate the SHA/torrent info on object upload', and allow GET ?torrent requests to read any object that has torrent info.

#4 Updated by Casey Bodley about 1 year ago

  • Related to Bug #23838: save_torrent_file writes to omap (not atomic, not supported on ec pools) added

#5 Updated by Casey Bodley about 1 year ago

  • Status changed from Need Review to Pending Backport

#6 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #23865: luminous: [rgw] GET <object>?torrent returns object's body instead torrent-file added

#7 Updated by Nathan Cutler about 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF