<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Jake,<br>
<br>
Thanks for raising this topic. I'm really interested in it. I
reviewed most of the locations patches of Glance, so drop my 2 cents
about this. So firstly, I think it's a valid user case. As for the
implementation, I think a spec-lite is enough, given it's just a
driver for current location strategy. I haven't seen your code, so
I'm not sure if your implementation is ok for upstreaming. But I
would assume your code is a driver under
<a class="moz-txt-link-freetext" href="https://github.com/openstack/glance/tree/master/glance/common/location_strategy">https://github.com/openstack/glance/tree/master/glance/common/location_strategy</a>
and personally, I think the metadata of location is right way since
the location URL can't provide clear and enough information for the
ranking. We can discuss more on #openstack-glance channel. Cheers.<br>
<br>
<div class="moz-cite-prefix">On 14/01/16 13:07, Jake Yip wrote:<br>
</div>
<blockquote
cite="mid:CAHnGV3rc9WJZd9avSNKYgN7fJOxys=6chEbUUsX+nABL_QksoQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>I've recently ran across a constraint in glance-api while
working with image locations. In essence, there is no way to
customize ordering of image-locations other than the default
location strategies, namely location_order and store_type [0].
It seems like a more generic method of ordering image
locations is needed, IMHO.</div>
<div><br>
</div>
<div>Some background - We are in a multi-cell environment and
each cell has it's own glance-api server. All images are
stored in a global swift cluster. We would like glance to be
able to fetch images from a local store, so that we can do COW
for backends like RBD.</div>
<div><br>
</div>
<div>Unfortunately, none of the current location strategies
works for us, as we might have multiple cells sharing the same
backend. I've opened a bug / wishlist describing this issue
[1]. I have also implemented code that allows us to achieve
that based on image location metadata.</div>
<div><br>
<div>I am wondering anyone else have solved this before? I
would like to hear your opinions on how we can achieve this,
and whether ranking it by metadata is the way to go.</div>
<div><br>
</div>
<div>The current wishlist is now tracked as a spec-lite. Is
this ok?<br>
</div>
</div>
<div><br>
</div>
<div>Regards,</div>
<div>Jake</div>
<div><br>
</div>
<div>[0] <a moz-do-not-send="true"
href="http://docs.openstack.org/liberty/config-reference/content/section_glance-api.conf.html"
target="_blank">http://docs.openstack.org/liberty/config-reference/content/section_glance-api.conf.html</a><br>
</div>
<div>[1] <a moz-do-not-send="true"
href="https://bugs.launchpad.net/glance/+bug/1528453"
target="_blank">https://bugs.launchpad.net/glance/+bug/1528453</a></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Cheers & Best regards,
Fei Long Wang (王飞龙)
--------------------------------------------------------------------------
Senior Cloud Software Engineer
Tel: +64-48032246
Email: <a class="moz-txt-link-abbreviated" href="mailto:flwang@catalyst.net.nz">flwang@catalyst.net.nz</a>
Catalyst IT Limited
Level 6, Catalyst House, 150 Willis Street, Wellington
-------------------------------------------------------------------------- </pre>
</body>
</html>