
Cinder has done a good job hiding the details of storage backends from end users by using volume types. However there are use cases where users who build their application on top of volumes would like to be able to 'choose' where a volume be created on. How can Cinder provide such capability without hurting the simplicity we have been keeping? Affinity/anti-affinity is one of the flexibility we can provide without exposing details to backends. The term affinity/anti-affinity here is to to describe the relationship between two sets of volumes in terms of location. To limit the scope, we describe one volume is affinity with the other one only when they reside in the same volume back-end (this notion can be extended to volume pools if volume pool support lands in Cinder); on the contrary, 'anti-affinity' relation between two sets of volumes simply implies they are on different Cinder back-ends (pools). This affinity/anti-affinity filter filters Cinder backend based on hint specified by end user. The hint expresses the affinity or anti-affinity relation between new volumes and existing volume(s). This allows end users to provide hints like 'please put this volume to a place that is different from where Volume-XYZ resides in'. This change adds two new filters to Cinder - SameBackendFilter and DifferentBackendFilter. These two filters will look at the scheduler hint provided by end users (via scheduler hint extension) and filter backends by checking the 'host' of old and new volumes see if a backend meets the requirement (being on the same backend as existing volume or not being on the same backend(s) as existing volume(s)). For example: Volume A is on 'backend 1', to create Volume B on the same backend as A, use: cinder create --hint same_host=VolA-UUID SIZE To create Volume C on different backend than that of A, use: cinder create --hint different_host=VolA-UUID SIZE Now, to create Volume D on different backend other than those of A and C, use: cinder create --hint different_host=VolA-UUID --hint different_host=VolC-UUID SIZE or: cinder create --hint different_host="[VolA-UUID, VolC-UUID]" SIZE implements bp: affinity-antiaffinity-filter DocImpact Change-Id: I19f298bd87b0069c0d1bb133202188d3bf65b770
87 lines
3.0 KiB
INI
87 lines
3.0 KiB
INI
[metadata]
|
|
name = cinder
|
|
version = 2014.2
|
|
summary = OpenStack Block Storage
|
|
description-file =
|
|
README.rst
|
|
author = OpenStack
|
|
author-email = openstack-dev@lists.openstack.org
|
|
home-page = http://www.openstack.org/
|
|
classifier =
|
|
Environment :: OpenStack
|
|
Intended Audience :: Information Technology
|
|
Intended Audience :: System Administrators
|
|
License :: OSI Approved :: Apache Software License
|
|
Operating System :: POSIX :: Linux
|
|
Programming Language :: Python
|
|
Programming Language :: Python :: 2
|
|
Programming Language :: Python :: 2.7
|
|
Programming Language :: Python :: 2.6
|
|
|
|
[global]
|
|
setup-hooks =
|
|
pbr.hooks.setup_hook
|
|
|
|
[files]
|
|
packages =
|
|
cinder
|
|
scripts =
|
|
bin/cinder-all
|
|
bin/cinder-api
|
|
bin/cinder-backup
|
|
bin/cinder-clear-rabbit-queues
|
|
bin/cinder-manage
|
|
bin/cinder-rpc-zmq-receiver
|
|
bin/cinder-rtstool
|
|
bin/cinder-scheduler
|
|
bin/cinder-volume
|
|
bin/cinder-volume-usage-audit
|
|
|
|
[entry_points]
|
|
cinder.scheduler.filters =
|
|
AvailabilityZoneFilter = cinder.openstack.common.scheduler.filters.availability_zone_filter:AvailabilityZoneFilter
|
|
CapabilitiesFilter = cinder.openstack.common.scheduler.filters.capabilities_filter:CapabilitiesFilter
|
|
CapacityFilter = cinder.scheduler.filters.capacity_filter:CapacityFilter
|
|
DifferentBackendFilter = cinder.scheduler.filters.affinity_filter:DifferentBackendFilter
|
|
JsonFilter = cinder.openstack.common.scheduler.filters.json_filter:JsonFilter
|
|
RetryFilter = cinder.openstack.common.scheduler.filters.ignore_attempted_hosts_filter:IgnoreAttemptedHostsFilter
|
|
SameBackendFilter = cinder.scheduler.filters.affinity_filter:SameBackendFilter
|
|
cinder.scheduler.weights =
|
|
AllocatedCapacityWeigher = cinder.scheduler.weights.capacity:AllocatedCapacityWeigher
|
|
CapacityWeigher = cinder.scheduler.weights.capacity:CapacityWeigher
|
|
ChanceWeigher = cinder.scheduler.weights.chance:ChanceWeigher
|
|
VolumeNumberWeigher = cinder.scheduler.weights.volume_number:VolumeNumberWeigher
|
|
console_scripts =
|
|
cinder-rootwrap = oslo.rootwrap.cmd:main
|
|
# These are for backwards compat with Havana notification_driver configuration values
|
|
oslo.messaging.notify.drivers =
|
|
cinder.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver
|
|
cinder.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver
|
|
cinder.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver
|
|
cinder.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver
|
|
cinder.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver
|
|
|
|
[build_sphinx]
|
|
all_files = 1
|
|
build-dir = doc/build
|
|
source-dir = doc/source
|
|
|
|
[egg_info]
|
|
tag_build =
|
|
tag_date = 0
|
|
tag_svn_revision = 0
|
|
|
|
[compile_catalog]
|
|
directory = cinder/locale
|
|
domain = cinder
|
|
|
|
[update_catalog]
|
|
domain = cinder
|
|
output_dir = cinder/locale
|
|
input_file = cinder/locale/cinder.pot
|
|
|
|
[extract_messages]
|
|
keywords = _ gettext ngettext l_ lazy_gettext
|
|
mapping_file = babel.cfg
|
|
output_file = cinder/locale/cinder.pot
|