]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Volume create fails with FakeISCSIDriver
authorscottda <scott.dangelo@hp.com>
Mon, 8 Feb 2016 23:59:34 +0000 (16:59 -0700)
committerscottda <scott.dangelo@hp.com>
Tue, 9 Feb 2016 00:11:49 +0000 (17:11 -0700)
Volume create fails when the FakeISCSIDriver is used, because the
scheduler capacity filter detects that capacity on the fake backend
is zero. Change the total_capacity and free_capacity_gb for the
FakeISCSIDriver from 0 to infinite.

Change-Id: Ifedd483a660aefef89a85e6a55b2c0a5ca50c7d5
Closes-Bug: #1543171

cinder/volume/driver.py

index 378b2a5e40a5ae74ab8340e9ec42639530c5b107..178910fe6bacd61c4693f7586bb0a99044902e20 100644 (file)
@@ -2634,8 +2634,8 @@ class FakeISCSIDriver(ISCSIDriver):
         fake_pool = {}
         fake_pool.update(dict(
             pool_name=data["volume_backend_name"],
-            total_capacity_gb=0,
-            free_capacity_gb=0,
+            total_capacity_gb='infinite',
+            free_capacity_gb='infinite',
             provisioned_capacity_gb=0,
             reserved_percentage=100,
             QoS_support=False,