cinder/cinder/tests/unit/backup
Chaynika Saikia bc9ab142da cinder incremental backup with ceph fails if last one deleted
If the last incremental backup is deleted then the backup snapshot
is deleted but the source volume snapshot remains. Due to mismatch
between the source volume snapshot and backup snapshot, there is an
error when "rbd export-diff" and "rbd import-diff" is done. Hence,
full backup happens.

To fix this issue, all the previous source volume snapshots are
preserved. When the last incremental backup is deleted, then its
backup snapshot is deleted. But because all the source volume snaps
exist, thus it can now update --from-snap for "rbd export-diff" to
be the most recent source volume snapshot for which there exists a
backup snapshot as well. This is how the incremental backup operation
will go successful.

For a user who upgrades to the new code, if the last backup snapshot
and source volume snapshot are in sync, i.e. both of them exist, then
the next create backup operation will continue as an incremental one.
However, if there is no source volume snapshot for the last existing
incremental backup (before the code was upgraded), then a full backup
happens. After this full backup, all the next backups are incremental
while all their corresponding source volume snapshots are also preserved.
In this way, after a user upgrades, if he deletes the last incremental
backup, the next create backup operation will be successful and be
incremental.

Since all the backup snapshots exist for all the backups, if the user
wants to restore a backup, which was created before the code was upgraded,
the user will not lose any data since the same base backup is used.

Change-Id: Ia9c29bb720152d42bec273202fa49ca4b6a41ce2
Closes-Bug: #1703011
2017-08-11 18:52:57 -04:00
..
drivers cinder incremental backup with ceph fails if last one deleted 2017-08-11 18:52:57 -04:00
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
fake_backup.py Move all backups related unit tests to backup directory 2016-05-26 17:09:33 +03:00
fake_google_client.py Use googleapiclient import instead of apiclient 2016-03-11 12:19:01 +01:00
fake_google_client2.py Add cinder backup driver for Google Cloud Storage 2016-01-18 23:28:23 +05:30
fake_service.py Rename method 'delete' to 'delete_backup' in backup drivers 2017-07-04 13:35:03 +03:00
fake_service_with_verify.py Remove oslo logging from backup unit tests 2015-06-27 21:23:34 +00:00
fake_swift_client.py Remove oslo logging from backup unit tests 2015-06-27 21:23:34 +00:00
fake_swift_client2.py Switch to the oslo_utils.fileutils 2015-08-20 07:47:48 +00:00
test_backup.py cinder backup sets incorrect parent_id 2017-07-26 23:03:05 -04:00
test_rpcapi.py Add service dynamic log change/query 2017-05-16 13:37:35 +02:00