<div dir="ltr">Hi Michael,<div><br></div><div>and thank you for your answer.</div><div><br></div><div>Indeed, what I want to do is to add methods to the ImageCache.py module (listing, adding, deleting). So far, this module only takes care of image deletion: this represents the "cache" of images. Now, I want to populate the cache with some images on the hypervisor (as you mention) without having any instance running it, yet. The method I want like to add should call the appropriate method from the hypervisor driver (let's say libvirt) to trigger the image download/creation without starting it (I guess something like calling _create_image() should do the trick).</div><div><br></div><div>Your question is actually good: how will an user be  able to trigger this image caching mechanism? </div><div>My idea is to extend the HTTP Nova Compute API. I would lilke to add a resource, let's say "CachedImages", to the API tree. In this way, interacting via CRUD operation we should be able to CALL/CAST rpc api and interact with the imagecache module. </div><div><br></div><div>Is it clearer now? Do you see any problem in this approach?</div><div><br></div><div>Regards,</div><div><br></div><div>Alberto.</div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 8, 2015 at 11:45 PM, Michael Still <span dir="ltr"><<a href="mailto:mikal@stillhq.com" target="_blank">mikal@stillhq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think I'd rephrase your definition of pre-fetched to be honest -- something more like "images on this hypervisor node without a currently running instance". So, your operations would become:<div><br></div><div> - trigger an image prefetching</div><div> - list unused base images (and perhaps when they were last used)</div><div> - delete an unused image</div><div><br></div><div>All of that would need to tie into the image cache management code so that its not stomping on your images. In fact, you're probably best of adding all of this as tweaks to the image cache manager anyways.</div><div><br></div><div>One question though -- who is calling these APIs? Are you adding a central service to orchestrate these calls?</div><div><br></div><div>Michael</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Oct 8, 2015 at 10:50 PM, Alberto Geniola <span dir="ltr"><<a href="mailto:albertogeniola@gmail.com" target="_blank">albertogeniola@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><p class="MsoNormal"><span lang="EN-US">Hi all,</span></p>

<p class="MsoNormal"><span lang="EN-US">I'm
considering to extend the Nova-Compute API in order to provide
image-prefetching capabilities to OS.</span></p>

<p class="MsoNormal"><span lang="EN-US">In order to
allow image prefetching, I ended up with the need to add three different APIs
on the nova-compute nodes:</span></p>

<p class="MsoNormal"><span lang="EN-US">  1. Trigger an image prefetching</span></p>

<p class="MsoNormal"><span lang="EN-US">  2. List prefetched images</span></p>

<p class="MsoNormal"><span lang="EN-US">  3. Delete a prefetched image</span></p>

<p class="MsoNormal"><span lang="EN-US"> </span></p>

<p class="MsoNormal"><span lang="EN-US">About the
point 1 I saw I can re-use the libvirt driver function _create_image() to
trigger the image prefetching. However, this approach will not store any
information about the stored image locally. This leads to an issue: how do I retrieve
a list of already fetched images? A quick and simple possibility would be
having a local file, storing information about the fetched images. Would it be
acceptable? Is there any best practice in OS community?</span></p>

<p class="MsoNormal"><span lang="EN-US"> </span></p>

<p class="MsoNormal"><span lang="EN-US">Any ideas?</span></p>

<p class="MsoNormal"><span lang="EN-US"><br></span></p><p class="MsoNormal"><span lang="EN-US">Ty,</span></p><p class="MsoNormal"><span lang="EN-US">Al.</span></p><span><font color="#888888"><div><br></div>-- <br><div><div dir="ltr">Dott. Alberto Geniola<div><br><div><img src="https://docs.google.com/uc?export=download&id=0B2LZUBlzed4yMGFGeUFheFZJbDg&revid=0B2LZUBlzed4yS2lUSUlSZjE1aHFuUi9ZWkdEZWNLdCt0cGpvPQ">  <a href="mailto:albertogeniola@gmail.com" target="_blank">albertogeniola@gmail.com</a></div><div><img src="https://docs.google.com/uc?export=download&id=0B2LZUBlzed4yWl9nWThBMll5R1E&revid=0B2LZUBlzed4yK0ZwOG94RlA3bWViRnJPMWZLbWV1UUdDNG1vPQ">  <a href="tel:%2B39-346-6271105" value="+393466271105" target="_blank">+39-346-6271105</a></div><div><span style="font-size:12.8px"><img src="https://docs.google.com/uc?export=download&id=0B2LZUBlzed4yeVowYkUwekV6M2c&revid=0B2LZUBlzed4yZU53V0FoY1JtdHVUTEU2dDNmeFl0c1J0TTJVPQ">  <a href="https://www.linkedin.com/in/albertogeniola" target="_blank">https://www.linkedin.com/in/albertogeniola</a></span><br></div><div><br></div><div>Web: <a href="http://www.hw4u.it" target="_blank">http://www.hw4u.it</a></div></div></div></div>
</font></span></div>
<br></div></div>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Rackspace Australia</div>
</font></span></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dott. Alberto Geniola<div><br><div><img src="https://docs.google.com/uc?export=download&id=0B2LZUBlzed4yMGFGeUFheFZJbDg&revid=0B2LZUBlzed4yS2lUSUlSZjE1aHFuUi9ZWkdEZWNLdCt0cGpvPQ">  <a href="mailto:albertogeniola@gmail.com" target="_blank">albertogeniola@gmail.com</a></div><div><img src="https://docs.google.com/uc?export=download&id=0B2LZUBlzed4yWl9nWThBMll5R1E&revid=0B2LZUBlzed4yK0ZwOG94RlA3bWViRnJPMWZLbWV1UUdDNG1vPQ">  +39-346-6271105</div><div><span style="font-size:12.8000001907349px"><img src="https://docs.google.com/uc?export=download&id=0B2LZUBlzed4yeVowYkUwekV6M2c&revid=0B2LZUBlzed4yZU53V0FoY1JtdHVUTEU2dDNmeFl0c1J0TTJVPQ">  <a href="https://www.linkedin.com/in/albertogeniola" target="_blank">https://www.linkedin.com/in/albertogeniola</a></span><br></div><div><br></div><div>Web: <a href="http://www.hw4u.it" target="_blank">http://www.hw4u.it</a></div></div></div></div>
</div></div>