<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 10 Jan 2017, at 17:41, Zane Bitter <<a href="mailto:zbitter@redhat.com" class="">zbitter@redhat.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">On 10/01/17 05:25, Flavio Percoco wrote:<br class="">
<blockquote type="cite" class=""><br class="">
<br class="">
<blockquote type="cite" class="">I'd recommend Heat to not use locations as that will require deployers<br class="">
to either enable them for everyone or have a dedicate glance-api node<br class="">
for Heat.<br class="">
----If not use location, do we have other options for user? What<br class="">
should user to do before create a glance image using v2? Download the<br class="">
image data? And then pass the image data to glance api? I really don't<br class="">
think it's good way.<br class="">
<br class="">
</blockquote>
<br class="">
That *IS* how users create images. There used to be copy-from too (which<br class="">
may or<br class="">
may not come back).<br class="">
<br class="">
Heat's use case is different and I understand that but as I said in my<br class="">
other<br class="">
email, I do not think sticking to v1 is the right approach. I'd rather<br class="">
move on<br class="">
with a deprecation path or compatibility layer.<br class="">
</blockquote>
<br class="">
"Backwards-compatibility" is a wide-ranging topic, so let's break this down into 3 more specific questions:<br class="">
<br class="">
1) What is an interface that we could support with the v2 API?<br class="">
<br class="">
- If copy-from is not a thing then it sounds to me like the answer is "none"? We are not ever going to support uploading a multi-GB image file through Heat and from there to Glance.</div>
</div>
</blockquote>
<blockquote type="cite" class="">
<div class="">
<div class="">- We could have an Image resource that creates a Glance image from a volume. It's debatable how useful this would be in an orchestration setting (i.e. in most cases this would have to be part of a larger workflow anyway), but there are some conceivable
 uses I guess. Given that this is completely disjoint from what the current resource type does, we'd make it easier on everyone if we just gave it a new name.<br class="">
<br class="">
2) How can we avoid breaking existing stacks that use Image resources?<br class="">
<br class="">
- If we're not replacing it with anything, then we can just mark the resource type as first Deprecated, and then Hidden and switch the back end to use the v2 API for things like deleting. As long as nobody attempts to replace the image then the rest of the
 stack should continue to work fine.<br class="">
<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
Can we only deprecate the resources using the location function but maintain backwards compatibility if the location function is not used? </div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div class="">3) How do we handle existing templates in future?<br class="">
<br class="">
- Again, if we're not replacing it with anything, the -> Deprecated -> Hidden process is sufficient. (In theory "Hidden" should mean you can't create new stacks containing that resource type any more, only continue using existing stacks that contained it. In
 practice, we didn't actually implement that and it just gets hidden from the documentation. Obviously trying to create a new one using the location field once only the v2 API is available will result in an error.)<br class="">
<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
My worry is that portable heat templates like the Community App Catalog ( <a href="http://apps.openstack.org/#tab=heat-templates" class="">http://apps.openstack.org/#tab=heat-templates</a>) would become much more complex if we have to produce different resources
 for Glance V1 and V2 configurations. If, however, we are able to say that the following definitions of image resources are compatible across the two configurations, this can be more supportive of a catalog approach and improve template portability.</div>
<div><br class="">
</div>
<div>Tim</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div class=""><br class="">
If we have a different answer to (1) then that could change the answers to (2) and (3).<br class="">
<br class="">
cheers,<br class="">
Zane.<br class="">
<br class="">
__________________________________________________________________________<br class="">
OpenStack Development Mailing List (not for usage questions)<br class="">
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" class="">
OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br class="">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>