[Openstack] Compressed image support ?

Gabriel Hurley Gabriel.Hurley at nebula.com
Tue Jul 10 05:39:07 UTC 2012


Filed that bug a month ago: https://bugs.launchpad.net/glance/+bug/1009248

Patches welcome. ;-)

    - Gabriel

> -----Original Message-----
> From: openstack-bounces+gabriel.hurley=nebula.com at lists.launchpad.net
> [mailto:openstack-
> bounces+gabriel.hurley=nebula.com at lists.launchpad.net] On Behalf Of
> Christopher B Ferris
> Sent: Monday, July 09, 2012 7:41 PM
> To: openstack at lists.launchpad.net
> Subject: Re: [Openstack] Compressed image support ?
> 
>  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: chrisfer at us.ibm.com
> Twitter: christo4ferris
> phone: +1 508 234 2986
> 
> -----openstack-bounces+chrisfer=us.ibm.com at lists.launchpad.net wrote:
> -----openstack-bounces+-----
> 
> >To: Wang Li <foxban at gmail.com>
> >From: John Postlethwait
> >Sent by: openstack-bounces+chrisfer=us.ibm.com at lists.launchpad.net
> >Date: 07/09/2012 03:38PM
> >Cc: openstack at lists.launchpad.net
> >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#
> e
> >xa 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     : openstack at lists.launchpad.net
> >Unsubscribe : https://launchpad.net/~openstack
> >More help   : https://help.launchpad.net/ListHelp
> >
> >
> >
> >
> _______________________________________________
> >Mailing list: https://launchpad.net/~openstack Post to     :
> >openstack at lists.launchpad.net Unsubscribe :
> https://launchpad.net/~openstack
> >More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp






More information about the Openstack mailing list