Volume create fails with FakeISCSIDriver

Bug #1543171 reported by Ollie Leahy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Scott DAngelo

Bug Description

Volume create fails when the FakeISCSIDriver is used, because the scheduler capacity filter detects that capacity on the fake backend is zero.

If you try to create a volume using the fake backend you'll see this message in the file cinder-scheduler.log

2016-02-08 13:06:36.978 2546 WARNING cinder.scheduler.filters.capacity_filter [req-97dd295a-cd50-420c-b8a6-a99d3614c8d3 3193c796bfa74c27b573d2235e5192b7 a16d917aad8446018985583054979f17 - - -] Insufficient free space for volume creation. Total capacity is 0.00 on host ha-volume-manager@fake-1#FAKE.

The follow patch allows volumes to be created:

$ git diff
diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py
index 378b2a5..178910f 100644
--- a/cinder/volume/driver.py
+++ b/cinder/volume/driver.py
@@ -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,

Changed in cinder:
assignee: nobody → Scott DAngelo (scott-dangelo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/277619

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/277619
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=902558215ed3fdd8cdfcedd3244189ec75eea25b
Submitter: Jenkins
Branch: master

commit 902558215ed3fdd8cdfcedd3244189ec75eea25b
Author: scottda <email address hidden>
Date: Mon Feb 8 16:59:34 2016 -0700

    Volume create fails with FakeISCSIDriver

    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

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 8.0.0.0b3

This issue was fixed in the openstack/cinder 8.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.