[openstack-dev] [heat][glance] Heat image resource support issue

Brian Rosmaita rosmaita.fossdev at gmail.com
Thu Sep 6 02:59:45 UTC 2018


On Wed, Sep 5, 2018 at 11:12 AM Rico Lin <rico.lin.guanyu at gmail.com> wrote:

>
> On Wed, Sep 5, 2018 at 8:47 PM Brian Rosmaita <rosmaita.fossdev at gmail.com>
> wrote:
>
> Since Queens, Glance has had a 'web-download' import method that takes a
>> URL [0].  It's enabled by default, but operators do have the ability to
>> turn it off.  (There's an API call to see what methods are enabled in a
>> particular cloud.)  Operators also have the ability to restrict what URLs
>> are acceptable [1], but that's probably a good thing.
>>
>> In short, Glance does have the ability to do what you need since Queens,
>> but there's no guarantee that it will be available in all clouds and for
>> all URLs.  If you foresee that as a problem, it would be a good idea to get
>> together with the Glance team at the PTG to discuss this issue.  Please add
>> it as a topic to the Glance PTG planning etherpad [3] as soon as you can.
>>
> Cool! Thank Brian.
> Sounds like something we can use, just one small question in my mind. In
> order to use `web-download` in image resource, we need to create an empty
> image than use import to upload that imge. I have try that scenrio by
> myself now (I'm not really diving into detail yet) by:
> 1. create an empty image(like `openstack image create --container-format
> bare --disk-format qcow2 img_name`)
> 2. and than import image  (like `glance image-import --import-method
> web-download --uri
> https://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img `)
> But that image stuck in queued after first step.
> dose this scenario supported by glance? Or where did I do wrong?
>

That scenario should work, unless you are running glance under uwsgi, in
which case the task engine (used to import the image) does not run.  You
can tell that's the problem if as an admin user you use the command 'glance
task-list'.  You should see a task of type 'api_image_import' with status
'pending'.  (You can do 'glance task-show <task_id>' to see the details of
the task.)

If you are using devstack, you can apply this patch before you call
stack.sh: https://review.openstack.org/#/c/545483/  .  It will allow
everything except Glance to run under uwsgi.


>
>
>>
>> [0]
>> https://developer.openstack.org/api-ref/image/v2/index.html#interoperable-image-import
>> [1]
>> https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html#configuring-the-web-download-method
>> [3] https://etherpad.openstack.org/p/stein-ptg-glance-planning
>>
>
> --
> May The Force of OpenStack Be With You,
>
> *Rico Lin*irc: ricolin
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180905/b797ec9d/attachment.html>


More information about the OpenStack-dev mailing list