]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Allow volume back-end to report 'infinite' or 'unknown' as capacity
authorZhiteng Huang <zhiteng.huang@intel.com>
Mon, 28 Jan 2013 17:12:31 +0000 (01:12 +0800)
committerZhiteng Huang <zhiteng.huang@intel.com>
Tue, 29 Jan 2013 05:08:40 +0000 (13:08 +0800)
commitee9d30a73a74a2e1905eacc561c1b5188b62ca75
tree3f3a04a2fca78e134915db5a7b1c86394b6ecc19
parent602da5b06b7bd2b16079305d2b2b90f88301f675
Allow volume back-end to report 'infinite' or 'unknown' as capacity

For some reason, some volume back-ends cannot report actual capacity
that is available or even total capacity (e.g. thin-provisioning),
Cinder should allow such capability report and make placement/schedule
decision based on these status.

In particular, we agree to use 'infinite' to mark unlimited space and
'unknown' to mark unknown/unclear space.  Host manager and CapacityFilter
are updated accordingly to allow such capacity.  For those back-ends
report 'infinite' or 'unknown' capacity, CapacityFilter will let them
pass to give them a chance to try.  Even if failure happened, the retry
mechanism should take care of the case.

Change-Id: I6871a28745111b1878a606372e6edd664f0ea10c
cinder/scheduler/filters/capacity_filter.py
cinder/scheduler/host_manager.py
cinder/tests/scheduler/test_host_filters.py
cinder/tests/scheduler/test_host_manager.py