Bug 976279 - openstack-horizon: no size validation on volume creation
openstack-horizon: no size validation on volume creation
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Matthias Runge
Shai Revivo
: Triaged
Depends On: 1029919
  Show dependency treegraph
Reported: 2013-06-20 05:24 EDT by Haim
Modified: 2016-06-13 02:55 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-06-13 02:55:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Haim 2013-06-20 05:24:42 EDT
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

Actual results:

Expected results:

Additional info:
Comment 1 Haim 2013-06-20 05:31:40 EDT
Created attachment 763356 [details]
cinder log
Comment 2 Julie Pichon 2013-07-01 10:45:35 EDT
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 11:14:45 EDT
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 07:27:08 EDT
Matching target versions to bug depended on.
Comment 8 Masco 2015-12-22 01:52:43 EST
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 02:55:54 EDT
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.