Bug 984918 - horizon: can't create an image from file with "Bad Request" error
horizon: can't create an image from file with "Bad Request" error
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity high
: z1
: 4.0
Assigned To: Flavio Percoco
Tzach Shefi
storage
: TestOnly, Triaged, ZStream
Depends On: 1015645
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-16 07:23 EDT by Dafna Ron
Modified: 2016-04-26 11:43 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 12:32:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1231887 None None None Never

  None (edit)
Description Dafna Ron 2013-07-16 07:23:50 EDT
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 07:27:00 EDT
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 06:57:08 EDT
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 06:58:54 EDT
Created attachment 776425 [details]
httpd logs after debug change
Comment 4 Matthias Runge 2013-09-27 06:31:25 EDT
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 05:38:51 EST
Looks like https://bugs.launchpad.net/horizon/+bug/1231887
Comment 7 Flavio Percoco 2013-11-26 05:47:26 EST
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 15:49:23 EST
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 08:43:27 EST
Stable havana backport of the fix!
Comment 14 Dafna Ron 2013-12-11 10:17:51 EST
Created attachment 835313 [details]
logs
Comment 16 Dafna Ron 2013-12-11 10:35:10 EST
Created attachment 835319 [details]
logs

there you go...
Comment 18 Tzach Shefi 2014-01-20 07:45:20 EST
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.