Bug 984918 - horizon: can't create an image from file with "Bad Request" error
Summary: horizon: can't create an image from file with "Bad Request" error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: z1
: 4.0
Assignee: Flavio Percoco
QA Contact: Tzach Shefi
URL:
Whiteboard: storage
Depends On: 1015645
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-16 11:23 UTC by Dafna Ron
Modified: 2016-04-26 15:43 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-23 17:32:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs (3.81 MB, application/x-gzip)
2013-07-16 11:23 UTC, Dafna Ron
no flags Details
httpd logs after debug change (3.65 KB, application/x-gzip)
2013-07-21 10:58 UTC, Dafna Ron
no flags Details
logs (22.16 KB, application/x-gzip)
2013-12-11 15:17 UTC, Dafna Ron
no flags Details
logs (6.55 KB, application/x-gzip)
2013-12-11 15:35 UTC, Dafna Ron
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1231887 0 None None None Never

Description Dafna Ron 2013-07-16 11:23:50 UTC
Created attachment 774175 [details]
logs

Description of problem:

I tried creating an image from horizon using the Image file option and am getting http bad request error. 

I am working with a csb rhel with firefox-17.0.5-2.el6.x86_64

when running 

glance image-create --disk-format qcow2 --file /tmp/e886fb6e-f91f-46ae-a488-0f24e47f5731 --name rhev --container-format bare

I managed to create and launch an instance from the image. 

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

python-django-horizon-2013.1.2-1.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. create a template in rhevm and export it to an export domain
2. cp the image from the export domain to your local computer
3. create a new image from horizon and select the image file from your local computer

Actual results:

we get a Bad request error

Expected results:

we should succeed to upload the file image and create a glance image from it 

Additional info: attaching logs

Bad Request

Your browser sent a request that this server could not understand.
Apache/2.2.15 (Red Hat) Server at <compute_name>.XX.XX.XXX.redhat.com Port 80

Comment 1 Julie Pichon 2013-07-19 11:27:00 UTC
Hi, could you set DEBUG to True in /etc/openstack-dashboard/local_settings, restart httpd, retry the upload and attach the horizon error logs to the bug? They should include more information then (it will also display a traceback in the browser; setting DEBUG to True should not be done in a production environment).

Also, what size was the image file? If it's too big it's possible the web server config didn't allow such an upload.

Thank you.

Comment 2 Dafna Ron 2013-07-21 10:57:08 UTC
the file is 1.4G which is not large for a disk image. 

[dron@dron Desktop]$ du -sh 39f89a6a-7fbb-43c0-a5ea-19b271f51829
1.4G	39f89a6a-7fbb-43c0-a5ea-19b271f51829

also, if the image file is too big there should be an error that the file it too big. 

I am working with a grizzly downstream rpm so I am not sure that the changes in the file done anything (I did not see anything in the UI to suggest that it did), but I will attached the access and error http logs after the change. 
perhaps the changes should be in /etc/httpd/conf/httpd.conf?

Comment 3 Dafna Ron 2013-07-21 10:58:54 UTC
Created attachment 776425 [details]
httpd logs after debug change

Comment 4 Matthias Runge 2013-09-27 10:31:25 UTC
could you please verify, this works using an ISO image? IMHO this is a cinder bug still valid in havana:
https://bugs.launchpad.net/horizon/+bug/1231887

Comment 6 Matthias Runge 2013-11-13 10:38:51 UTC
Looks like https://bugs.launchpad.net/horizon/+bug/1231887

Comment 7 Flavio Percoco 2013-11-26 10:47:26 UTC
I think this was fixed by https://review.openstack.org/#/c/52463/

@Eric, can you confirm this? The upstream bug hasn't been updated since Nov, 13th.

Comment 8 Eric Harney 2013-11-26 20:49:23 UTC
Flavio: it looks likely.

Dafna:  How big is was the volume, and how big is the virtual size of the image?  (Since it's qcow2 I'm assuming it represents a disk significantly larger than 1.4 GB.)

Comment 9 Flavio Percoco 2013-11-28 13:43:27 UTC
Stable havana backport of the fix!

Comment 14 Dafna Ron 2013-12-11 15:17:51 UTC
Created attachment 835313 [details]
logs

Comment 16 Dafna Ron 2013-12-11 15:35:10 UTC
Created attachment 835319 [details]
logs

there you go...

Comment 18 Tzach Shefi 2014-01-20 12:45:20 UTC
Verified 

Setup semi distributed:
host 1: cloud controller (Nova+compute\Horizon\Keystone\Cinder..) 
host 2: Glance+compute

Version:
RHEL 6.5 
python-django-openstack-auth-1.1.2-1.el6ost.noarch
openstack-glance-2013.2.1-3.el6ost.noarch

Output:
Used template image of RHEL 6.5  (10Giga), created on RHEV and exported to file.
Uploaded template to Glance (as raw\bare), from CLI and Horizon, both images created successfully. Booted instances one from each image, both booted OK.


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