Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 890168

Summary: cinder volume creation fails and does not return an error.
Product: Red Hat OpenStack Reporter: Nir Magnezi <nmagnezi>
Component: openstack-cinderAssignee: RHOS Maint <rhos-maint>
Status: CLOSED NOTABUG QA Contact: Nir Magnezi <nmagnezi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0 (Folsom)CC: eglynn, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-03 16:35:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
cinder logs none

Description Nir Magnezi 2012-12-25 12:56:33 UTC
Description of problem:
=======================
cinder volume creation fails, and does not return an error.
Tried to create a volume larger then the available free space in cinder-volumes.


Version-Release number of selected component (if applicable):
=============================================================
Folsom
# rpm -qa | grep cinder
python-cinder-2012.2.1-1.el6ost.noarch
python-cinderclient-0.2.26-1.el6.noarch
openstack-cinder-2012.2.1-1.el6ost.noarch


How reproducible:
=================
100%


Steps to Reproduce:
===================
1. Check the amount of free space in cinder-volumes:

# vgdisplay cinder-volumes | grep Free
  Free  PE / Size       511 / 2.00 GiB

2. Check the volumes gigabyte quota:

# nova quota-show | grep gigabyte
| gigabytes                   | 1000  |

3. Create a Volume larger then the amount of free space, yet still smaller then the tenant volume gigabyte quota:

# cinder create 11
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|      created_at     |      2012-12-25T12:43:26.024955      |
| display_description |                 None                 |
|     display_name    |                 None                 |
|          id         | e37b1fbb-caed-4ef2-9664-44dabd0f86fa |
|       metadata      |                  {}                  |
|         size        |                  11                  |
|     snapshot_id     |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+

4. Check for returned error:

# echo $?

Actual results:
===============
# echo $?
0

yet:

# cinder list
+--------------------------------------+--------+--------------+------+-------------+-------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+--------+--------------+------+-------------+-------------+
| e37b1fbb-caed-4ef2-9664-44dabd0f86fa | error  |     None     |  11  |     None    |             |
+--------------------------------------+--------+--------------+------+-------------+-------------+


Expected results:
=================
cinder should fail to create the volume and return an error as a result of insufficient free space.

# echo $?
1

Additional info:
================
1. As a result,  When the user will try to create a volume using horizon, in case of an error he will not get any indication for the reason.
2. Cinder logs attached to this bug.

Comment 1 Nir Magnezi 2012-12-25 12:57:50 UTC
Created attachment 668905 [details]
cinder logs

Comment 3 Eoghan Glynn 2013-01-03 16:35:58 UTC
This is expected behaviour, as the resource creation request was successfully consumed by the API layer, whereas the actual error occurs later on the asynchronous RPC to create the volume.

This is consistent with the resource creation pattern used accross the board in the openstack CLIs (e.g. for booting instances via nova boot).