cinder/cinder
Adrien Vergé 0269a26f13 Add an instance-locality filter
Having an instance and an attached volume on the same physical host
(i.e. data locality) can be desirable in some configurations, in order
to achieve high-performance disk I/O.

This patch adds an InstanceLocalityFilter filter that allow users to
request creation of volumes 'local' to an existing instance, without
specifying the hypervisor's hostname, and without any knowledge of the
underlying back-ends.

In order to work:
- At least one physical host should run both nova-compute and
  cinder-volume services.
- The Extended Server Attributes extension needs to be active in Nova
  (this is by default), so that the 'OS-EXT-SRV-ATTR:host' property is
  returned when requesting instance info.
- The user making the call needs to have sufficient rights for the
  property to be returned by Nova. This can be achieved either by
  changing Nova's policy.json (the 'extended_server_attributes' option),
  or by setting an account with privileged rights in Cinder conf.

For example:
  Instance 01234567-89ab-cdef is running in a hypervisor on the physical
  host 'my-host'.

  To create a 42 GB volume in a back-end hosted by 'my-host':
    cinder create --hint local_to_instance=01234567-89ab-cdef 42

Note:
  Currently it is not recommended to allow instance migrations for
  hypervisors where this hint will be used. In case of instance
  migration, a previously locally-created volume will not be
  automatically migrated. Also in case of instance migration during the
  volume's scheduling, the result is unpredictable.

DocImpact: New Cinder scheduler filter
Change-Id: Id428fa2132c1afed424443083645787ee3cb0399
2015-01-07 10:40:07 +01:00
..
api Fix handling of serialized data in filtering of volumes 2014-12-30 19:36:53 +02:00
backup Rename oslo.concurrency to oslo_concurrency 2014-12-19 18:39:11 -08:00
brick Transition LVM Driver to use Target Objects 2015-01-02 13:13:42 -07:00
cmd Revert "Outputs the message about failing to bind 2014-12-23 11:59:06 -05:00
common Add a privileged user for OpenStack services 2014-12-27 15:23:20 +01:00
compute Add an instance-locality filter 2015-01-07 10:40:07 +01:00
consistencygroup Implementing the use of _L’x’/i18n markers 2014-12-09 10:03:29 +00:00
db Remove check on db_exc.DBError 2014-12-29 12:50:45 +02:00
hacking Fix calls to assert_called_once in unit tests 2014-11-24 16:56:10 +00:00
image Rename oslo.concurrency to oslo_concurrency 2014-12-19 18:39:11 -08:00
keymgr Implementing the use of _L’x’/i18n markers 2014-12-09 10:03:29 +00:00
locale Imported Translations from Transifex 2014-12-28 06:14:09 +00:00
openstack Merge "Replace oslo-incubator with oslo_context" 2015-01-05 23:27:33 +00:00
replication Use oslo.utils 2014-11-20 22:17:47 +08:00
scheduler Add an instance-locality filter 2015-01-07 10:40:07 +01:00
testing updating testing readme with more current information. 2014-02-26 09:21:13 -05:00
tests Add an instance-locality filter 2015-01-07 10:40:07 +01:00
transfer Implementing the use of _L’x’/i18n markers 2014-12-09 10:03:29 +00:00
volume Merge "The DRBD(manage) Cinder volume driver" 2015-01-05 21:28:40 +00:00
zonemanager Rename oslo.concurrency to oslo_concurrency 2014-12-19 18:39:11 -08:00
__init__.py Remove vim header 2013-12-30 18:53:02 -06:00
context.py Merge "Replace oslo-incubator with oslo_context" 2015-01-05 23:27:33 +00:00
exception.py Add an instance-locality filter 2015-01-07 10:40:07 +01:00
flow_utils.py Stop stacktracing on QuotaErrors 2014-11-12 13:49:42 -08:00
i18n.py Remove import of private _lazy module 2015-01-06 16:28:22 -07:00
manager.py debug level logs should not be translated 2014-06-18 09:03:02 -06:00
policy.py Update oslo policy and its dependencies 2014-08-29 13:56:30 +02:00
quota.py Use oslo.utils 2014-11-20 22:17:47 +08:00
quota_utils.py Use oslo.i18n 2014-08-08 17:26:41 -05:00
rpc.py Switch to oslo.serialization 2014-11-19 15:49:03 +08:00
service.py Rename oslo.concurrency to oslo_concurrency 2014-12-19 18:39:11 -08:00
ssh_utils.py Implementing the use of _L’x’/i18n markers 2014-11-11 10:32:06 +00:00
test.py Remove import of private _lazy module 2015-01-06 16:28:22 -07:00
utils.py Rename oslo.concurrency to oslo_concurrency 2014-12-19 18:39:11 -08:00
version.py Remove vim header 2013-12-30 18:53:02 -06:00
wsgi.py Use oslo.utils 2014-11-20 22:17:47 +08:00