Volume driver: RBD
Backup driver: RBD (CephBackupDriver)
Description
===========
The CephBackupDriver forces the user to use the default RBD pool in every backup restore when restoring from an incremental backup [1]. This is incorrect since you can specify the container you would like to use when creating a backup [2], and that one should be used instead.
[1] https://opendev.org/openstack/cinder/src/commit/2b0567b0e5b28f62c28cadfe619d8a209c61de3c/cinder/backup/drivers/ceph.py#L1192-L1193
[2] https://docs.openstack.org/python-cinderclient/latest/cli/details.html#cinder-backup-create
Expected output
===============
Instead of using the `self._ceph_backup_pool` and forcing the use of the DEFAULT backup RBD pool, use the `backup.container` attribute.
Steps to reproduce
==================
- Create a Cinder volume: cinder create 1 --volume-type ceph
- Create a full backup: cinder backup-create <vol-uuid> --container volumes
- Create an incremental backup: cinder backup-create <vol-uuid> --container volumes --name incr-volumes-pool --incremental
- Restore the incremental backup: cinder backup-restore <incr-backup-uuid>
Logs c-bak:
===========
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server [req-b91f4761-6369-4253-8744-54ee4523c81e req-7a5469d5-f5f0-43ac-8421-32f9badac1c2 admin None] Exception during message handling: rbd.ImageNotFound: [errno 2] RBD image not found (error opening image b'volume-30c2cae0-46ea-4d57-a471-c40b1afa0f17.backup.a8686c28-20f8-4374-ad12-d861ff53040b' at snapshot None)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.10/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.10/dist-packages/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.10/dist-packages/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/utils.py", line 1055, in wrapper
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server return func(self, *args, **kwargs)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/backup/manager.py", line 697, in restore_backup
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server with excutils.save_and_reraise_exception():
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.10/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server self.force_reraise()
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.10/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server raise self.value
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/backup/manager.py", line 693, in restore_backup
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server self._run_restore(context, backup, volume, volume_is_new)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/backup/manager.py", line 774, in _run_restore
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server backup_service.restore(backup, volume.id,
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/backup/drivers/ceph.py", line 1377, in restore
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server self._restore_volume(backup, target_volume, volume_file,
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/backup/drivers/ceph.py", line 1318, in _restore_volume
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server self._diff_restore_allowed(base_name, backup, volume,
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/backup/drivers/ceph.py", line 1267, in _diff_restore_allowed
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server restore_point = self._get_restore_point(base_name, backup.id)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/backup/drivers/ceph.py", line 1201, in _get_restore_point
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server base_rbd = eventlet.tpool.Proxy(self.rbd.Image(client.ioctx,
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server File "rbd.pyx", line 2894, in rbd.Image.__init__
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server rbd.ImageNotFound: [errno 2] RBD image not found (error opening image b'volume-30c2cae0-46ea-4d57-a471-c40b1afa0f17.backup.a8686c28-20f8-4374-ad12-d861ff53040b' at snapshot None)
Jun 20 16:40:48 enriquetaso cinder-backup[27874]: ERROR oslo_messaging.rpc.server
https:/ /review. opendev. org/c/openstack /cinder/ +/788319