Project

General

Profile

Actions

Bug #23506

closed

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

Added by Aleksandr Rudenko about 6 years ago. Updated almost 6 years ago.

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

0%

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

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 2 (0 open2 closed)

Related to rgw - Bug #23838: save_torrent_file writes to omap (not atomic, not supported on ec pools)Resolved

Actions
Copied to rgw - Backport #23865: luminous: [rgw] GET <object>?torrent returns object's body instead torrent-fileResolvedPrashant DActions
Actions #1

Updated by Robin Johnson about 6 years 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.

Actions #2

Updated by Casey Bodley almost 6 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Casey Bodley
  • Tags set to torrent
  • Backport set to luminous
Actions #3

Updated by Casey Bodley almost 6 years 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.

Actions #4

Updated by Casey Bodley almost 6 years ago

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

Updated by Casey Bodley almost 6 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Nathan Cutler almost 6 years ago

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

Updated by Nathan Cutler almost 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF