Bug #57679
openRGW/swift: Lost data if copy SLO-object and delete original
0%
Description
1. We use Swift/API and Large composite objects. Specifically Static Large Objects.
2. In Swift/API has a copy method. When a new object is created from an existing one.
https://docs.openstack.org/api-ref/object-store/index.html?expanded=copy-object-detail,create-or-replace-object-detail#copy-object
3. Point. If you create a SLO-object. Make a copy of it, and then delete the original object, then the copy also becomes unavailable.
How to repeat:
1. Creating 100MB file
truncate --size 100M file100M
2. Auth in swift
swift -A "http://....../auth/v1.0" -U ... -K ...
3. Upload it as SLO object
swift upload --use-slo --segment-size=20M SLO_TEST file100M
file100M segment 2
file100M segment 0
file100M segment 1
file100M segment 4
file100M segment 3
file100M
4. curl -sv "$OS_STORAGE_URL/SLO_TEST/copy" -H "X-Auth-Token: $OS_AUTH_TOKEN" -H "x-copy-from: SLO_TEST/file100M" -XPUT
5. Looking at the contents of the container (Note: size of copy 0 bytes)
0 2022-09-27 07:28:11 None copyswift list SLO_TEST --lh
795 2022-09-27 07:26:42 None file100M
795
6. However, both objects are available for download.
swift download SLO_TEST file100M
file100M [auth 0.000s, headers 0.073s, total 0.816s, 128.431 MB/s]
swift download SLO_TEST copy
copy [auth 0.000s, headers 0.014s, total 0.233s, 450.814 MB/s]
7. Deleting the original object
swift delete SLO_TEST file100M
file100M
8. Try download object "copy"
swift download SLO_TEST copy
Object 'SLO_TEST/copy' not found
9. Then GG comes and deletes nobody's shadow files.
10. In the data field, only the meta object remains, referring to non-existent parts of the original SLO object.
Updated by Casey Bodley over 1 year ago
- Status changed from New to Need More Info
- Tags set to swift slo
hi Andrey, are you able to test this in the real openstack environment? it's hard for us to know what the right behavior is here
Updated by Matt Benjamin over 1 year ago
This sounds a lot like a group of issues Eric worked on a few years ago...