]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix restore point if backup base is diff-format in ceph
authorlisali <xiaoyan.li@intel.com>
Tue, 7 Jul 2015 07:34:32 +0000 (15:34 +0800)
committerlisali <xiaoyan.li@intel.com>
Tue, 14 Jul 2015 03:57:59 +0000 (11:57 +0800)
commite7c7355589c29c16af2bc73ce06164a72ff5af09
treeb72a7302d658600d80bcfc91bd877dc4673674ba
parent8d54a1d44a58e1931a041e0ea944e85b8d42df73
Fix restore point if backup base is diff-format in ceph

In Ceph when backup base is diff-format and use this backup
to restore volumes not rbd, need to find out the correct restore
point.

This is fixed in cinder/backup/drivers/ceph.py _diff_restore_allowed.

Before the change: when backup is diff-format, and destination volume
is not rbd, the function returns restore_point as None. As a result,
backup restore uses wrong image/snapshot to do restore.

With the change, we always get the right restore point, regardless
of the kind of restore we'll do differential or not.

Change-Id: I006c05d246f59fc6aff597543bedc68589d37576
Closes-Bug: #1472088
cinder/backup/drivers/ceph.py
cinder/tests/unit/test_backup_ceph.py