#9400: flock causes problems when writing to an NFS share
------------------------------------+---------------------------------------
          Reporter:  mikeh          |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  Uncategorized  |       Version:  1.0   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by rndblnch):

 Replying to [comment:1 mtredinnick]:
 > So we're in an impossible situation here then. `lockf()` doesn't work
 everywhere, `flock()` doesn't work everywhere. And there's no way to know
 which one works.
 >
 > Since `lockf()` -- the way Django currently does things -- is the
 recommended approach to doing portable locking and it should work with NFS
 (I made sure and read the Python source before making the change), I'm
 inclined to leave the current behaviour in place until a more robust
 solution emerges.
 >
 > Thus, we'll need more information and investigation from you on this
 one. For example, does changing the `lockf()` call to `flock()` also fail?
 Do you have `statd` running on the server (so that locking is available --
 since that was one of the problems in a Debian case, for example)? What
 information can you track down about why one version works somewhere and
 the other version works (if it does) on other NFS servers? What's the
 differentiating feature?
 >
 > Sorry to push the research back in your direction, but right now
 Django's doing the best it can as far as following recommended practices
 and the current code certainly avoided the problems that were reported
 earlier. Yours is the first case that's been reported of it not working on
 a reliable NFS setup with the current code, so you have the (only?)
 failing test case and will need to work out what's going on. I'm far
 beyond being able to guess.

 #9433 points out a similar problem (although on afp mounts).
 The patch it provides
 
(<http://code.djangoproject.com/attachment/ticket/9433/not_supported_locks.diff>)
 may be adapted to also handle the "{{{IOError: [Errno 37] No locks
 available}}}" error.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9400#comment:2>
Django <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 django-updates@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to