MultiBackend incorrectly reporting a failure on file deletion

Bug #1919017 reported by Jose Riha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned
duplicity (Ubuntu)
New
Undecided
Unassigned

Bug Description

Steps to reproduce:

- create multi.json file with the following contents

[
  {
    "description": "dstA",
    "url": "file:///tmp/dstA"
  },
  {
    "description": "dstB",
    "url": "file:///tmp/dstB"
  }
]

# Make 10 full backups of /etc/hosts
for i in $(seq 10)
do
/usr/bin/duplicity --no-encryption full /etc/hosts 'multi:///path/to/multi.json?mode=mirror'
sleep 1
done

# listing the contents of destinationA
$ ls -1 /tmp/dstA
duplicity-full-signatures.20210313T100123Z.sigtar.gz
duplicity-full-signatures.20210313T100152Z.sigtar.gz
duplicity-full-signatures.20210313T100154Z.sigtar.gz
duplicity-full-signatures.20210313T100155Z.sigtar.gz
duplicity-full-signatures.20210313T100156Z.sigtar.gz
duplicity-full-signatures.20210313T100158Z.sigtar.gz
duplicity-full-signatures.20210313T100159Z.sigtar.gz
duplicity-full-signatures.20210313T100200Z.sigtar.gz
duplicity-full-signatures.20210313T100202Z.sigtar.gz
duplicity-full-signatures.20210313T100203Z.sigtar.gz
duplicity-full-signatures.20210313T100205Z.sigtar.gz
duplicity-full.20210313T100123Z.manifest
duplicity-full.20210313T100123Z.vol1.difftar.gz
duplicity-full.20210313T100152Z.manifest
duplicity-full.20210313T100152Z.vol1.difftar.gz
duplicity-full.20210313T100154Z.manifest
duplicity-full.20210313T100154Z.vol1.difftar.gz
duplicity-full.20210313T100155Z.manifest
duplicity-full.20210313T100155Z.vol1.difftar.gz
duplicity-full.20210313T100156Z.manifest
duplicity-full.20210313T100156Z.vol1.difftar.gz
duplicity-full.20210313T100158Z.manifest
duplicity-full.20210313T100158Z.vol1.difftar.gz
duplicity-full.20210313T100159Z.manifest
duplicity-full.20210313T100159Z.vol1.difftar.gz
duplicity-full.20210313T100200Z.manifest
duplicity-full.20210313T100200Z.vol1.difftar.gz
duplicity-full.20210313T100202Z.manifest
duplicity-full.20210313T100202Z.vol1.difftar.gz
duplicity-full.20210313T100203Z.manifest
duplicity-full.20210313T100203Z.vol1.difftar.gz
duplicity-full.20210313T100205Z.manifest
duplicity-full.20210313T100205Z.vol1.difftar.gz

# issue a request to delete all but 1 full backup
$ /usr/bin/duplicity --verbosity 9 --no-encryption remove-all-but-n-full 1 'multi:///path/to/multi.json?mode=mirror' --force 2>&1 | grep 'failed to delete'
MultiBackend: failed to delete b'duplicity-full-signatures.20210313T100203Z.sigtar.gz' from file:///tmp/dstA
MultiBackend: failed to delete b'duplicity-full-signatures.20210313T100203Z.sigtar.gz' from file:///tmp/dstB
MultiBackend: failed to delete b'duplicity-full-signatures.20210313T100202Z.sigtar.gz' from file:///tmp/dstA
MultiBackend: failed to delete b'duplicity-full-signatures.20210313T100202Z.sigtar.gz' from file:///tmp/dstB
..

$ ls -l /tmp/dstA/duplicity-full-signatures.20210313T100203Z.sigtar.gz
ls: cannot access '/tmp/dstA/duplicity-full-signatures.20210313T100203Z.sigtar.gz': No such file or directory

# failure is reported even despite the fact that the files were correctly removed

The issue seems to be caused by the code starting at https://git.launchpad.net/duplicity/tree/duplicity/backends/multibackend.py#n345

duplicity 0.8.18
python 3.9.2
Arch Linux, x86_64

no longer affects: ubuntu
Changed in duplicity:
milestone: none → 0.8.19
importance: Undecided → Medium
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers