We are using rclone to sync between two swift clusters. Unfortunately, some of the containers have "ghost objects" in them - objects that appear in the container listing but do not in fact exist. This means that sometimes rclone will try and DELETE one of these objects, and the swift object store returns 404 in this case, even though the object has been successfully deleted (i.e. it no longer appears in the container listing). I'm not really convinced this is correct behaviour on swift's part, but when I reported it upstream they don't seem to want to change its behaviour now.
So I'd ideally like an option for rclone to not treat 404 on DELETE as a failure.
Run the command 'rclone version' and share the full output of the command.
The problem is that doing the delete of the object doesn't remove it from the directory listing despite it not being found. So it will be found to be deleted next time too won't it?
I guess we could do the 404 == OK behavior on delete on a flag?
As far as I've seen so far, doing a delete of one of these object does in fact remove it from the listing in future (you end up with consistent deleted objects in the container.db files). I've not yet found one that isn't deletable, thankfully!
Hi, I downloaded rclone-v1.63.0-beta.6959.fe43c0020.fix-swift-delete-linux-amd64.zip and tried it, but I think the behaviour has not changed:
mvernon@ms-be2069:~$ sudo /home/mvernon/rclone.fix-swift-delete sync --checkers=64 --transfers=8 \
--retries 1 --ignore-errors \
--filter-from /etc/swift/swiftrepl_filters_nothumbs \
--config /etc/swift/rclone.conf \
--no-update-modtime \
--use-mmap \
--checksum \
--swift-no-large-objects \
"codfw:" "eqiad:"
2023/04/17 11:49:30 ERROR : wikipedia-commons-local-public.e4/e/e4/Taurie_Music-1.jpg: Failed to copy: failed to open source object: Object Not Found
2023/04/17 13:15:04 ERROR : wikipedia-en-local-public.1a/1/1a/Erskine_Minnesota_May_2007.JPG: Couldn't delete: Object Not Found
2023/04/17 13:15:04 ERROR : Attempt 1/1 failed with 3 errors and: failed to delete 1 files
2023/04/17 13:15:04 Failed to sync with 3 errors: last error was: failed to delete 1 files
mvernon@ms-be2069:~$ echo $?
1
mvernon@ms-be2069:~$ /home/mvernon/rclone.fix-swift-delete version
rclone v1.63.0-beta.6959.fe43c0020.fix-swift-delete
- os/version: debian 11.6 (64 bit)
- os/kernel: 5.10.0-19-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.3
- go/linking: static
- go/tags: none
(complicated a little by the fact there was an object that failed to copy, but if I read your patch correctly, I should have seen something like Dangling object - ignoring: rather than Couldn't delete: Object Not Found?)
Complicated by another missing object-to-copy, but this looks more hopeful:
mvernon@ms-be2069:~$ sudo /home/mvernon/rclone.fix-swift-delete sync --checkers=64 --transfers=8 --retries 1 --ignore-errors --filter-from /etc/swift/swiftrepl_filters_nothumbs --config /etc/swift/rclone.conf --no-update-modtime --use-mmap --checksum --swift-no-large-objects "codfw:" "eqiad:"
2023/04/21 19:41:07 ERROR : wikipedia-en-local-public.a8/a/a8/Pentagon_video_security.gif: Failed to copy: failed to open source object: Object Not Found
2023/04/21 20:41:33 ERROR : wikipedia-en-local-public.ce/c/ce/Merrick_and_his_wife.jpg: Dangling object - ignoring: Object Not Found
2023/04/21 20:41:33 ERROR : Attempt 1/1 failed with 1 errors and: failed to open source object: Object Not Found
2023/04/21 20:41:33 Failed to sync: failed to open source object: Object Not Found