[Twisted-Python] FilesystemLock/DeferredFilesystemLock with NFS and multiple processes

Alberto Donato alberto.donato at gmail.com
Thu Jul 14 09:54:22 EDT 2011


Hi,
  I have a scenario in which I need to use a lock file to prevent
multiple processes to run on the same directory concurrently.
The processes could run on the same machine or on different machine,
with a NFS filesystem.

If I understand correctly FilesystemLock works fine with different
processes on the same machine, but since it uses a symlink to PIDs to
identify the lock owner, it is not guaranteed to be safe on NFS.
Is this the only issue with this scenario? In this case I guess it
could be fixed by adding a machine identifier (hostname or some hash)
to the name.
Also, is there any possible concurrency problem with NFS atomicity?

Thanks,

Alberto



More information about the Twisted-Python mailing list