]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add volume multi attach support
authorWalter A. Boring IV <walter.boring@hp.com>
Wed, 10 Dec 2014 01:03:39 +0000 (01:03 +0000)
committerWalter A. Boring IV <walter.boring@hp.com>
Tue, 10 Mar 2015 15:36:58 +0000 (08:36 -0700)
commit10d54216871fde27172fbcb1a3c9bfec59b824c2
tree1b4b6df826d28fbc09248eb420c25a0d4c943a09
parent490f03b48a231d9dfdf4c351f8fba72982e46a70
Add volume multi attach support

This patch includes the Cinder changes needed
to support volume multiple attaches.  Nova and
python-cinderclient also need patches associated
to provide support for multiple attachments.

This adds the multiattach flag to volumes.  When a
volume is created, a multiattach flag can be set,
which allows a volume to be attached to more than
one Nova instance or host.  If the multiattach flag is
not set on a volume, it cannot be attached to more
than one Nova instance or host

Each volume attachment is tracked in a
new volume_attachment table.  The attachment id is
the unique identifier for each attachment to an
instance or host.

When a volume is to be detached the attachment
uuid must be passed in to the detach call in
order to determine which attachment should be
removed.  Since a volume can be attached to an
instance and a host, the attachment id is used
as the attachment identifier.

Nova:
https://review.openstack.org/#/c/153033/
https://review.openstack.org/#/c/153038/

python-cinderclient:
https://review.openstack.org/#/c/85856/

Change-Id: I950fa00ed5a30e7758245d5b0557f6df42dc58a3
Implements: blueprint multi-attach-volume
APIImpact
38 files changed:
cinder/api/contrib/admin_actions.py
cinder/api/contrib/volume_actions.py
cinder/api/v1/volumes.py
cinder/api/v2/views/volumes.py
cinder/api/v2/volumes.py
cinder/backup/manager.py
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/db/sqlalchemy/migrate_repo/versions/040_add_volume_attachment.py [new file with mode: 0644]
cinder/db/sqlalchemy/migrate_repo/versions/040_sqlite_downgrade.sql [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/exception.py
cinder/objects/volume.py
cinder/tests/api/contrib/test_admin_actions.py
cinder/tests/api/contrib/test_volume_actions.py
cinder/tests/api/v1/stubs.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/stubs.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/test_backup.py
cinder/tests/test_db_api.py
cinder/tests/test_hp3par.py
cinder/tests/test_migrations.py
cinder/tests/test_volume.py
cinder/tests/test_volume_rpcapi.py
cinder/tests/utils.py
cinder/volume/api.py
cinder/volume/driver.py
cinder/volume/drivers/datera.py
cinder/volume/drivers/san/hp/hp_3par_common.py
cinder/volume/drivers/san/hp/hp_3par_fc.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py
cinder/volume/drivers/scality.py
cinder/volume/drivers/solidfire.py
cinder/volume/flows/api/create_volume.py
cinder/volume/manager.py
cinder/volume/rpcapi.py
cinder/volume/utils.py