OpenStack Block Storage (Cinder)
Go to file
Zhiteng Huang 254e37ab3c Add AllocatedCapacityWeigher
AllocatedCapacityWeigher is a weigher that weigh hosts by their
allocated capacity. The main purpose of this weigher is to simulate
the SimpleScheduler's behavior, which sorts hosts by the size of
all volumes on them.  So by allocated capacity, it equals to the
sum of size of all volumes on target host.

In order to keep track of 'allocated' capacity, host state is updated
to add a 'allocated_capacity_gb' attribute to record the value, which
means each back-end must report one extra stats to scheduler.
Fortunately, the 'allocated' capacity we are interested in here is
pure Cinder level capacity, the volume manager can take all the burden
to calculate this value without having to query back-ends. The volume
manager does the initial calculation in init_host() by the time when it
has to query all existing volumes from DB for ensure_export(). After
initial calculation, volume manager/scheduler will keep track of every
new request that changes 'allocated_capacity' and make sure this value
is up to date.

!DriverImpact! Cinder driver developers, please read on:

This patch contains a change that might IMPACT volume drivers: volume
manager now uses 'stats' attribute to save 'allocated_capacity_gb'.
And this information will be merged with those stats drivers provide
as a whole for scheduler to consume.  If you plan to report any form
of allocated space other than the apparent Cinder level value, (e.g.
actual capacity allocated), Please choose a key name other than
'allocated_capacity_gb', otherwise it will *OVERWRITE* the value volume
manager has calculated and confuse scheduler.

Partially implements bp: deprecate-chance-and-simple-schedulers

Change-Id: I306230b8973c2d1ad77bcab14ccde68e997ea816
2013-12-30 17:06:12 +08:00
bin Fix spelling errors 2013-12-26 12:46:47 +02:00
cinder Add AllocatedCapacityWeigher 2013-12-30 17:06:12 +08:00
doc Fix typo/misspelled words 2013-12-03 22:49:12 +08:00
etc/cinder Add AllocatedCapacityWeigher 2013-12-30 17:06:12 +08:00
tools Fix ./run_tests.sh -V --virtual-env-name 2013-11-22 10:14:22 -05:00
.coveragerc Add .coveragerc to show proper coverage statistics. As in other openstack projects. 2013-05-15 03:40:07 -07:00
.gitignore Updates .gitignore 2013-11-28 09:52:23 +00:00
.gitreview Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
.mailmap Update my mailmap 2013-10-25 16:29:14 +08:00
.testr.conf Fix up the test framework 2013-06-14 14:02:17 +00:00
CONTRIBUTING.md Add CONTRIBUTING file. 2012-11-22 12:47:49 -07:00
HACKING.rst Update URL for global HACKING document and remove duplicate section 2013-11-11 11:39:23 -08:00
LICENSE Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
MANIFEST.in Use setuptools-git. 2012-08-10 11:56:00 -04:00
README.rst Cleanup README.rst 2013-07-22 11:26:34 +02:00
babel.cfg Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
openstack-common.conf Pull latest service module from Oslo 2013-11-22 16:38:17 +00:00
pylintrc Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
requirements.txt Merge "Switch create volume commands to Taskflow 0.1.1" 2013-12-14 05:55:24 +00:00
run_tests.sh Merge "Don't need to init testr explicitly" 2013-09-03 09:26:17 +00:00
setup.cfg Add AllocatedCapacityWeigher 2013-12-30 17:06:12 +08:00
setup.py Updated from global requirements 2013-10-10 20:24:27 +00:00
test-requirements.txt Updated from global requirements 2013-12-10 23:40:52 +00:00
tox.ini Fix and enable gating on F401 2013-12-20 15:01:23 +01:00

README.rst

The Choose Your Own Adventure README for Cinder

You have come across a storage service for an open cloud computing service. It has identified itself as "Cinder." It was abstracted from the Nova project.

To monitor it from a distance: follow @openstack on twitter.

To tame it for use in your own cloud: read http://docs.openstack.org

To study its anatomy: read http://cinder.openstack.org

To dissect it in detail: visit http://github.com/openstack/cinder

To taunt it with its weaknesses: use http://bugs.launchpad.net/cinder

To watch it: http://jenkins.openstack.org

To hack at it: read HACKING.rst