]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Non-disruptive backup
authorXing Yang <xing.yang@emc.com>
Mon, 22 Jun 2015 21:46:32 +0000 (17:46 -0400)
committerXing Yang <xing.yang@emc.com>
Wed, 22 Jul 2015 20:59:19 +0000 (16:59 -0400)
commite78018bd05a51e33d5e1cd7c001ee6e5116a6370
tree0a61ba67a4a9ebe6fb6a431a30c0cd28d76219da
parent94e3098238f4af32f6ffa85833d0107cab07c14c
Non-disruptive backup

This patch adds support for non-disruptive backup for
volumes in 'in-use' status as follows:

Adds a force flag in create backup API when backing up
an 'in-use' volume.

For the default implementation in volume/driver.py:
* Create a temporary volume from the original volume
* Backup the temporary volume
* Clean up the temporary volume

For the LVM driver:
* Create a temporary snapshot
* Obtain local_path for the temporary snapshot
* Backup the temporary snapshot
* Cleanup the temporary snapshot

Attach snapshot will be implemented in another patch.

Partial-implements blueprint non-disruptive-backup
Change-Id: I915c279b526e7268d68ab18ce01200ae22deabdd
21 files changed:
cinder/api/contrib/backups.py
cinder/backup/api.py
cinder/backup/manager.py
cinder/backup/rpcapi.py
cinder/db/sqlalchemy/migrate_repo/versions/049_add_temp_volume_snapshot_ids_to_backups.py [new file with mode: 0644]
cinder/db/sqlalchemy/migrate_repo/versions/050_add_previous_status_to_volumes.py [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/objects/backup.py
cinder/objects/volume.py
cinder/tests/unit/api/contrib/test_backups.py
cinder/tests/unit/fake_driver.py
cinder/tests/unit/fake_volume.py
cinder/tests/unit/objects/test_backup.py
cinder/tests/unit/objects/test_volume.py
cinder/tests/unit/test_backup.py
cinder/tests/unit/test_db_api.py
cinder/tests/unit/test_migrations.py
cinder/tests/unit/test_volume.py
cinder/tests/unit/utils.py
cinder/volume/driver.py
cinder/volume/drivers/lvm.py