cinder/cinder/backup
Brian Rosmaita 70001254f6 Don't destroy existing backup by mistake on import
We're supposed to fail an import request for an already existing
backup, but the current code confuses an existing backup record with
one we created for the import, and during quota rollback, will
destroy either one.  Simplify the logic so that we check whether
there's an already existing backup first and bail without even
bothering to make an unnecessary reservation, hence leaving us nothing
to roll back or delete by mistake.

Also revise and add tests.

Closes-bug: #1965847
Change-Id: I3c0e365f5dc3c32975343f538c6029f02ac7c2b5
(cherry picked from commit 6386cbb0a0)
(cherry picked from commit 753c022463)
(cherry picked from commit 332aa33404)
(cherry picked from commit 741d0ce546)
2022-07-06 12:17:09 +00:00
..
drivers [RBD] Fix snapshot backup name 2021-12-29 14:33:12 -03:00
__init__.py Fix backup_api_class doesn't work 2017-05-09 22:32:13 +08:00
api.py Don't destroy existing backup by mistake on import 2022-07-06 12:17:09 +00:00
chunkeddriver.py Support modern compression algorithms in cinder backup 2020-07-15 13:26:55 +09:00
driver.py Remove BackupDriverWithVerify class 2019-05-14 23:19:13 +03:00
manager.py Backup manager: Synchronously call remove_export 2021-03-25 18:34:45 +00:00
rpcapi.py Publish backup capabilities to a scheduler 2019-12-04 15:44:13 +02:00