Project

General

Profile

Actions

Bug #58950

closed

Swift static large objects are not deleted when segment object path set in manifest file does not start with '/'

Added by Marcio Starke about 1 year ago. Updated 4 months ago.

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

100%

Source:
Tags:
swift slo backport_processed
Backport:
pacific quincy reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Swift static large objects is an object composed of several segment objects that can be controlled individually. After sending the segments, a manifest object with the location of each segment object is created so that the object can be controlled in an integrated way. When downloading the manifest object, radosgw correctly sends all the object segments concatenated. When removing the manifest object, radosgw only removes the segments if the path of the segment objects starts with '/'. When the path doesn't start with a '/', radosgw doesn't remove the segments. The swift documentation shows that the initial '/' is not necessary in the path of the objects.


Related issues 3 (0 open3 closed)

Copied to rgw - Backport #61173: reef: Swift static large objects are not deleted when segment object path set in manifest file does not start with '/'ResolvedAli MarediaActions
Copied to rgw - Backport #61174: quincy: Swift static large objects are not deleted when segment object path set in manifest file does not start with '/'ResolvedAli MarediaActions
Copied to rgw - Backport #61175: pacific: Swift static large objects are not deleted when segment object path set in manifest file does not start with '/'ResolvedAli MarediaActions
Actions #1

Updated by Marcio Starke about 1 year ago

Steps to reproduce:

MON=1 OSD=1 RGW=1 MDS=0 MGR=0 ../src/vstart.sh -n -d

#Create a bucket
swift -A http://localhost:8000/auth -U test:tester -K testing post bucket

#Get a token
token=$(curl -s -o - -X GET -H "x-auth-user:test:tester" -H "x-auth-key:testing" -i http://localhost:8000/auth | sed -n 's/X-Auth-Token: \(.*\)\r$/\1/p')

#Create the segment objects

curl -X PUT -H "X-Auth-Token:$token" -i http://localhost:8000/swift/v1/bucket/myobj/001 --data-binary '1'
curl -X PUT -H "X-Auth-Token:$token" -i http://localhost:8000/swift/v1/bucket/myobj/002 --data-binary '2'
curl -X PUT -H "X-Auth-Token:$token" -i http://localhost:8000/swift/v1/bucket/myobj/003 --data-binary '3'

#Create the manifest object - path not starting with a '/' - deletion is not working
curl -X PUT -H "X-Auth-Token:$token" -i http://localhost:8000/swift/v1/bucket/myobj?multipart-manifest=put --data-binary '[{"path": "bucket/myobj/001"},{"path": "bucket/myobj/002"},{"path": "bucket/myobj/003"}]'

#Get the objetc
swift -A http://localhost:8000/auth/1.0 -U test:tester -K testing download bucket myobj
cat myobj
rm myobj

#Remove the object
swift -A http://localhost:8000/auth/1.0 -U test:tester -K testing delete bucket myobj
swift -A http://localhost:8000/auth/1.0 -U test:tester -K testing list bucket # the objects were not deleted

#Create the manifest object - path starting with a '/' - deletion is working
curl -X PUT -H "X-Auth-Token:$token" -i http://localhost:8000/swift/v1/bucket/myobj?multipart-manifest=put --data-binary '[{"path": "/bucket/myobj/001"},{"path": "/bucket/myobj/002"},{"path": "/bucket/myobj/003"}]'

swift -A http://localhost:8000/auth/1.0 -U test:tester -K testing download bucket myobj
cat myobj
swift -A http://localhost:8000/auth/1.0 -U test:tester -K testing delete bucket myobj
swift -A http://localhost:8000/auth/1.0 -U test:tester -K testing list bucket # the objects have been deleted

rm myobj

Expected result

Objects belonging to a Swift Static Large Objects removed when the manifest is deleted.

Actual result

Objects belonging to a Swift Static Large Objects are being retained when erasing the manifest.

Actions #2

Updated by Casey Bodley about 1 year ago

  • Status changed from New to Fix Under Review
  • Tags set to swift slo
  • Backport set to pacific quincy reef
  • Pull request ID set to 50537
Actions #3

Updated by Casey Bodley about 1 year ago

  • Assignee set to Ali Maredia
Actions #4

Updated by Casey Bodley 11 months ago

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

Updated by Backport Bot 11 months ago

  • Copied to Backport #61173: reef: Swift static large objects are not deleted when segment object path set in manifest file does not start with '/' added
Actions #6

Updated by Backport Bot 11 months ago

  • Copied to Backport #61174: quincy: Swift static large objects are not deleted when segment object path set in manifest file does not start with '/' added
Actions #7

Updated by Backport Bot 11 months ago

  • Copied to Backport #61175: pacific: Swift static large objects are not deleted when segment object path set in manifest file does not start with '/' added
Actions #8

Updated by Backport Bot 11 months ago

  • Tags changed from swift slo to swift slo backport_processed
Actions #9

Updated by Konstantin Shalygin 4 months ago

  • Status changed from Pending Backport to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF