#8403: Current file locking does not work on NFS mounts
-------------------------------------------+--------------------------------
Reporter: mtredinnick | Owner: roman
Status: new | Milestone: 1.0
Component: File uploads/storage | Version: SVN
Resolution: | Keywords: file lock
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by roman):
* keywords: => file lock
Comment:
The file of interest is django/core/files/locks.py.
Imported in django/core/files/storage.py django/core/files/move.py
Pointlessly imported in django/db/models/base.py
Trying to change to fcntl.fcntl() from fcntl.flock() in the lock and
unlock. Using posfixfile.lock() looks like the best way forward, but I
get an error
{{{
File "/usr/lib/python2.5/site-packages/django/core/files/locks.py",
line 70, in lock
rv = fcntl.fcntl(file, fcntl.F_SETLKW, lockdata)
IOError: [Errno 22] Invalid argument
}}}
This guy had the same NFS locking problem and says he got it to work. It
did not work for me. Then again, my NFS mount seemed to support flock()
even with subtree_check.
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2007-06/msg00801.html
--
Ticket URL: <http://code.djangoproject.com/ticket/8403#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---