<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi,</div>
<div>In the case that libvirt is using a shared file system then there is the chance of having a race condition – one compute node may try and blow away an image that it thinks is aged whilst another tries to spin up an instance using the same image that is
 being deleted. There may be the outside chance that this is protected by locks on the shared file system. My guess is that it is not the case.</div>
<div>Thanks</div>
<div>Gary</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Leslie-Alexandre DENIS <<a href="mailto:contact@ladenis.fr">contact@ladenis.fr</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, April 29, 2015 at 4:11 PM<br>
<span style="font-weight:bold">To: </span>Joe Topjian <<a href="mailto:joe@topjian.net">joe@topjian.net</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a>" <<a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a>>, "<a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>"
 <<a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Openstack] [nova] Cleaning up unused images in the cache<br>
</div>
<div><br>
</div>
<div>
<div bgcolor="#FFFFFF" text="#000000">Dear Joe,<br>
<br>
Thanks for your kind reply, your informations are helpful. I'm reading the imagecache.py[1] sourcecode in order to really understand what it'll happen in case of a shared filesystem.<br>
<br>
I understand the SHA1 hash mechanism and the backing file check but I'm not sure how it will manage the case of shared FS.<br>
<br>
The main function seems to be :<br>
- backing_file = libvirt_utils.get_disk_backing_file(disk_path)<br>
<br>
But does libvirt_utils.get_disk_backing_file federates all the compute nodes informations ?! If no it may delete the other nodes images ?<br>
<br>
Hope it's not too redundant,<br>
Kind regards<br>
<br>
[1] <a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openstack_nova_blob_master_nova_virt_libvirt_imagecache.py&d=AwMFaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=VlZxHpZBmzzkWT5jqz9JYBk8YTeq9N3-diTlNj4GyNc&m=w2pWyjM1IULD3khGemCqgEcm_n_1Pksa-WvLSve2lFg&s=_JgVx1Tp01Y8aWVK3KO4zGaIbhagJD4YXn6hLLrWKtw&e=">
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/imagecache.py</a><br>
<br>
<div class="moz-cite-prefix">Le 28/04/2015 16:18, Joe Topjian a écrit :<br>
</div>
<blockquote cite="mid:CA+y7hvgWtXNW3vUWFw6Cq=qsLjAiRir1vW-iznmS9kHFbXwcWQ@mail.gmail.com" type="cite">
<div dir="ltr">Hello,
<div><br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I've got a similar question about cache-manager and the presence of a shared filesystem for instances images.<br>
I'm currently reading the source code in order to find out how this is managed but before I would be curious how you achieve this on production servers.<br>
<br>
For example images not used by compute node A will probably be cleaned on the shared FS despite the fact that compute B use it, that's the main problem.<br>
</blockquote>
<div><br>
</div>
<div>This used to be a problem, but AFAIK it should not happen any more. If you're noticing it happening, please raise a flag.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
How do you handle _base guys ?<br>
</blockquote>
<div><br>
</div>
<div>We configure Nova to not have instances rely on _base files. We found it to be too dangerous of a single point of failure. For example, we ran into the scenario you described a few years ago before it was fixed. Bugs are one thing, but there are a lot
 of other ways a _base file can become corrupt or removed. Even if those scenarios are rare, the results are damaging enough for us to totally forgo reliance of _base files.</div>
<div><br>
</div>
<div>Padraig Brady has an awesome article that details the many ways you can configure _base and instance files:</div>
<div><br>
</div>
<div><a moz-do-not-send="true" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.pixelbeat.org_docs_openstack-5Flibvirt-5Fimages_&d=AwMFaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=VlZxHpZBmzzkWT5jqz9JYBk8YTeq9N3-diTlNj4GyNc&m=w2pWyjM1IULD3khGemCqgEcm_n_1Pksa-WvLSve2lFg&s=w_4_SKuqAOKgdJmNM3A2raXr0-Syzvyk7YABkxtz-04&e=">http://www.pixelbeat.org/docs/openstack_libvirt_images/</a><br>
</div>
<div><br>
</div>
<div>I'm looping -operators into this thread for input on further ways to handle _base. You might also be able to find some other methods by searching the -operators mailing list archive.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Joe</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Leslie-Alexandre DENIS
Tel +33 6 83 88 34 01
Skype ladenis-dc4
BBM PIN 7F78C3BD

SIRET 800 458 663 00013</pre>
</div>
</div>
</span>
</body>
</html>