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

Alvise Dorigo alvise.dorigo at pd.infn.it
Thu May 21 13:11:55 UTC 2015


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



More information about the OpenStack-operators mailing list