John Postlethwait wrote: >... Also, you need to make sure you are linking DIRECTLY to the image >itself, as if it is a redirect or any other HTTP response besides the file, >Glance will still create an image out of it and it will seem to have worked. >Sometimes you can even launch said instances that are totally invalid. (During >my testing of this I was able to successfully launch instances that were just >the HTTP data from 302 redirects.)
Why would the Glance client treat an HTTP 302 redirect as a 2xx? That seems rather odd behavior, and less like a feature and more like a bug, to me, if true. From the looks of the code, a RedirectException should be thrown. Cheers, Christopher Ferris IBM Distinguished Engineer, CTO Industry and Cloud Standards Member, IBM Academy of Technology IBM Software Group, Standards Strategy email: [email protected] Twitter: christo4ferris phone: +1 508 234 2986 [email protected] wrote: ----- >To: Wang Li <[email protected]> >From: John Postlethwait >Sent by: [email protected] >Date: 07/09/2012 03:38PM >Cc: [email protected] >Subject: Re: [Openstack] Compressed image support ? > > > Hi Wang, > >Horizon simply uses the Python interface to Glance and tells it to create the >image. Glance supports creating images from remote locations that are in a >compressed format. There are examples in the Glance documentation >here: https://github.com/openstack/glance/blob/master/doc/source/glance.rst#exa >mples-of-uploading-different-kinds-of-images and in the Glance binary itself >here: https://github.com/openstack/glance/blob/master/bin/glance#L190 So this >is widely supported and documented in Glance. > >The caveats are that through Horizon, the file MUST be accessible via the >network configuration where Glance resides, if it is not accessible due to >network configuration or something else, it will fail but seem to have >succeeded. Also, you need to make sure you are linking DIRECTLY to the image >itself, as if it is a redirect or any other HTTP response besides the file, >Glance will still create an image out of it and it will seem to have worked. >Sometimes you can even launch said instances that are totally invalid. (During >my testing of this I was able to successfully launch instances that were just >the HTTP data from 302 redirects.) > >I would first confirm that where Horizon is installed is able to communicate to >where you are trying to copy the image from, and that the link you are using >for the image is, in fact, a valid binary and not some other HTTP response. > >John Postlethwait >Nebula, Inc. > > On Monday, July 9, 2012 at 1:04 AM, Wang Li >wrote: > > hi, all > > As to the horizon UI, zip and tar.gz image files are supported. > >""" > Specify an image to upload to the Image Service. > > Currently only images available via an HTTP URL are supported. The >image location must be accessible to the Image Service. Compressed image >binaries are supported (.zip and .tar.gz.) > >""" > > My test environment is as follow: > > 1. LVM as image backend of vms. > 2. running vms on Xen in PV mode > > But when I upload a tar gzipped raw image file, nova just dd from it to >logical volume, thus, nova error logged > > "Boot loader didn't return any data!" > > I grepped the nova and glance source code, found nothing about of "gz" >or "zip" that related to image. > > This feature is valuable to our use case, for the raw image file is >4GB, but the compressed version is only 400MB. > > Did I misunderstand the compressed image support? > > >Regards. >Wang Li > > > > >_______________________________________________ >Mailing list: https://launchpad.net/~openstack >Post to : [email protected] >Unsubscribe : https://launchpad.net/~openstack >More help : https://help.launchpad.net/ListHelp > > > > _______________________________________________ >Mailing list: https://launchpad.net/~openstack Post to : >[email protected] Unsubscribe : https://launchpad.net/~openstack >More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp

