Browse Source

[Backup] Ignore 404 error when deleting swift objects

Change-Id: I32c6ad56ebbd77dbafb2f956c78082b944fc5a22
tags/14.0.0.0rc1
Lingxian Kong 1 week ago
parent
commit
7537b3255e
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      backup/storage/swift.py

+ 6
- 2
backup/storage/swift.py View File

@@ -214,8 +214,12 @@ class SwiftStorage(base.Storage):
# Delete the old segment file that was copied
LOG.info('Deleting the old segment file %s.',
stream_reader.first_segment)
self.client.delete_object(container,
stream_reader.first_segment)
try:
self.client.delete_object(container,
stream_reader.first_segment)
except swiftclient.exceptions.ClientException as e:
if e.http_status != 404:
raise

final_swift_checksum = segment_result['etag']



Loading…
Cancel
Save