Comment 8 for bug 1703011

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/486678
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=bc9ab142da919087c71525978f960115ff0259b9
Submitter: Jenkins
Branch: master

commit bc9ab142da919087c71525978f960115ff0259b9
Author: Chaynika Saikia <email address hidden>
Date: Mon Jul 24 11:48:00 2017 -0400

    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