]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix capacity filter to allow oversubscription
authorXing Yang <xing.yang@emc.com>
Wed, 27 May 2015 16:58:04 +0000 (12:58 -0400)
committerXing Yang <xing.yang@emc.com>
Wed, 3 Jun 2015 15:03:19 +0000 (11:03 -0400)
commit28df54c5d1db9ebb766bd7b81962676c4e591cad
tree6c98eca3906f388d59881989c698eaac61b78ccb
parent683d0cb6ff762691e9b262138c048ecc9a75d1f8
Fix capacity filter to allow oversubscription

Currently the capacity filter does not allow oversubscrition
if the free physical capacity is less than the new volume size.
This was based on the assumption that a new thinly provisioned
volume will be consumed right away. This assumption does not
allow us to take full advantage of thin provisioning.

The fix is to allow oversubscription if thin provisioning is
supported and max_over_subscription_ratio is greater than or
equal to 1. The free physical capacity will not be used to
compare with the new volume size for a backend that supports
oversubscription in thin provisioning. The oversubscription
ratio and virtual free capacity will still be used to decide
whether a backend can be chosen for thin provisioning.

Closes-Bug: #1458976
Change-Id: I4c8904445654db839c25ded420915f83c3756f94
(cherry picked from commit 75953752e41819b0d2ca770d4d13ed1ccaec685a)
cinder/scheduler/filters/capacity_filter.py
cinder/tests/scheduler/test_host_filters.py