Bug 976279 - openstack-horizon: no size validation on volume creation
Summary: openstack-horizon: no size validation on volume creation
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 4.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Matthias Runge
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On: 1029919
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-20 09:24 UTC by Haim
Modified: 2016-06-13 06:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-13 06:55:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cinder log (7.88 MB, application/x-tar)
2013-06-20 09:31 UTC, Haim
no flags Details

Description Haim 2013-06-20 09:24:42 UTC
Description of problem:

no size validation on volume creation, tried to create a volume with size of 150G and it failed (since my vg size is 100g). 

please add validation upon creation of new volumes


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. log in to horizon
2. create volume that is big enough from current cinder-volume VG
3.

Actual results:


Expected results:


Additional info:

Comment 1 Haim 2013-06-20 09:31:40 UTC
Created attachment 763356 [details]
cinder log

Comment 2 Julie Pichon 2013-07-01 14:45:35 UTC
Thank you for the report. I'm not sure if there is much that can be done from the Horizon side. I don't believe there is a Cinder API that can tell us if there is sufficient free space available.

A clearer error message would be nice, but it doesn't seem that we get an error message back from Cinder at all (the same happens from the command line, `$ cinder create 150` returns the volume created that will be in error).

I wonder if we really want to return that kind of info though. Wouldn't this give too much information on the cloud infrastructure to a user? Usually in the cloud world, available space appears to be infinite, and even if the user gets told about why the volume failed to be created it's not a problem they can solve (only the admin can act on it).

Adding a needsinfo for our resident Cinder expert Eric to get his opinion and see if he has alternative suggestions.

Comment 3 Eric Harney 2013-07-01 15:14:45 UTC
I'm also not sure what can be done about this today.  Cinder volume create calls are asynchronous and unless the failure occurs in the synchronous part of the create call (i.e. exceeding quota), Cinder doesn't indicate the reason for failure.

IMO the answer for fixing this up is to have Cinder report why it failed, rather than trying to check for sufficient space up front.  (Some Cinder backends don't report a specific amount of free space, anyway.)

But, for Horizon to give more useful information, Cinder would have to report more details through an API.

Here, the failure was that the scheduler couldn't find a host with enough free space:
2013-06-20 12:28:30  WARNING [cinder.scheduler.filters.capacity_filter] Insufficient free space for volume creation (requested / avail): 150/107.0
2013-06-20 12:28:30    ERROR [cinder.scheduler.manager] Failed to schedule_create_volume: No valid host was found.

Comment 5 Julie Pichon 2014-05-27 11:27:08 UTC
Matching target versions to bug depended on.

Comment 8 Masco 2015-12-22 06:52:43 UTC
I am able to reproduce the issue in latest upstream code also.

No api to get the error message from the cinder.
cinder printing the below error message in log.

2015-12-22 06:41:29.102 ERROR cinder.scheduler.flows.create_volume [req-7dfbb556-19d6-4f5b-b1f9-8da7e28e58be 576fc9a0217744d9bbce4670cb3a3e19 f4d95fcce5d840c6a4fd74cb20e01dba] Failed to run task cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create: No valid host was found. No weighed hosts available

as of now horizon displaying the status of the volume as "Error".

Comment 10 Matthias Runge 2016-06-13 06:55:54 UTC
this should be handled upstream. I've been told, there is not much we can do until volume creation either succeeds or fails.


Note You need to log in before you can comment on or make changes to this bug.