[Openstack-operators] Locking on images in _base with shared filesystem

Michael Still mikal at stillhq.com
Thu May 21 16:59:43 UTC 2015


The code for this is in nova/virt/libvirt/imagebackend.py.

There is external locking for the fetch functions, and I guess if
those lock files were on shared storage you _might_ get the expected
behaviour -- but I am pretty sure that lock files on NFS are going to
cause you to not be totally happy.

So, we don't really handle this case.

Michael

On Thu, May 21, 2015 at 6:11 AM, Alvise Dorigo <alvise.dorigo at pd.infn.it> wrote:
> Hi,
> I've several compute nodes which share a distributed FS (Gluster) in their
> /var/lib/nova/instances.
>
> I wonder if multiple nova-compute processes (among different compute nodes)
> lock in some way the image downloading from glance in
> /var/lib/nova/instances/_base...
>
> Consider for example that a glance image has never been launched. And
> suppose that, the first time it is launched, 2 instances are spawned by the
> scheduler on two different compute nodes (because, of course, the user
> actually asked for 2 instances of the same image).
>
> What happens ? My knowledge of the entire procedure is not complete yet: I
> presume that both nova-compute processes see that in /var/lib/nova/instances
> there is not (yet) that image and they start, independently, to download it
> from glance. But they actually write in the very same place, the same file.
> And this causes file corruption unless some file locking mechanims can occur
> between the two different nova-compute processes running on two compute
> nodes.
>
> Can someone clarify ?
>
> thanks,
>
>     Alvise
>
> _______________________________________________
> OpenStack-operators mailing list
> OpenStack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators



-- 
Rackspace Australia



More information about the OpenStack-operators mailing list