On 1 December 2015 at 12:34, David Cheney <[email protected]> wrote:
> On Tue, Dec 1, 2015 at 8:10 PM, roger peppe <[email protected]> wrote:
>> So I'm with axw on this one - flock seems like it is a reasonable tool for
>> the job here. FWIW a Unix domain socket also suffers from the "won't
>> work across NFS" problem. Abstract unix domain sockets also
>> have the problem that they won't work with long file paths (what
>> were they thinking?)
>
> This is false, abstract unix domains sockets have nothing to do with
> nfs, they don't live on a filesystem. wrt to a long path, don't think
> of it as a path, think of it as a per machine key.

Exactly. But we're using this locking abstraction to protect files,
so if someone else on a different machine that shares those
files through NFS tries to obtain the lock, they'll erroneously succeed.

In the juju agent case, it doesn't matter because we're sure that
all the clients obtaining the lock live on the same machine.
But this is not necessarily the case with the configstore use
case (consider someone that sets JUJU_HOME to a directory
inside an NFS mount).

Aside: it is of course easy to work around the "long path" problem by
just using a secure hash of the path rather than the path itself

-- 
Juju-dev mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to