]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Support over subscription in thin provisioning
authorXing Yang <xing.yang@emc.com>
Fri, 16 Jan 2015 21:27:23 +0000 (16:27 -0500)
committerXing Yang <xing.yang@emc.com>
Thu, 5 Feb 2015 04:22:34 +0000 (23:22 -0500)
commit3548a4bc9edbb26b248b5af5ecc2145f2c6f7481
tree65dcf9983c0650784eb9dc6fde9fff1d7ce83583
parenta87d306b5e6c47f22ed83d5722148f8a6f8d4966
Support over subscription in thin provisioning

This patch adds support for over subscription in thin provisioning.
The following changes are proposed:

* A configuration option "max_over_subscription_ratio" will be
  introduced.
* Driver reports the following capacities and ratios:
  * provisioned_capacity
  * max_over_subscription_ratio
    * Driver can use the newly added configuration option to report
      this ratio or it can decide what ratio to report itself.
      The value of this ratio is depending on driver implementation
      and will be reported together with other capabilities and
      capacities by the driver.
  * reserved_percentage
    * Note: This is an existing parameter reported by the driver.
    * Currently it is measured against the free capacity. In this
      patch, it will be changed to measure against the total
      capacity in the filter scheduler.
* Driver also reports the following capabilities:
  * thin_provisioning_support (True or False)
  * thick_provisioning_support (True or False)
* Scheduler will use the above new capabilities reported by the
  driver to make decisions when choosing a backend.

For more details, please see Cinder spec:
https://review.openstack.org/#/c/129342/12/specs/kilo/
over-subscription-in-thin-provisioning.rst

Implements: blueprint over-subscription-in-thin-provisioning
Change-Id: I176a691a4e25bbdc7c4d598628acf2543b2c7ac6
cinder/scheduler/filters/capacity_filter.py
cinder/scheduler/host_manager.py
cinder/scheduler/weights/capacity.py
cinder/tests/scheduler/fakes.py
cinder/tests/scheduler/test_capacity_weigher.py
cinder/tests/scheduler/test_host_filters.py
cinder/volume/driver.py
cinder/volume/drivers/lvm.py