cinder/releasenotes/notes/bug-1895035-rbd-restore-0cd94ccd467ae1e3.yaml
Sofia Enriquez 7b635086cb Ceph: Fix restore backups to diff backend
The current implementation of the `_full_restore` method in the Ceph
backup driver is causing restoration to fail when restoring to another
volume type. This is because the method generates an incorrect image
name in the Ceph pool, resulting in the error message:

```
rbd.ImageNotFound: [errno 2] error opening image
b'volume-a91c11af-1147-4ac7-a5ce-61676736e076.backup.base' at snapshot
None.
```
Originally, the format `volume-<vol-uuid>.backup-<backup-uuid>` was used
for every backup created on the Ceph pool. However, after the change introduced in commit Ia08c252d747148e624f8d9e8b0e43f94773421e0, the
base name format was altered to volume-<uuid>.backup.base when
creating backups from Cinder snapshots.

This patch modifies the current if statement in _full_restore() to check
for the presence of a snapshot_id attribute in the backup. If the
attribute exists, the old base name format is used; otherwise, the new
format is applied. The if block statement in _full_restore() should now
match the format generated by the _full_backup() method.

Additionally, src_snap is activated when the destination volume is RBD
or if the backup is incremental. Currently, the Ceph backup driver only
supports incremental RBD backups, so incremental backups from non-RBD
volumes are not permitted.

NOTE: This patch primarily mirrors the modifications in
Ia08c252d747148e624f8d9e8b0e43f94773421e0, addressing it as a partial
bug fix. There's a consequential patch that further strengthens the
backup restore operations, which should be considered to fully resolve the bug. These two should be squashed and backported together for
optimal implementation.

Partial-Bug: #1895035
Change-Id: Iff8e1e90ab3c7b519819577ec3aafff838e6934f
2023-06-27 21:25:50 +00:00

7 lines
161 B
YAML

---
fixes:
- |
Ceph backup driver `Bug #1895035
<https://bugs.launchpad.net/cinder/+bug/1895035>`_: Fixed restore full
backups to non RBD volumes.