]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add restore_volume_id in backup
authorLisaLi <xiaoyan.li@intel.com>
Thu, 24 Dec 2015 03:16:26 +0000 (11:16 +0800)
committerLisaLi <xiaoyan.li@intel.com>
Mon, 15 Feb 2016 02:00:31 +0000 (10:00 +0800)
commit4c83280125cc7ce15dc65b700494b2cc4491b4bd
treed4c4fdca57d99b20baf527f440310cfabf525e3f
parent54991b10869e803ff567993aca90efa23463f03d
Add restore_volume_id in backup

This patch is to add restore_volume_id in backup object.
When restoring a volume from a backup, it saves the
volume in backup object.

Currently volume service and backup service are in same host.
When backup service starts, it does cleanup tasks on both
backups and volumes on current host.

But with bp scalable-backup-service, backup service and
volume services can run on different hosts. When doing cleanup
tasks, we need to find out backing-up and restoring volumes
related to the backups on current host. Backing-up volumes can
be found with field backup.volume_id. Restoring volumes are found
by new field backup.restore_volume_id.

Change-Id: I757be7a5e47fc366c181400587b5a61fe3709a0b
Partial-Implements: bp scalable-backup-service
Co-Authored-By: Tom Barron <tpb@dyncloud.net>
cinder/backup/api.py
cinder/db/sqlalchemy/migrate_repo/versions/064_add_restore_volume_id_to_backups.py [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/objects/backup.py
cinder/objects/base.py
cinder/tests/unit/objects/test_backup.py
cinder/tests/unit/objects/test_objects.py
cinder/tests/unit/test_backup.py
cinder/tests/unit/test_db_api.py
cinder/tests/unit/test_migrations.py