[RBD] Fix snapshot backup name

We always create a full backup for snapshots. It means we have to
generate a correct buckup name for a base backup.

Closes-Bug: #1860739
Change-Id: Ia08c252d747148e624f8d9e8b0e43f94773421e0
This commit is contained in:
Ivan Kolodyazhny 2020-12-17 16:06:00 +00:00
parent 108c554dc3
commit f04d905a63
1 changed files with 4 additions and 1 deletions

View File

@ -805,7 +805,10 @@ class CephBackupDriver(driver.BackupDriver):
image.
"""
volume_id = backup.volume_id
backup_name = self._get_backup_base_name(volume_id, backup=backup)
if backup.snapshot_id:
backup_name = self._get_backup_base_name(volume_id)
else:
backup_name = self._get_backup_base_name(volume_id, backup=backup)
with eventlet.tpool.Proxy(rbd_driver.RADOSClient(self,
backup.container)) as client: