cinder/cinder/db
John Griffith 2fa6fdd784 Add shared_targets flag to Volumes
This adds a bool column to volumes to notify consumers if
the backend hosting the volume utilizes shared_targets
or not.

We use the volume-drivers capabilities report to determine
this and default to True if a driver doesn't report anything.

The purpose of the column is to notify Nova that it needs to
do some sort of locking around connect/disconnect to be sure
other volumes on the same node aren't sharing the iscsi connection.

Using a default of "True" is safe because although locking and doing
the extra checks might be somewhat inefficient it works fine because
it will just appear that there's never any other volumes in use.

So this change adds the column to the DB as well as an online migration
to go through and update any existing volumes.  With this and the
service_uuid column consumers will have everything the need to:
1. determine if they need to lock
2. use the service_uuid as a unique lock name

That last remaining change in this set will be to add the fields to
the view-builder and bump the API version.

Change-Id: If600c28c86511cfb83f38d92cf6418954fb4975e
2017-11-28 13:55:23 -07:00
..
sqlalchemy Add shared_targets flag to Volumes 2017-11-28 13:55:23 -07:00
__init__.py Enable flake8 H303,H304 checking 2014-04-15 09:16:01 +00:00
api.py Add service_uuid FK to volumes 2017-11-21 18:27:32 +00:00
base.py Add ability to specify backup driver via class name 2017-10-11 12:59:00 +03:00
migration.py Compact Newton database migrations 2017-09-26 00:32:21 -05:00